/**
 * TIME DISPLAY MODULE - CSS TEMPLATE
 * ===================================
 * MANIFESTE: Single source of truth for all time displays
 * Design Philosophy: Apple-style minimalist, space-efficient, harmonious scaling
 * Usage: Applied automatically by static/modules/time.js
 */

/* Main Container - Responsive and minimal */
.time-display-apple {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    gap: 12px;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Main Time Value - Elegant typography */
.time-value-apple {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    font-weight: 300;
    letter-spacing: -0.02em;
    text-align: center;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Clock display - Subtle, smaller */
.time-value-apple[data-time-mode="clock"] {
    font-size: 2.5rem;
    color: var(--text-primary, #ffffff);
    text-shadow: none;
}

/* Timer display - Prominent, larger */
.time-value-apple[data-time-mode="timer"] {
    font-size: var(--timer-font-size, 3.5rem);
    color: var(--color-warning, #ffd600);
    text-shadow: 0 0 20px rgba(255, 214, 0, 0.15);
}

/* Label - Subtle and refined */
.time-label-apple {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    margin-top: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scaling behavior - Intelligent harmony */
.time-display-apple[data-time-mode="timer"] {
    transform-origin: center top;
}

/* Responsive: Tablet */
@media (max-width: 768px) {
    .time-display-apple {
        padding: 24px 16px;
        gap: 10px;
    }
    
    .time-value-apple[data-time-mode="clock"] {
        font-size: 2rem;
    }
    
    .time-value-apple[data-time-mode="timer"] {
        font-size: var(--timer-font-size-tablet, var(--timer-font-size, 3rem));
    }
    
    .time-label-apple {
        font-size: 0.7rem;
    }
}

/* Responsive: Mobile */
@media (max-width: 480px) {
    .time-display-apple {
        padding: 20px 12px;
        gap: 8px;
    }
    
    .time-value-apple[data-time-mode="clock"] {
        font-size: 1.75rem;
    }
    
    .time-value-apple[data-time-mode="timer"] {
        font-size: var(--timer-font-size-mobile, var(--timer-font-size, 2.5rem));
    }
    
    .time-label-apple {
        font-size: 0.65rem;
        letter-spacing: 0.06em;
    }
}

/* Container Layouts */

/* Admin page: Clock and Timer side by side (horizontal) */
.time-display-section {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.time-display-section > div {
    flex: 1;
    min-width: 0;
}

/* Public page: Clock above Timer (vertical) */
.time-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.time-info > div {
    min-width: 0;
}

/* Ensure displays don't overflow in grid */
.time-display-section > div,
.time-info > div {
    min-width: 0;  /* Prevent grid items from overflowing */
}

/* Responsive: Tablet - Stack vertically on admin if needed */
@media (max-width: 768px) {
    .time-display-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .time-info {
        gap: 16px;
    }
}

/* Responsive: Mobile - Stack vertically */
@media (max-width: 480px) {
    .time-display-section,
    .time-info {
        gap: 12px;
    }
}

/* Print styles - Ensure readability */
@media print {
    .time-display-apple {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}
