/* ==========================================================================
   Font Faces
   ========================================================================== */
@font-face {
    font-family: 'Bw Aleta No 10';
    font-style: normal;
    font-weight: 100;
    src: local('Bw Aleta No 10 Hairline'), local('Bw-Aleta-No-10-Hairline'),
    url('/static/fonts/BwAletaNo10-Hairline.woff2') format('woff2'),
    url('/static/fonts/BwAletaNo10-Hairline.woff') format('woff'),
    url('/static/fonts/BwAletaNo10-Hairline.ttf') format('truetype');
}

@font-face {
    font-family: 'Bw Aleta No 10';
    font-style: normal;
    font-weight: 300;
    src: local('Bw Aleta No 10 Light'), local('Bw-Aleta-No-10-Light'),
    url('/static/fonts/BwAletaNo10-Light.woff2') format('woff2'),
    url('/static/fonts/BwAletaNo10-Light.woff') format('woff'),
    url('/static/fonts/BwAletaNo10-Light.ttf') format('truetype');
}

@font-face {
    font-family: 'Bw Aleta No 10';
    font-style: normal;
    font-weight: 400;
    src: local('Bw Aleta No 10 Regular'), local('Bw-Aleta-No-10-Regular'),
    url('/static/fonts/BwAletaNo10-Regular.woff2') format('woff2'),
    url('/static/fonts/BwAletaNo10-Regular.woff') format('woff'),
    url('/static/fonts/BwAletaNo10-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Bw Aleta No 10';
    font-style: normal;
    font-weight: 500;
    src: local('Bw Aleta No 10 Medium'), local('Bw-Aleta-No-10-Medium'),
    url('/static/fonts/BwAletaNo10-Medium.woff2') format('woff2'),
    url('/static/fonts/BwAletaNo10-Medium.woff') format('woff'),
    url('/static/fonts/BwAletaNo10-Medium.ttf') format('truetype');
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Container Styles
   ========================================================================== */
.container {
    padding-bottom: 80px;
}

/* ==========================================================================
   Bottom Navigation
   ========================================================================== */
.bottom-nav {
    align-items: center;
    font-weight: 300;
    background: #ffffff;
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-evenly; /* Dostosowanie równomiernego rozłożenia */
    left: 0;
    padding: 12px 16px;
    position: fixed;
    right: 0;
    z-index: 1000;
}

.bottom-nav-button {
    align-items: center;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    flex-grow: 1; /* Elementy mają się rozciągać, aby wypełnić pasek */
    min-width: 0; /* Minimalna szerokość, aby zmieścić więcej ikon */
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 6px 0; /* Usunięto odstępy po bokach, aby rozciągać równo */
}

/* Nowy styl dla aktywnego przycisku */
.bottom-nav-button.active {
    color: #0583F2;
}

/* Nowy styl dla ikon */
.bottom-nav-button i {
    font-size: 20px; /* Zmniejszone z 24px */
    margin-bottom: 2px; /* Zmniejszone z 4px */
}

/* Nowy styl dla etykiet */
.bottom-nav-button span {
    font-size: 11px; /* Zmniejszone z 12px */
    text-align: center;
    line-height: 1.2;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-with-back {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    margin-bottom: 5px;
    padding-right: 35px;
    position: relative;
}

/* Nowy styl dla przycisku powrotu */
.back-button {
    align-items: center;
    background: #0583F2;
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    height: 40px;
    justify-content: center;
    min-width: 40px;
    padding: 0;
    position: absolute;
    right: 16px;
    top: -24px;
    transition: all 0.2s ease;
    width: 40px;
    z-index: 1001;
}

.back-button:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.edit-button {
    align-items: center;
    background: #0583F2;
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    padding: 0;
    position: absolute;
    transition: all 0.2s ease;
    z-index: 1001;
    height: 40px;
    min-width: 40px;
    width: 40px;
    left: 12px;
    top: -24px;
}

.edit-button:hover {
    background: #0056b3;
    transform: scale(1.05);
}


/* ==========================================================================
   Modal Components
   ========================================================================== */
.modal {
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    height: 100%;
    left: 0;
    outline: 0;
    overflow-x: hidden;
    overflow-y: auto;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1055;
}

.modal-dialog {
    align-items: center;
    display: flex;
    margin: 1.75rem auto;
    max-width: 380px; /* Zmniejszona szerokość */
    min-height: calc(100vh - 3.5rem);
    pointer-events: all;
    position: relative;
    width: calc(100% - 40px); /* Podobnie jak container */
}

.modal.fade .modal-dialog {
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.3s ease-out;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal.show .modal-dialog {
    opacity: 1;
    transform: translateY(0);
}

.modal-content {
    background-clip: padding-box;
    background-color: #fff;
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    margin: auto; /* Dodane dla lepszego centrowania */
    min-height: 150px;
    position: relative;
    width: 100%;
}

.modal-body {
    background-color: #F9F9F9;
    border-bottom-left-radius: 15px; /* Dodane zaokrąglenie */
    border-bottom-right-radius: 15px; /* Dodane zaokrąglenie */
    flex: 1;
    padding: 1.5rem;
    position: relative;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    height: 100vh;
    left: 0;
    position: fixed;
    top: 0;
    width: 100vw;
    z-index: 1050;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 0.5;
}

.modal-header {
    align-items: center;
    background-color: #F7D72C;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.modal-footer {
    background-color: #F9F9F9; /* Zmienione tło */
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
}

.modal-title {
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* Animacja */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal.show .modal-content {
    animation: modalSlideIn 0.3s ease-out forwards;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */
.btn-close {
    background: transparent;
    border: none;
    color: #000;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    opacity: 0.5;
    padding: 0.5rem;
}

.btn-close:hover {
    opacity: 0.75;
}

.btn-modal {
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-modal-primary {
    background-color: #007bff;
    border: none;
    color: white;
}

.btn-modal-primary:hover {
    background-color: #0056b3;
}

.btn-modal-secondary {
    background-color: #6c757d;
    border: none;
    color: white;
}

.btn-modal-secondary:hover {
    background-color: #545b62;
}

#modal-ok-button {
    background: #28A745;
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    padding: 10px 20px;
    transition: background-color 0.3s;
}

#modal-ok-button:hover {
    background: #218838;
}

.modal button:hover {
    background: #45a049 !important;
}

.modal button:active {
    transform: scale(0.98);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.refreshing i {
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 600px) {
    .bottom-nav {
        padding: 8px 12px;
    }

    .bottom-nav-button {
        min-width: 48px;
        padding: 4px 6px;
    }

    .bottom-nav-button i {
        font-size: 18px;
    }

    .bottom-nav-button span {

        font-size: 10px;
    }

    .edit-button,
    .back-button {
        height: 36px;
        min-width: 36px;
        right: 12px;
        top: -18px;
        width: 36px;
    }


    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 0.75rem 1rem;
    }

    .modal-header {
        padding: 0.75rem 1rem;
    }

}

@media (min-width: 576px) {
    .modal-dialog {
        margin: 1.75rem auto;
        max-width: 500px;
    }
}