/* CLEBER Queue Sampling Dashboard - Custom Styles */

/* Brand Card Styles - Professional with depth */
.brand-card {
    cursor: pointer;
    height: 100%;
}

.brand-card .card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
    position: relative;
    height: 100%;
}

.brand-card:hover .card {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.brand-card-selected .card {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.brand-card-header {
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.brand-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.brand-logo-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 32px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.brand-card-body {
    padding: 16px 24px 24px;
    background: white;
}

.brand-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    text-align: center;
}

.brand-card-subtitle {
    font-size: 13px;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 0;
}

.brand-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* Checkmark for selected cards */
.brand-card-selected .card::after {
    content: '✓';
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    background: white;
    color: #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
    z-index: 3;
    animation: checkmarkPop 0.3s ease-out;
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Preview section styles */
.preview-card-header {
    position: relative;
    overflow: hidden;
}

.preview-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

/* Stat boxes in preview */
.stat-box {
    text-align: center;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Loading spinner overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Dropdown menu height limit - show max 5 items with scroll */
/* Target all possible Dash dropdown menu classes */
#filter-queues .Select-menu-outer,
#filter-agents .Select-menu-outer,
#filter-queues .Select-menu,
#filter-agents .Select-menu,
#filter-queues .VirtualizedSelectOption,
#filter-agents .VirtualizedSelectOption {
    max-height: 200px !important;
}

/* For Dash 2.x+ with css- prefixed classes */
div[id="filter-queues"] div[class*="menu"],
div[id="filter-agents"] div[class*="menu"] {
    max-height: 200px !important;
    overflow-y: auto !important;
}

/* Target the menu list specifically */
div[id="filter-queues"] div[class*="MenuList"],
div[id="filter-agents"] div[class*="MenuList"] {
    max-height: 200px !important;
    overflow-y: auto !important;
}

/* More specific targeting */
.dash-dropdown .Select-menu-outer {
    max-height: 200px !important;
}

.dash-dropdown .Select-menu {
    max-height: 200px !important;
    overflow-y: auto !important;
}

/* Universal dropdown limiter */
#filter-queues > div > div:nth-child(2),
#filter-agents > div > div:nth-child(2) {
    max-height: 200px !important;
    overflow-y: auto !important;
}

/* Most aggressive selector - targets the actual dropdown menu portal */
#filter-queues + div,
#filter-agents + div {
    max-height: 200px !important;
}

/* Target React-Select menu specifically */
#filter-queues .css-26l3qy-menu,
#filter-agents .css-26l3qy-menu,
#filter-queues [class*="-menu"],
#filter-agents [class*="-menu"] {
    max-height: 200px !important;
}

#filter-queues .css-4ljt47-MenuList,
#filter-agents .css-4ljt47-MenuList,
#filter-queues [class*="-MenuList"],
#filter-agents [class*="-MenuList"] {
    max-height: 200px !important;
    overflow-y: auto !important;
}

/* Checklist filter styles - checkbox on RIGHT */
#filter-queues .form-check,
#filter-agents .form-check {
    padding: 6px 8px;
    margin-bottom: 2px;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
}

#filter-queues .form-check:hover,
#filter-agents .form-check:hover {
    background-color: #f8f9fa;
}

/* Make checkboxes more prominent and position on RIGHT */
#filter-queues .form-check-input,
#filter-agents .form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border: 2px solid #667eea;
    margin-left: 8px;
    margin-right: 0;
    flex-shrink: 0;
    position: relative;
    float: none;
}

#filter-queues .form-check-input:checked,
#filter-agents .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

#filter-queues .form-check-input:focus,
#filter-agents .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

#filter-queues .form-check-label,
#filter-agents .form-check-label {
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    margin-left: 0;
    margin-right: auto;
    color: #495057;
    flex-grow: 1;
    text-align: left;
}

/* Highlight checked items */
#filter-queues .form-check-input:checked ~ .form-check-label,
#filter-agents .form-check-input:checked ~ .form-check-label {
    color: #667eea;
    font-weight: 500;
}

#filter-queues .form-check-label:hover,
#filter-agents .form-check-label:hover {
    color: #667eea;
}

/* Scrollbar styling for filter boxes */
#filter-queues > div,
#filter-agents > div {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

#filter-queues > div::-webkit-scrollbar,
#filter-agents > div::-webkit-scrollbar {
    width: 6px;
}

#filter-queues > div::-webkit-scrollbar-track,
#filter-agents > div::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#filter-queues > div::-webkit-scrollbar-thumb,
#filter-agents > div::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

#filter-queues > div::-webkit-scrollbar-thumb:hover,
#filter-agents > div::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

/* Calendar week row hover effects */
.results-calendar-week-row:hover {
    background-color: #cfe2ff !important;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.results-calendar-week-row:hover td {
    color: #1c1565 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .brand-card-header {
        padding: 20px;
    }

    .brand-logo-circle {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }

    .brand-card-title {
        font-size: 18px;
    }
}
