/**
 * Attendance Counter - Header Layout Styles
 * Use this for header/navigation implementations
 */

/* Header-specific container */
.attendance-counter-header {
    --header-height: 60px;
    --header-padding: 12px 20px;
    --header-font-size: 14px;
    --header-count-size: 18px;
}

/* Compact header layout */
.attendance-counter-header .attendance-counter-slider {
    height: var(--header-height);
    background: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    overflow: hidden;
}

.attendance-counter-header .attendance-counter-slide {
    height: var(--header-height);
    padding: var(--header-padding);
    display: flex;
    align-items: center;
    justify-content: center;
}

.attendance-counter-header .attendance-counter-content {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: center;
    width: 100%;
}

/* Horizontal layout for header */
.attendance-counter-header .title {
    font-size: var(--header-font-size);
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    margin: 0;
}

.attendance-counter-header .count-section {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: #ffffff;
}

.attendance-counter-header .count {
    font-size: var(--header-count-size);
    font-weight: 700;
    color: #00ff88;
}

.attendance-counter-header .limit {
    font-size: var(--header-font-size);
    color: #cccccc;
}

/* Compact progress bar */
.attendance-counter-header .progress-bar {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.attendance-counter-header .progress-fill {
    height: 100%;
    background: #00ff88;
    transition: width 0.3s ease;
}

/* Compact navigation */
.attendance-counter-header .attendance-counter-navigation {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}

.attendance-counter-header .attendance-counter-nav {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 12px;
}

.attendance-counter-header .attendance-counter-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Compact dots */
.attendance-counter-header .attendance-counter-dots {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
}

.attendance-counter-header .attendance-counter-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.attendance-counter-header .attendance-counter-dot.active {
    background: #00ff88;
}

/* Loading and error states */
.attendance-counter-header .loading-state,
.attendance-counter-header .error-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ffffff;
    font-size: var(--header-font-size);
}

.attendance-counter-header .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #00ff88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .attendance-counter-header {
        --header-height: 50px;
        --header-padding: 8px 16px;
        --header-font-size: 12px;
        --header-count-size: 16px;
    }
    
    .attendance-counter-header .title {
        display: none;
    }
    
    .attendance-counter-header .progress-bar {
        width: 40px;
    }
}

@media (max-width: 480px) {
    .attendance-counter-header {
        --header-height: 40px;
        --header-padding: 6px 12px;
        --header-count-size: 14px;
    }
}

/* Single slide optimization */
.attendance-counter-header .attendance-counter-slider[data-slides="1"] {
    position: relative;
}

.attendance-counter-header .attendance-counter-slider[data-slides="1"] .attendance-counter-navigation,
.attendance-counter-header .attendance-counter-slider[data-slides="1"] .attendance-counter-dots {
    display: none;
}

/* Animation for count updates */
.attendance-counter-header .count.updated {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.attendance-counter-header .count.updated::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 0.6s ease-out;
}

@keyframes pulse {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

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