@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

body {
    font-family: 'Onest', sans-serif;
    background-color: #fff;
    /* Flexbox removed, handled by Bootstrap classes in HTML */
    min-height: 100vh;
    margin: 0;
    color: #333;
}

/* Wrapper to handle full height centering */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 70px 20px 40px;
}

.auth-wrapper > div {
    margin: auto 0;
}

.auth-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    /* Full width of the bootstrap column */
    /* max-width removed, controlled by col classes */
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
}

@media (max-width: 768px) {
    .auth-wrapper {
        padding: 0;
        align-items: flex-start;
        /* Move to top */
        min-height: 100vh;
        background-color: white;
        /* Ensure bg is white */
    }

    .auth-wrapper > div {
        margin: 0;
    }

    .auth-card {
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 20px 15px;
        /* Reduced padding on mobile */
        min-height: 100vh;
        /* Fill screen height */
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

}

.language-switcher {
    position: absolute;
    top: -60px;
    right: 16px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 5px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    z-index: 10;
}

.language-switcher img,
.language-switcher svg {
    width: 24px;
    height: auto;
    border-radius: 2px;
    border: 1px solid #eee;
}

.language-dropdown-menu {
    min-width: 120px;
    font-size: 14px;
}


.dropdown-toggle::after {
    margin-left: 0.5em;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
}

.auth-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Overriding bootstrap form-control slightly if needed, or keeping custom look */
.form-control {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
}

.form-control:focus {
    border-color: #FFA000;
    box-shadow: 0 0 0 0.25rem rgba(255, 160, 0, 0.25);
}

.btn-primary {
    background-color: #FFC107;
    color: #000;
    font-weight: 500;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    transition: background-color 0.2s;
}

.btn-primary:active,
.btn-primary:focus,
.btn-primary:hover {
    background-color: #FFB300 !important;
    /* Bootstrap override */
    color: #000 !important;
    border-color: #FFB300 !important;
}

.footer-links,
.footer-links-bottom {
    margin-top: 20px;
    font-size: 12px;
    color: #777;
    text-align: left;
}

.footer-links {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 1.6;
}

.footer-links-bottom {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.footer-links-bottom a {
    display: block;
    color: #777;
    text-decoration: none;
    margin-bottom: 5px;
}

.footer-links-bottom a:hover {
    text-decoration: underline;
}

.info-box {
    padding: 0 10px 20px;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 400;
    color: #666;
    line-height: 1.5;
}

.choice-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
    /* RWD */
}

.choice-box {
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 4px;
    width: 100px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    color: #333;
    transition: border-color 0.2s;
}

.choice-box:hover {
    border-color: #FFA000;
}

.choice-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.choice-label {
    font-size: 12px;
    font-weight: 500;
    border-top: 1px solid #eee;
    padding-top: 5px;
    width: 100%;
    text-align: center;
}

.errorlist {
    color: red;
    font-size: 12px;
    list-style: none;
    padding: 0;
    margin-bottom: 10px;
    text-align: left;
}

.highlight-link {
    color: #FFA000;
    font-weight: 700;
    text-decoration: none;
}

/* Unified Header Style */
h3,
h4 {
    color: #6c757d;
    text-align: center;
}

/* Helper classes for templates to remove inline styles */
.auth-language-dropdown {
    position: absolute;
    top: -60px;
    right: 16px;
    z-index: 1050 !important;
}

.btn-language-custom {
    position: static !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.register-selected-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.choice-box-user-selected {
    border-color: #039BE5 !important;
    cursor: default;
}

.choice-box-installer-selected {
    border-color: #4CAF50 !important;
    cursor: default;
}

.terms-container {
    text-align: left;
    font-size: 14px;
}

.terms-link {
    color: #FFA000;
    text-decoration: none;
}

/* Authentication Logo Responsive Styles */
.auth-logo {
    max-width: 400px;
    height: auto;
}

@media (max-width: 576px) {
    .auth-logo {
        max-width: 80%;
    }
}

/* --- POPRAWKA WIDOCZNOŚCI FLAGI NA MOBILE --- */
@media (max-width: 768px) {
    .auth-language-dropdown {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        z-index: 1050 !important;
    }

    .language-switcher {
        position: relative !important;
        top: 0 !important;
        right: 0 !important;
        width: 40px !important;
        height: 40px !important;
        padding: 5px !important;
        border-radius: 50% !important;
        justify-content: center !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15) !important;
    }

    /* Ukryj tekst "Język / Language", zostaw samo logo (SVG) */
    .language-switcher>div:first-child {
        display: none !important;
    }

    /* Ukryj strzałkę dropdown */
    .language-switcher::after {
        display: none !important;
    }
}

/* ---- Ustawienia konta: wiersz akcji formularza ---- */
.settings-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 2rem;
}

/* Przyciski w wierszu akcji — nie dziedziczą width:100% z .btn-primary */
.settings-form-actions .btn {
    width: auto !important;
}


/* Etykiety skrócone na małych ekranach */
@media (max-width: 575.98px) {
    .settings-form-actions .btn-label-full  { display: none; }
    .settings-form-actions .btn-label-short { display: inline; }
}
@media (min-width: 576px) {
    .settings-form-actions .btn-label-full  { display: inline; }
    .settings-form-actions .btn-label-short { display: none; }
}

/* Modal footer usunięcia konta — przyciski zawsze w jednym wierszu */
.modal-footer-delete-account {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 0;
}


/* Adaptacja modalu usunięcia konta na małych ekranach mobilnych */
@media (max-width: 575.98px) {
    #deleteAccountModal .modal-body {
        padding: 1.25rem 1rem !important;
    }
    #deleteAccountModal .modal-main-text {
        font-size: 0.92rem;
        margin-bottom: 0.5rem;
    }
    #deleteAccountModal .list-group-item {
        font-size: 0.78rem;
        padding-top: 0.35rem !important;
        padding-bottom: 0.35rem !important;
    }
    #deleteAccountModal .list-group-item i {
        margin-right: 0.25rem !important;
    }
    #deleteAccountModal .modal-info-subtext {
        font-size: 0.72rem;
        line-height: 1.35;
        margin-top: 0.75rem;
    }
    #deleteAccountModal .form-check-label {
        font-size: 0.75rem;
        line-height: 1.35;
    }
    #deleteAccountModal .form-check {
        margin-top: 0.75rem !important;
    }
}

