/* /shared/_components/ProfilePopup/ProfilePopup.css */
#profile-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#profile-popup-overlay.popup-hidden {
    opacity: 0;
    pointer-events: none;
}

.profile-popup-container {
    background: #ffffff;
    width: 900px;
    height: 700px;
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#profile-popup-overlay.popup-hidden .profile-popup-container {
    transform: scale(0.95);
}

/* HEADER */
.profile-popup-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-popup-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #64748b;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* CONTENT WRAPPER */
.profile-content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* SIDEBAR */
.profile-sidebar {
    width: 260px;
    background: #f8fafc;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
}

.user-mini-profile {
    text-align: center;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.avatar-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.edit-avatar-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary-accent, #1877F2);
    color: white;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

.user-mini-profile h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.user-mini-profile span {
    font-size: 13px;
    color: #64748b;
}

.profile-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    color: #475569;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.profile-nav-item:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.profile-nav-item.active {
    background: #e0f2fe;
    /* Light blue bg */
    color: var(--primary-accent, #1877F2);
    font-weight: 600;
}

.profile-nav-item i {
    width: 18px;
    text-align: center;
}

/* MAIN CONTENT */
.profile-main-content {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
}

.profile-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.profile-tab-content.active {
    display: block;
}

.profile-tab-content h3 {
    margin: 0 0 24px;
    font-size: 20px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FORM ELEMENTS */
.setting-group {
    margin-bottom: 24px;
}

.setting-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #1e293b;
}

.profile-input,
.custom-select-wrapper select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.profile-input:focus,
.custom-select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-accent, #1877F2);
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
}

.profile-input:disabled {
    background: #f1f5f9;
    color: #94a3b8;
}

.setting-desc {
    margin: 6px 0 0;
    font-size: 12px;
    color: #64748b;
}

/* TOGGLE SWITCH */
.setting-item-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #f1f5f9;
}

.setting-item-toggle:first-of-type {
    border-top: none;
}

.toggle-info {
    display: flex;
    flex-direction: column;
}

.toggle-info span {
    font-weight: 500;
    font-size: 14px;
}

.toggle-info small {
    color: #64748b;
    font-size: 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary-accent, #1877F2);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* THEME SELECTOR */
.theme-selector {
    display: flex;
    gap: 12px;
}

.theme-option {
    flex: 1;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.theme-option.active {
    border-color: var(--primary-accent);
    background: #eff6ff;
    color: var(--primary-accent);
    font-weight: 600;
}

/* FOOTER */
.profile-popup-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8fafc;
}

.btn-text {
    background: none;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
}

.btn-text:hover {
    color: #1e293b;
}

.btn-primary {
    background: var(--primary-accent, #1877F2);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #1464cc;
}

.btn-profile-action {
    background: white;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-profile-action:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .profile-popup-container {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .profile-content-wrapper {
        flex-direction: column;
        overflow-y: auto;
        /* Scroll the wrapper */
    }

    .profile-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 16px;
        flex-shrink: 0;
    }

    .user-mini-profile {
        display: flex;
        /* Horizontal compact profile on mobile */
        align-items: center;
        gap: 15px;
        margin-bottom: 16px;
        text-align: left;
    }

    .avatar-container {
        width: 60px;
        height: 60px;
        margin: 0;
    }

    .user-mini-profile h3 {
        font-size: 15px;
    }

    .profile-nav-menu {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        gap: 8px;
        padding-bottom: 5px;
    }

    .profile-nav-item {
        width: auto;
        border: 1px solid #e2e8f0;
        padding: 6px 12px;
    }

    .profile-nav-item.active {
        background: #e0f2fe;
        border-color: #bae6fd;
    }

    .profile-main-content {
        padding: 20px;
        /* Reduced padding */
        overflow: visible;
        /* Let wrapper scroll */
    }
}