/* Jambvant - Modal Styles */
/* Glass-Neumorphism Blend for Modern UI */

/* ========================================
   GLASS-NEUMORPHIC MODAL OVERLAYS
   ======================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

/* Profile Modal Styles */
.profile-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    z-index: 2001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.profile-modal-overlay.active {
    display: flex;
}

/* ========================================
   GLASS-NEUMORPHIC MODAL CONTAINERS
   ======================================== */

.profile-modal-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        /* Neumorphic outer shadows */
        12px 12px 36px rgba(0, 0, 0, 0.1),
        -12px -12px 36px rgba(255, 255, 255, 0.9),
        /* Inner glass highlight */
        inset 0 2px 2px rgba(255, 255, 255, 0.9),
        inset 0 -1px 1px rgba(0, 0, 0, 0.02);
    width: 380px;
    max-width: 100%;
    max-height: 90vh;
    position: relative;
    animation: profileModalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Dark mode modal glass-neumorphism */
[data-theme="dark"] .modal-overlay,
[data-theme="dark"] .profile-modal-overlay {
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px) saturate(130%);
    -webkit-backdrop-filter: blur(8px) saturate(130%);
}

[data-theme="dark"] .profile-modal-container {
    background: rgba(28, 28, 28, 0.94);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        /* Dark neumorphic shadows */
        12px 12px 36px rgba(0, 0, 0, 0.45),
        -12px -12px 36px rgba(50, 50, 50, 0.25),
        /* Inner highlight */
        inset 0 2px 2px rgba(255, 255, 255, 0.04),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1);
}

@keyframes profileModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.profile-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-white);
    border: none;
    font-size: 24px;
    color: var(--text-gray);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-modal-close:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
    transform: scale(1.1);
}

.profile-modal-content {
    padding: 30px;
    text-align: center;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.2;
}

.profile-tier-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.profile-tier-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.profile-tier-badge.bronze {
    background: radial-gradient(circle at 30% 30%, #CD7F32, #8B5A3C);
}

.profile-tier-badge.silver {
    background: radial-gradient(circle at 30% 30%, #D3D3D3, #A8A9A9);
}

.profile-tier-badge.gold {
    background: radial-gradient(circle at 30% 30%, #FFD700, #FFC700);
}

.profile-tier-badge.platinum {
    background: radial-gradient(circle at 30% 30%, #E6CCFF, #B997EC);
}

.profile-tier-badge.emerald {
    background: radial-gradient(circle at 30% 30%, #7FD8BE, #50C878);
}

.profile-tier-badge.diamond {
    background: radial-gradient(circle at 30% 30%, #00BFFF, #1E90FF);
}

.profile-tier-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.profile-helps {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.profile-helps-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-purple);
    display: block;
    margin-bottom: 4px;
}

.profile-bio {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 16px;
    padding: 0 10px;
}

.profile-location {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.profile-location::before {
    content: '📍';
    font-size: 16px;
}

.profile-connect-btn {
    width: 100%;
    padding: 14px 24px;
    background-color: #FF8C00;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
}

.profile-connect-btn:hover {
    background-color: #E07B00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
}

.profile-connect-btn:active {
    transform: translateY(0);
}

.profile-connect-btn.connected {
    background-color: var(--color-success);
}

/* Login/Signup Modal Styles - Glass-Neumorphism Blend */
.modal-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        /* Neumorphic outer shadows */
        12px 12px 36px rgba(0, 0, 0, 0.1),
        -12px -12px 36px rgba(255, 255, 255, 0.9),
        /* Inner glass highlight */
        inset 0 2px 2px rgba(255, 255, 255, 0.9),
        inset 0 -1px 1px rgba(0, 0, 0, 0.02);
    width: 400px;
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Dark mode modal container glass-neumorphism */
[data-theme="dark"] .modal-container {
    background: rgba(28, 28, 28, 0.94);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        /* Dark neumorphic shadows */
        12px 12px 36px rgba(0, 0, 0, 0.45),
        -12px -12px 36px rgba(50, 50, 50, 0.25),
        /* Inner highlight */
        inset 0 2px 2px rgba(255, 255, 255, 0.04),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 24px 24px 0 24px;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.modal-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    font-style: normal;
    color: var(--text-dark);
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: -0.3px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-light);
    border: none;
    font-size: 20px;
    font-weight: 400;
    color: var(--text-gray);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.modal-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin: 0 24px;
}

.modal-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.modal-tab.active {
    color: #FF8C00;
}

.modal-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #FF8C00;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    font-style: normal;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-style: normal;
    color: var(--text-dark);
    background-color: var(--bg-white);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.15);
}

.form-input::placeholder {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-style: normal;
    color: var(--text-gray);
    opacity: 0.7;
}

.btn-modal-primary {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-purple);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    font-style: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-modal-primary:hover:not(:disabled) {
    background-color: var(--primary-purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.btn-modal-primary:disabled {
    background-color: #CCC;
    cursor: not-allowed;
    opacity: 0.6;
}

.input-with-audio {
    position: relative;
}

.audio-record-btn {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.audio-record-btn:hover {
    background: #4a3bc7;
    transform: scale(1.05);
}

.audio-record-btn.recording {
    background: #FF4444;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
}

.audio-record-btn.processing {
    background: #FFA500;
    animation: spin 1s linear infinite;
}

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

.form-input.with-audio {
    padding-right: 45px;
}

textarea.form-input.with-audio {
    padding-right: 50px;
}

.error-message {
    color: #FF4444;
    font-size: 14px;
    margin-top: 4px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Terms Consent Checkbox Styles */
.terms-consent-wrapper {
    margin: 0;
}

.terms-consent-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 12px;
    line-height: 1.5;
}

.terms-consent-checkbox {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 2px 0 0 0;
    cursor: pointer;
    accent-color: #FF8C00;
}

.terms-consent-text {
    font-size: 14px;
    color: var(--text-dark);
    flex: 1;
}

.terms-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.terms-link:hover {
    color: #FF8C00;
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-gray);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #e0e0e0;
}

.divider::before {
    margin-right: 12px;
}

.divider::after {
    margin-left: 12px;
}

.btn-google {
    width: 100%;
    padding: 12px;
    background-color: white;
    border: 1px solid #DDD;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.btn-google:hover {
    background-color: var(--bg-light);
    border-color: #999;
}

.google-icon {
    width: 20px;
    height: 20px;
}

.btn-linkedin {
    width: 100%;
    padding: 12px;
    background-color: #0077B5;
    color: white;
    border: 1px solid #0077B5;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    margin-top: 12px;
}

.btn-linkedin:hover {
    background-color: #005582;
    border-color: #005582;
}

.linkedin-icon {
    width: 20px;
    height: 20px;
}

/* Custom Scrollbar Styles for Modal Bodies */
.modal-body::-webkit-scrollbar,
.profile-modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track,
.profile-modal-content::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb,
.profile-modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover,
.profile-modal-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Zoom-aware modal adjustments */
@media screen and (min-resolution: 1.25dppx) {
    .modal-container,
    .profile-modal-container {
        max-height: 85vh;
    }
}

@media screen and (min-resolution: 1.5dppx) {
    .modal-container,
    .profile-modal-container {
        max-height: 80vh;
    }
}

@media screen and (min-resolution: 2dppx) {
    .modal-container,
    .profile-modal-container {
        max-height: 75vh;
    }
}

/* Ensure modal header doesn't shrink when scrolling */
.modal-header {
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 480px) {
    .profile-modal-container {
        width: 100%;
        max-width: 340px;
    }

    .profile-modal-content {
        padding: 24px 20px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 30px;
    }

    .profile-name {
        font-size: 20px;
    }

    .profile-helps-number {
        font-size: 24px;
    }

    .modal-container {
        width: 90%;
    }

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

    .modal-body {
        padding: 20px;
    }
}

/* Password Toggle Styles */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .password-input {
    width: 100%;
    padding-right: 45px;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: color 0.2s ease;
    z-index: 10;
}

.password-toggle-btn:hover {
    color: var(--text-dark);
}

.password-toggle-btn:focus {
    outline: none;
    color: #FF8C00;
}

.password-toggle-btn .eye-icon {
    width: 20px;
    height: 20px;
}

/* Toggle between eye-open and eye-closed icons */
.password-toggle-btn[data-visible="true"] .eye-open {
    display: none;
}

.password-toggle-btn[data-visible="true"] .eye-closed {
    display: block !important;
}

.password-toggle-btn[data-visible="false"] .eye-open {
    display: block;
}

.password-toggle-btn[data-visible="false"] .eye-closed {
    display: none;
}

