/* Frontend Dismissal Dashboard Styles */

.dq-dismissal-dashboard {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
}

/* Dashboard Header */
.dq-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.dq-header-info h2 {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 600;
}

.dq-header-info p {
    margin: 8px 0;
    font-size: 14px;
    opacity: 0.9;
}

.dq-header-info strong {
    font-weight: 600;
}

.dq-header-stats {
    display: flex;
    gap: 30px;
}

.dq-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px 25px;
    border-radius: 6px;
}

.dq-stat-number {
    display: block;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.dq-stat-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* Dismiss All Button */
.dq-dismiss-all-btn {
    background: #F44336;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 10px;
}

.dq-dismiss-all-btn:hover {
    background: #D32F2F;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.dq-dismiss-all-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Reset Button */
.dq-reset-btn {
    background: #FF5722;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dq-reset-btn:hover {
    background: #E64A19;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.dq-reset-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Sections */
.dq-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dq-section-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Families Grid - Smaller compact cards like original */
.dq-families-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

/* Family Card - Compact design */
.dq-family-card {
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    background: white;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dq-family-card.dq-clickable {
    cursor: pointer;
}

.dq-family-card.dq-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.dq-family-card.dq-loading {
    opacity: 0.6;
    pointer-events: none;
}

.dq-family-card.dq-ready {
    background: #FFC107;
    border-color: #FFA000;
    color: #000 !important;
}

.dq-family-card.dq-ready * {
    color: #000 !important;
}

.dq-family-card.dq-pending {
    background: #ff9800;
    border-color: #f57c00;
}

.dq-family-card.dq-pending * {
    color: white !important;
}

.dq-family-card.dq-departed {
    background: #4CAF50;
    border-color: #45a049;
    color: white !important;
}

.dq-family-card.dq-departed * {
    color: white !important;
}

.dq-family-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Family Name */
.dq-family-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    text-align: center;
    width: 100%;
}

/* Pickup ID next to family name */
.dq-pickup-id {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.85;
    display: inline;
}

/* Alternate Pickup IDs */
.dq-alt-pickup {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
    display: inline-block;
    margin: 0 2px;
}

/* Student Grades - Inline list */
.dq-family-students {
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    width: 100%;
}

.dq-student-grade {
    display: inline-block;
    margin: 2px;
    font-weight: 500;
}

.dq-student-grade a.dq-classroom-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.dq-student-grade a.dq-classroom-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Blue checkmark indicator for students who left classroom (ready=2) */
.dq-student-grade.dq-left-classroom {
    font-weight: 700;
    position: relative;
}

.dq-student-grade.dq-left-classroom::before {
    content: "✓ ";
    font-size: 14px;
    margin-right: 2px;
    color: #2196F3;
    font-weight: 900;
}

/* Badges */
.dq-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dq-badge-success {
    background: #4CAF50;
    color: white;
}

.dq-badge-pending {
    background: #ff9800;
    color: white;
}

.dq-badge-warning {
    background: #FFC107;
    color: #333;
}

.dq-badge-error {
    background: #F44336;
    color: white;
}

/* Alerts */
.dq-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.dq-alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #F44336;
}

.dq-alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid #ff9800;
}

.dq-alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4CAF50;
}

.dq-alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #2196F3;
}

/* No Data */
.dq-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* Footer */
.dq-footer {
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-top: 20px;
}

.dq-auto-refresh-notice {
    margin: 0;
    font-size: 13px;
    color: #666;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.dq-icon {
    font-size: 16px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dq-dismissal-dashboard {
        padding: 8px;
    }
    
    .dq-dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px 15px;
    }
    
    .dq-header-info h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }
    
    .dq-header-info p {
        font-size: 13px;
    }
    
    .dq-header-stats {
        justify-content: center;
        width: 100%;
        gap: 15px;
    }
    
    .dq-stat {
        flex: 1;
        padding: 10px 15px;
    }
    
    .dq-stat-number {
        font-size: 24px;
    }
    
    .dq-stat-label {
        font-size: 11px;
    }
    
    /* Compact sections on mobile */
    .dq-section {
        padding: 15px 10px;
        margin-bottom: 15px;
    }
    
    .dq-section-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    /* Two column grid on mobile for more compact view */
    .dq-families-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* More compact cards on mobile */
    .dq-family-card {
        padding: 10px 8px;
        min-height: 85px;
        border-radius: 5px;
    }
    
    .dq-family-name {
        font-size: 14px;
        margin-bottom: 6px;
        line-height: 1.3;
    }
    
    .dq-pickup-id {
        font-size: 13px;
        display: block;
        margin-top: 3px;
    }
    
    .dq-alt-pickup {
        font-size: 11px;
    }
    
    .dq-family-students {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .dq-student-grade {
        font-size: 12px;
        margin: 1px;
    }
    
    /* Compact buttons */
    .dq-dismiss-all-btn,
    .dq-reset-btn {
        padding: 10px 18px;
        font-size: 13px;
        margin: 5px;
    }
    
    /* Compact footer */
    .dq-footer {
        padding: 10px;
        margin-top: 15px;
    }
    
    .dq-auto-refresh-notice {
        font-size: 12px;
    }
    
    .dq-family-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .dq-pickup-id {
        text-align: left;
        min-width: auto;
    }
}

/* Extra small devices (phones in portrait, less than 576px) */
@media (max-width: 576px) {
    .dq-dismissal-dashboard {
        padding: 5px;
    }
    
    .dq-dashboard-header {
        padding: 15px 10px;
        gap: 12px;
    }
    
    .dq-header-info h2 {
        font-size: 20px;
    }
    
    .dq-header-info p {
        font-size: 12px;
        margin: 5px 0;
    }
    
    .dq-header-stats {
        gap: 10px;
    }
    
    .dq-stat {
        padding: 8px 12px;
    }
    
    .dq-stat-number {
        font-size: 20px;
    }
    
    .dq-section {
        padding: 12px 8px;
        margin-bottom: 12px;
    }
    
    .dq-section-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    /* Maintain 2 columns but even more compact */
    .dq-families-grid {
        gap: 8px;
    }
    
    .dq-family-card {
        padding: 8px 6px;
        min-height: 75px;
    }
    
    .dq-family-name {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .dq-pickup-id {
        font-size: 12px;
    }
    
    .dq-family-students {
        font-size: 11px;
    }
    
    .dq-student-grade {
        font-size: 11px;
    }
}

/* Print Styles */
@media print {
    .dq-auto-refresh-notice {
        display: none;
    }
}
