/* ══ Profile Side Panel (Updated from Modal) ══ */
#profile-overlay.opacity-0 {
    opacity: 0;
}
#profile-overlay:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Side panel mode (when on wall) */
body.wall-open #profile-overlay {
    display: block !important;
}

.profile-side-panel {
    background: var(--bg-sidebar);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-right: 1px solid var(--glass-border);
    box-shadow: 20px 0 50px rgba(0,0,0,0.15);
    z-index: 200; /* Поднимаем выше всего */
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 420px;
    display: flex;
    flex-direction: column;
}

/* Modal mode (centered when NOT on wall) */
body:not(.wall-open) .profile-side-panel {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
    height: 90vh;
    max-height: 800px;
    border-radius: 32px;
    transform: scale(0.95);
}

body:not(.wall-open) #profile-overlay:not(.opacity-0) .profile-side-panel {
    transform: scale(1);
}

/* Side panel mode (on wall) */
body.wall-open .profile-side-panel {
    transform: translateX(-100%);
}

body.wall-open #profile-overlay:not(.opacity-0) .profile-side-panel {
    transform: translateX(0);
}

/* Fields Layout */
.profile-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-left: 2px;
    opacity: 0.8;
}

.profile-input {
    background: rgba(var(--bg-main-rgb), 0.05) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.profile-input::placeholder {
    color: var(--text-muted);
    opacity: 0.4;
}

.profile-input:focus {
    border-color: var(--accent-color) !important;
    background: rgba(var(--bg-main-rgb), 0.1) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 15%, transparent);
}

.profile-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(var(--bg-main-rgb), 0.03) !important;
}

/* Custom styles for date input */
input[type="date"].profile-input {
    position: relative;
}
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(var(--theme-invert, 0.5));
    cursor: pointer;
}

.profile-verify-block {
    background: rgba(var(--accent-color-rgb, 59, 130, 246), 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 18px;
    margin-top: 10px;
}

/* Avatar transition */
#profile-avatar {
    transition: all 0.3s ease;
}

/* Hide scrollbar but allow scrolling */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .profile-side-panel {
        width: 100% !important;
    }
}
