/* Intro Chat page layout (shares look-and-feel with profile page) */
.intro-chat-page-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
}



/* Modal Overlay */
.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.profile-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.profile-modal {
    background: #ffffff;
    border-radius: 36px;
    padding: 80px;
    width: 732px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0px 20px 44px 0px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 40px;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.profile-modal-overlay.active .profile-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Modal Header */
.profile-modal-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-modal-title h2 {
    font-family: var(--title-font);
    font-size: 48px;
    font-weight: var(--font-weight-medium);
    color: #000000;
    line-height: 1.2;
    margin: 0 0 8px 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.profile-modal-title p {
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    color: #809dbc;
    line-height: 1;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Full page container styles */
.profile-page-container {
    width: 100%;
    min-height: calc(100vh);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
}

.profile-page-container .profile-modal-header {
    margin-bottom: 24px;
}

.profile-page-card {
    width: 100%;
    max-width: 636px;
    margin: 0 auto;
    padding: 0 16px 48px 16px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    z-index: 1;
    /* above background lottie */
}

/* Hide cancel button on full-page profile (keep it in modal) */
.profile-page-container .profile-modal-cancel-btn {
    display: none;
}

/* Profile background lottie positioning (mirror chat) */
.profile-background-lottie {
    position: fixed;
    width: 2800px;
    height: 2800px;
    left: 50%;
    bottom: -1900px;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
}

/* Form Fields */
.profile-modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-modal-input-group {
    display: flex;
    flex-direction: column;
}

.profile-modal-input-field {
    position: relative;
    background: #fff;
    border: 2px solid #e7edf3;
    border-radius: 16px;
    height: 72px;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: border-color 0.2s;
}

.profile-modal-input-field:focus-within {
    border-color: #075cfb;
}

.profile-modal-label {
    position: static;
    margin: 0 0 8px 0;
    font-weight: var(--font-weight-semibold);
    font-size: 9px;
    /* Label Small */
    color: #000;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    line-height: 1;
}

/* Remove floating-label variants for static label design */

.profile-modal-input,
.profile-modal-select {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-weight: var(--font-weight-medium);
    font-size: 16px;
    color: #000;
    line-height: 16px;
    /* UI Large */
    height: auto;
    display: block;
    padding: 0;
}

/* Custom select styles */
.profile-modal-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    font-weight: var(--font-weight-medium);
    font-size: 16px;
    color: #000;
    line-height: 16px;
    height: auto;
    width: 100%;
    padding-right: 32px;
    cursor: pointer;
}

/* Custom dropdown arrow for all browsers - only on select fields */
.profile-modal-select-field::after {
    content: '';
    position: absolute;
    right: 24px;
    top: 50%;
    width: 11px;
    height: 6px;
    pointer-events: none;
    background: url('data:image/svg+xml;utf8,<svg width="11" height="6" viewBox="0 0 11 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L5.5 5L10 1" stroke="%23000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center center;
    transform: translateY(-50%);
    background-size: contain;
}

/* Action Buttons */
.profile-modal-actions {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: flex-start;
    margin-top: 40px;
    /* Spacing between form and buttons to match design */
}

.profile-modal-save-btn {
    background: #075cfb;
    color: #ffffff;
    border: none;
    border-radius: 100px;
    padding: 0 48px;
    height: 72px;
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.2s ease;
}

.profile-modal-save-btn:hover {
    background: #0647c7;
}

.profile-modal-cancel-btn {
    background: transparent;
    color: #075cfb;
    border: 1.5px solid #075cfb;
    border-radius: 100px;
    padding: 0 48px;
    height: 72px;
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.profile-modal-cancel-btn:hover {
    background: rgba(7, 92, 251, 0.06);
    color: #075cfb;
    border-color: #075cfb;
}

/* Profile validation error styles */
.profile-modal-input-field.profile-input-error {
    border-color: #dc3545;
}

.profile-error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
    font-weight: var(--font-weight-medium);
    /* Compensate for the input group's 10px gap to achieve 8px total spacing (10px - 2px = 8px) */
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-modal {
        padding: 40px;
        width: 90vw;
        max-width: 400px;
    }

    .profile-modal-actions {
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    .profile-modal-save-btn,
    .profile-modal-cancel-btn {
        width: 100%;
        padding: 0 24px;
    }
}

@media (max-width: 480px) {
    .profile-modal {
        padding: 24px;
        border-radius: 24px;
    }

    /* Profile validation error styles */
    .profile-input-error {
        border-color: #dc3545 !important;
        box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25) !important;
    }

    .profile-error-message {
        color: #dc3545;
        font-size: 14px;
        margin-top: 8px;
        font-weight: var(--font-weight-medium);
    }

    .profile-modal-title h2 {
        font-size: 20px;
    }

    .profile-modal-title p {
        font-size: 14px;
    }
}