/* =========================================
   Fitpoprawny - Panel Klienta
   Autor: Aleksander Jasiulewicz
   ========================================= */

/* =========================================
   KONTENER I GŁÓWNA STRUKTURA
   ========================================= */

.fitpoprawny_panel_container {
    max-width: 500px;
    margin: 60px auto;
    padding: 20px;
}

.fitpoprawny_panel_redirect {
    max-width: 500px;
    margin: 60px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    color: var(--fitpoprawny-orange, #e57c34);
    font-weight: 600;
}

.fitpoprawny_panel_card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(229, 124, 52, 0.1);
    padding: 45px 35px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.fitpoprawny_panel_card:hover {
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.12);
}

/* =========================================
   NAGŁÓWEK
   ========================================= */

.fitpoprawny_panel_header {
    text-align: center;
    margin-bottom: 35px;
}

.fitpoprawny_panel_title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--fitpoprawny-dark, #141627);
    margin-bottom: 0.8em;
    position: relative;
}

.fitpoprawny_panel_title::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: var(--fitpoprawny-orange, #e57c34);
    margin: 10px auto 0 auto;
    border-radius: 3px;
    opacity: 0.9;
}

.fitpoprawny_panel_subtitle {
    font-size: 1rem;
    color: #777;
    line-height: 1.5;
    margin-top: 15px;
}

/* =========================================
   FORMULARZ
   ========================================= */

.fitpoprawny_login_form {
    margin-bottom: 25px;
}

.fitpoprawny_form_group {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
}

.fitpoprawny_form_label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fitpoprawny-dark, #141627);
    margin-bottom: 8px;
    display: block;
}

.fitpoprawny_form_input {
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    font-size: 1rem;
    font-family: "Poppins", "Open Sans", sans-serif;
    background: #fff;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.fitpoprawny_form_input:focus {
    border-color: var(--fitpoprawny-orange, #e57c34);
    box-shadow: 0 0 0 3px rgba(229, 124, 52, 0.15);
    background-color: #fffcf9;
}

.fitpoprawny_form_input::placeholder {
    color: #aaa;
    opacity: 0.8;
}

/* =========================================
   PASSWORD WRAPPER (Pokaż/Ukryj hasło)
   ========================================= */

.fitpoprawny_password_wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.fitpoprawny_password_wrapper .fitpoprawny_form_input {
    flex: 1;
    padding-right: 45px;
}

.fitpoprawny_password_toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.fitpoprawny_password_toggle:hover {
    color: var(--fitpoprawny-orange, #e57c34);
}

.fitpoprawny_icon_eye {
    width: 20px;
    height: 20px;
}

/* =========================================
   CHECKBOX
   ========================================= */

.fitpoprawny_form_checkbox {
    flex-direction: row;
    align-items: center;
    margin-bottom: 25px;
    gap: 10px;
}

.fitpoprawny_form_checkbox_input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--fitpoprawny-orange, #e57c34);
}

.fitpoprawny_form_checkbox_label {
    font-size: 0.95rem;
    color: var(--fitpoprawny-text, #333);
    cursor: pointer;
    margin-bottom: 0;
}

/* =========================================
   BŁĘDY I WIADOMOŚCI
   ========================================= */

.fitpoprawny_form_error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
    min-height: 20px;
}

.fitpoprawny_form_message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.fitpoprawny_form_message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fitpoprawny_form_message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* =========================================
   PRZYCISKI
   ========================================= */

.fitpoprawny_panel_btn {
    display: inline-block;
    background: var(--fitpoprawny-orange, #e57c34);
    color: #fff;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(229, 124, 52, 0.3);
    text-align: center;
    font-family: "Poppins", "Open Sans", sans-serif;
}

.fitpoprawny_panel_btn:hover {
    background: #d86f2a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(229, 124, 52, 0.4);
}

.fitpoprawny_panel_btn:active {
    transform: translateY(0);
}

.fitpoprawny_panel_btn_submit {
    width: 100%;
    margin-bottom: 20px;
}

.fitpoprawny_panel_btn_submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.fitpoprawny_panel_btn_logout {
    background: #e74c3c;
}

.fitpoprawny_panel_btn_logout:hover {
    background: #c0392b;
}

/* =========================================
   FOOTER - LINKI
   ========================================= */

.fitpoprawny_panel_footer {
    border-top: 1px solid rgba(229, 124, 52, 0.15);
    padding-top: 20px;
    text-align: center;
}

.fitpoprawny_panel_footer_text {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}

.fitpoprawny_panel_footer_text:last-child {
    margin-bottom: 0;
}

.fitpoprawny_panel_link {
    color: var(--fitpoprawny-orange, #e57c34);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}

.fitpoprawny_panel_link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 2px;
    background: var(--fitpoprawny-orange, #e57c34);
    transition: width 0.3s ease;
}

.fitpoprawny_panel_link:hover {
    color: #d86f2a;
}

.fitpoprawny_panel_link:hover::after {
    width: 100%;
}

/* =========================================
   ZALOGOWANY UŻYTKOWNIK
   ========================================= */

.fitpoprawny_panel_logged_in {
    text-align: center;
}

.fitpoprawny_panel_welcome {
    background: linear-gradient(135deg, #fffcf9 0%, #fffaf7 100%);
    border: 2px solid var(--fitpoprawny-orange, #e57c34);
    border-radius: 12px;
    padding: 35px 25px;
    margin-bottom: 25px;
}

.fitpoprawny_panel_welcome_text {
    font-size: 1.05rem;
    color: var(--fitpoprawny-text, #333);
    margin-bottom: 20px;
    line-height: 1.6;
}

.fitpoprawny_panel_welcome_text strong {
    color: var(--fitpoprawny-dark, #141627);
    font-weight: 700;
}

/* =========================================
   RESPONSYWNOŚĆ
   ========================================= */

@media (max-width: 768px) {
    .fitpoprawny_panel_container {
        margin: 40px auto;
        padding: 15px;
    }

    .fitpoprawny_panel_card {
        padding: 30px 20px;
        border-radius: 12px;
    }

    .fitpoprawny_panel_title {
        font-size: 1.6rem;
    }

    .fitpoprawny_panel_subtitle {
        font-size: 0.95rem;
    }

    .fitpoprawny_form_input {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .fitpoprawny_panel_btn {
        padding: 13px 24px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .fitpoprawny_panel_container {
        margin: 30px auto;
        padding: 10px;
    }

    .fitpoprawny_panel_card {
        padding: 25px 15px;
    }

    .fitpoprawny_panel_title {
        font-size: 1.4rem;
    }

    .fitpoprawny_form_label {
        font-size: 0.9rem;
    }

    .fitpoprawny_form_input {
        padding: 12px 14px;
        font-size: 16px;
    }

    .fitpoprawny_panel_btn {
        padding: 12px 20px;
    }
}

/* =========================================
   DOSTĘPNOŚĆ I SEO
   ========================================= */

.fitpoprawny_panel_btn:focus-visible,
.fitpoprawny_form_input:focus-visible,
.fitpoprawny_panel_link:focus-visible {
    outline: 2px solid var(--fitpoprawny-orange, #e57c34);
    outline-offset: 2px;
}

/* Loading state */
.fitpoprawny_panel_btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.fitpoprawny_panel_btn.loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
