/* =======================================
   Profile Page Styles — ServiciulTau.ro
========================================== */

/* ---------- Layout ---------- */
.profile-page {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding: 4rem 0;
}

/* ---------- Profile Form Section ---------- */
.profile-form-section {
    background-color: #fff;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: auto;
}

.profile-form-section .warning-message {
    color: var(--primary-color-dark);
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 2rem;
    font-weight: 500;
    font-size: 1.4rem;
    text-align: left;
}

.profile-form-section .warning-message.email-verification {
    color: var(--error-color);
    background: var(--cream-color);
}

#sendEmailVerificationLink {
    color: var(--secondary-color-dark);
    transition: all 0.15s ease;
}

#sendEmailVerificationLink:hover {
    color: var(--secondary-color);
}

/* ---------- Form ---------- */
form#profileForm {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

form#profileForm h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.account-type {
    flex-direction: row;
    gap: 6rem;
    margin-bottom: 2rem;
}

.account-type label {
    cursor: pointer;
}

.form-group label {
    font-weight: bold;
    font-size: 1.5rem;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group textarea {
    padding: 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-size: 1.5rem;
    background-color: #f9f9f9;
    transition: all 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    border: 1px solid var(--primary-color);
}

.form-group textarea:focus-visible {
    outline: none;
}

.form-group textarea {
    resize: vertical;
}

.checkbox-group {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.checkbox-group label {
    cursor: pointer;
    font-weight: normal;
    font-size: 1.4rem;
}

/* Radio */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    cursor: pointer;
    margin-bottom: -2px;
    margin-right: 5px;
}

input[type="radio"]:checked::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
}

/* Checkbox */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary-color);
    border-radius: 3px;
    display: inline-block;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    margin-bottom: -3px;
    margin-right: 5px;
}

input[type="checkbox"]:checked::after {
    content: "✔";
    background-color: var(--primary-color);
    font-size: 15px;
    position: absolute;
    top: -5px;
    left: 0px;
    color: white;
}

/* ---------- Form Actions ---------- */
.form-actions {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.action-btn {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: var(--secondary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.action-btn:active {
    background-color: var(--secondary-color-darker);
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cancel-btn {
    background-color: #e5e5e5;
    color: var(--text-color);
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background-color: var(--light-gray);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.cancel-btn:active {
    background-color: #d4d4d4;
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ---------- Profile Section ---------- */

.status-table {
    display: flex;
    gap: 2rem;
    background: #f6f7fb;
    border-radius: 16px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
    padding: 1.5rem 2rem;
    justify-content: space-around;
    align-items: center;
    margin: 2rem 0;
    font-size: 1.1rem;
}

.status-table>div {
    cursor: pointer;
    flex: 1;
    text-align: center;
    padding: 1rem 0;
}

.status-table strong {
    display: block;
    font-size: 1.4rem;
    color: #252f3f;
    margin-bottom: 0.5rem;
    letter-spacing: 0.03em;
}

.status-table span {
    display: block;
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 0.25rem;
    letter-spacing: 0.03em;
}

/* Responsive for mobile */
@media (max-width: 600px) {
    .status-table {
        /* flex-direction: column; */
        padding: 1rem;
        gap: 1rem;
    }

    .status-table>div {
        padding: 0.5rem 0;
    }
}

/* ---------- Disabled State Styling ---------- */
input[disabled],
textarea[disabled],
select[disabled] {
    background-color: #f0f0f0;
    color: #888;
    border: 1px solid var(--light-gray);
    cursor: not-allowed;
    opacity: 0.7;
}

input[type="radio"][disabled]+label,
input[type="checkbox"][disabled]+label {
    color: #999;
    cursor: not-allowed;
}

input[type="radio"][disabled],
input[type="checkbox"][disabled] {
    accent-color: var(--light-gray);
    cursor: not-allowed;
}

button[disabled],
.action-btn[disabled],
.cancel-btn[disabled] {
    background-color: #ddd !important;
    color: #888 !important;
    cursor: not-allowed !important;
    border: none;
    opacity: 0.6;
    box-shadow: none;
    pointer-events: none;
}

/* ---------- Error Text Below Fields ---------- */
.error-text {
    color: var(--error-color);
    font-size: 1.3rem;
    margin-top: 0.8rem;
    font-weight: 500;
    display: none;
    /* Default state is hidden, controlled inline by JS */
}

/* ---------- Form Message Box Below Buttons ---------- */
.form-message {
    margin-top: 2rem;
    font-size: 1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    font-weight: bold;
}

.form-message.success {
    color: #166534;
    background-color: #dcfce7;
    border: 1px solid #86efac;
}

.form-message.error {
    color: #b91c1c;
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
}

/* ---------- Account Settings / Delete Account ---------- */
.delete-account-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.delete-account-section h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.delete-warning {
    color: var(--error-color);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    background: #fee2e2;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
}

.delete-btn {
    background-color: var(--error-color);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.delete-btn:active {
    background-color: #991b1b;
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.delete-auth {
    display: flex;
    flex-direction: column;
    margin: 1rem 0 1.5rem;
    gap: 0.6rem;
}

.delete-auth input {
    font-size: 14px;
    padding: 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    background-color: #f9f9f9;
    transition: border-color 0.2s ease;
}

.delete-auth input:focus {
    border-color: var(--primary-color);
}

/* =======================================
   Responsive — Mobile First
========================================== */
@media (max-width: 768px) {
    .profile-page {
        padding: 2rem 0;
    }

    .profile-form-section,
    .status-table {
        padding: 2rem;
        inline-size: auto;
        justify-content: space-around;
    }

    .status-table {
        padding: 0 0 16px 0;
    }

    .account-type {
        gap: 2rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .checkbox-group {
        flex-direction: column;
        gap: 1rem;
    }

    .popup-box {
        padding: 2rem;
    }

    .popup-ok {
        width: 100%;
    }
}