/**
 * Maintenance Page Styles
 *
 * Standalone styles for the maintenance page.
 * Matches the PPL Questions dark theme aesthetic.
 */

/* =============================================
   MAINTENANCE PAGE ONLY (maintenance-page.php)
   These styles use body.maintenance-page scope
   ============================================= */

body.maintenance-page {
    --maintenance-bg: #0a1628;
    --maintenance-card: #1a2744;
    --maintenance-border: #2a3a54;
    --maintenance-text: #e2e8f0;
    --maintenance-text-muted: #94a3b8;
    --maintenance-primary: #368BC1;
    --maintenance-primary-hover: #2d7aad;
    --maintenance-accent: #f39c12;

    margin: 0;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--maintenance-bg);
    color: var(--maintenance-text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.6;
}

body.maintenance-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.maintenance-page .maintenance-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

body.maintenance-page .maintenance-content {
    background: var(--maintenance-card);
    border: 1px solid var(--maintenance-border);
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

body.maintenance-page .maintenance-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--maintenance-accent) 0%, #e67e22 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

body.maintenance-page .maintenance-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(243, 156, 18, 0);
    }
}

body.maintenance-page .maintenance-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--maintenance-text);
}

body.maintenance-page .maintenance-message {
    font-size: 16px;
    color: var(--maintenance-text-muted);
    margin-bottom: 28px;
    line-height: 1.7;
}

body.maintenance-page .maintenance-eta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(54, 139, 193, 0.1);
    border: 1px solid rgba(54, 139, 193, 0.2);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 28px;
}

body.maintenance-page .eta-label {
    font-size: 12px;
    color: var(--maintenance-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.maintenance-page .eta-timer-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.maintenance-page .eta-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

body.maintenance-page .eta-icon svg {
    width: 24px;
    height: 24px;
    color: var(--maintenance-primary);
    display: block;
}

body.maintenance-page .eta-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--maintenance-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* Overtime Section (when estimated time exceeded) */
body.maintenance-page .maintenance-overtime {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
    text-align: left;
}

body.maintenance-page .overtime-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(220, 53, 69, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.maintenance-page .overtime-icon svg {
    width: 22px;
    height: 22px;
    color: #dc3545;
}

body.maintenance-page .overtime-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.maintenance-page .overtime-title {
    font-size: 16px;
    font-weight: 700;
    color: #dc3545;
}

body.maintenance-page .overtime-message {
    font-size: 14px;
    color: var(--maintenance-text-muted);
    line-height: 1.6;
}

/* Overtime icon state */
body.maintenance-page .maintenance-icon.overtime {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    animation: none;
}

/* Back Online Section (when maintenance ends early) */
body.maintenance-page .maintenance-back-online {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
    text-align: left;
}

body.maintenance-page .back-online-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(34, 197, 94, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.maintenance-page .back-online-icon svg {
    width: 22px;
    height: 22px;
    color: #22c55e;
}

body.maintenance-page .back-online-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.maintenance-page .back-online-title {
    font-size: 16px;
    font-weight: 700;
    color: #22c55e;
}

body.maintenance-page .back-online-message {
    font-size: 14px;
    color: var(--maintenance-text-muted);
    line-height: 1.6;
}

body.maintenance-page .back-online-redirect {
    font-size: 14px;
    color: var(--maintenance-text);
    margin-top: 4px;
}

body.maintenance-page .back-online-redirect span {
    font-weight: 700;
    color: #22c55e;
}

/* Back online icon state */
body.maintenance-page .maintenance-icon.back-online {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    animation: none;
}

body.maintenance-page .maintenance-info {
    margin-bottom: 28px;
}

body.maintenance-page .maintenance-info p {
    font-size: 14px;
    color: var(--maintenance-text-muted);
    margin-bottom: 8px;
}

body.maintenance-page .maintenance-info p:last-child {
    margin-bottom: 0;
}

body.maintenance-page .maintenance-info a {
    color: var(--maintenance-primary);
    text-decoration: none;
    transition: color 0.2s;
}

body.maintenance-page .maintenance-info a:hover {
    color: var(--maintenance-primary-hover);
    text-decoration: underline;
}

body.maintenance-page .refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--maintenance-primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

body.maintenance-page .refresh-btn:hover {
    background: var(--maintenance-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(54, 139, 193, 0.3);
}

body.maintenance-page .refresh-btn:active {
    transform: translateY(0);
}

body.maintenance-page .refresh-btn svg {
    width: 20px;
    height: 20px;
}

body.maintenance-page .maintenance-footer {
    text-align: center;
}

body.maintenance-page .maintenance-footer .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--maintenance-text-muted);
    font-size: 14px;
    font-weight: 500;
}

body.maintenance-page .maintenance-footer .logo img {
    border-radius: 8px;
}

/* Mobile responsive */
@media (max-width: 520px) {
    body.maintenance-page .maintenance-content {
        padding: 36px 24px;
    }

    body.maintenance-page .maintenance-icon {
        width: 64px;
        height: 64px;
    }

    body.maintenance-page .maintenance-icon svg {
        width: 32px;
        height: 32px;
    }

    body.maintenance-page .maintenance-title {
        font-size: 24px;
    }

    body.maintenance-page .maintenance-message {
        font-size: 15px;
    }

    body.maintenance-page .maintenance-eta {
        text-align: center;
    }

    body.maintenance-page .maintenance-overtime {
        flex-direction: column;
        text-align: center;
        padding: 16px 20px;
    }

    body.maintenance-page .overtime-icon {
        margin: 0 auto;
    }

    body.maintenance-page .overtime-text {
        align-items: center;
    }

    body.maintenance-page .overtime-message {
        text-align: center;
    }

    body.maintenance-page .maintenance-back-online {
        flex-direction: column;
        text-align: center;
        padding: 16px 20px;
    }

    body.maintenance-page .back-online-icon {
        margin: 0 auto;
    }

    body.maintenance-page .back-online-text {
        align-items: center;
    }

    body.maintenance-page .back-online-message,
    body.maintenance-page .back-online-redirect {
        text-align: center;
    }
}

/* =============================================
   TOP BAR MAINTENANCE MODE (index.php)
   ============================================= */

/* Top bar in maintenance mode - all theme modes */
.top.maintenance-active,
html.light-mode .top.maintenance-active,
html.dark-mode .top.maintenance-active,
html.dark-mode-auto .top.maintenance-active {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
}

.maintenance-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.maintenance-text {
    color: white;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.maintenance-disable-btn {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 6px 14px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
    white-space: nowrap;
}

.maintenance-disable-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .maintenance-indicator {
        margin-left: 8px;
    }

    .maintenance-text {
        display: none;
    }

    .maintenance-disable-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}
