/* Custom Scrollbar for Sidebar */
.sidebar ::-webkit-scrollbar {
    width: 6px;
}
.sidebar ::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar ::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}
.sidebar ::-webkit-scrollbar-thumb:hover {
    background-color: rgba(107, 114, 128, 0.8);
}

/* Loader Animation */
.loader {
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #4f46e5;
    width: 20px;
    height: 20px;
    -webkit-animation: spin 1s linear infinite; /* Safari */
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Device Frames */
.device-frame-pc {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.device-frame-mobile {
    width: 375px;
    height: 736px; /* iPhone 6/7/8 Plus viewport height approx */
    margin: 0 auto;
    border: 12px solid #1f2937; /* Gray-800 */
    border-radius: 36px;
    background: white;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

/* Notch/Camera for Mobile Frame (Pseudo-elements) */
.device-frame-mobile::before {
    content: '';
    position: absolute;
    top: -8px; /* Inside the top border area */
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: #374151;
    border-radius: 10px;
    z-index: 10;
}

.device-frame-mobile iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* Hide Scrollbar for Mobile Frame Container */
.device-frame-mobile ::-webkit-scrollbar {
    display: none;
}

/* Nav Item Active State */
.nav-item.active {
    background-color: #eef2ff; /* indigo-50 */
    color: #4f46e5; /* indigo-600 */
    border-right: 3px solid #4f46e5;
}

.nav-item:hover:not(.active) {
    background-color: #f9fafb; /* gray-50 */
    color: #111827; /* gray-900 */
}

/* Group Header */
.group-header {
    cursor: pointer;
    user-select: none;
}
.group-header:hover {
    background-color: #f3f4f6;
}
.group-header .chevron {
    transition: transform 0.2s;
}
.group-header.collapsed .chevron {
    transform: rotate(-90deg);
}
