/**
 * Haneko CodeShield - Dedicated System Status & Telemetry Stylesheet (public-status.css)
 * Used exclusively by status.php
 * 100% Mobile Responsive (320px to 4K) & Zero Inline CSS Policy
 * Clean, Compact, Anti-Wrapping SaaS Typography System
 */

/* ==========================================================================
   1. Status Hero & Overall Health Indicator
   ========================================================================== */
.clay-status-hero {
    text-align: center;
    padding: clamp(20px, 4vw, 40px) clamp(14px, 3vw, 24px);
    margin-bottom: clamp(18px, 3vw, 28px);
}

.clay-status-banner {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: #e8fbf1;
    border: 2.5px solid #86efac;
    border-radius: 999px;
    padding: 12px 24px;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.16);
    margin-bottom: 18px;
    max-width: 100%;
    box-sizing: border-box;
    text-align: left;
}

.clay-pulse-dot {
    width: 14px;
    height: 14px;
    background: #22c55e;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: clayPulse 2s infinite;
}

@keyframes clayPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 9px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.clay-status-banner-content {
    display: flex;
    flex-direction: column;
}

.clay-status-banner-text {
    font-size: clamp(15px, 2.5vw, 17px);
    font-weight: 900;
    color: #15803d;
    letter-spacing: -0.2px;
    line-height: 1.25;
}

.clay-status-banner-sub {
    font-size: 12.5px;
    color: #16a34a;
    font-weight: 700;
    margin-top: 2px;
    line-height: 1.3;
}

.clay-status-hero-title {
    font-size: clamp(22px, 4.5vw, 36px);
    font-weight: 900;
    color: var(--clay-brown-text);
    line-height: 1.22;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.clay-status-hero-sub {
    font-size: clamp(13.5px, 2vw, 15.5px);
    color: var(--clay-sub-text);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 500;
}

/* ==========================================================================
   2. Component Service Health Squircles (4-Grid)
   ========================================================================== */
.clay-service-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(14px, 2vw, 20px);
    margin-bottom: clamp(24px, 4vw, 36px);
}

.clay-service-card {
    background: #ffffff;
    border-radius: 22px;
    border: 2.5px solid var(--clay-border);
    box-shadow: var(--clay-shadow-squircle);
    padding: clamp(16px, 2.5vw, 20px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.clay-service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(138, 107, 85, 0.12);
}

.clay-service-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

/* 3D Squircle Badges for Services */
.clay-service-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.clay-service-card:hover .clay-service-icon-badge {
    transform: scale(1.08) rotate(4deg);
}

.clay-service-icon-badge svg,
.clay-service-icon-badge .clay-nav-svg,
.clay-service-icon-badge .clay-btn-svg {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    stroke-width: 2.3;
    display: block;
}

.clay-service-icon-badge.badge-mint {
    background: linear-gradient(135deg, #dcf8ea 0%, #b8f1d3 100%);
    color: #168a52;
    box-shadow: 0 6px 14px rgba(46, 175, 108, 0.2), inset 0 2px 4px #ffffff;
}

.clay-service-icon-badge.badge-purple {
    background: linear-gradient(135deg, #ede4fc 0%, #d8c7fa 100%);
    color: #6a35d9;
    box-shadow: 0 6px 14px rgba(123, 76, 230, 0.2), inset 0 2px 4px #ffffff;
}

.clay-service-icon-badge.badge-yellow {
    background: linear-gradient(135deg, #fef4cd 0%, #fde798 100%);
    color: #a66a03;
    box-shadow: 0 6px 14px rgba(224, 150, 20, 0.2), inset 0 2px 4px #ffffff;
}

.clay-service-icon-badge.badge-pink {
    background: linear-gradient(135deg, #fee2eb 0%, #fdbfd0 100%);
    color: #c92a58;
    box-shadow: 0 6px 14px rgba(230, 77, 126, 0.2), inset 0 2px 4px #ffffff;
}

/* Status Pills (Operational, Resolved) */
.clay-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.4px;
    padding: 4px 11px;
    border-radius: 999px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
}

.clay-status-pill.operational,
.clay-status-pill.resolved {
    background: #dcf8ea;
    color: #15803d;
    border: 1.5px solid #86efac;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.15);
}

.clay-pill-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.clay-service-name {
    font-size: 15.5px;
    font-weight: 900;
    color: var(--clay-brown-text);
    margin-bottom: 3px;
    line-height: 1.3;
}

.clay-service-latency {
    font-size: 12.8px;
    color: var(--clay-sub-text);
    font-weight: 600;
    line-height: 1.4;
}

.clay-service-footer {
    display: flex;
    align-items: center;
}

.clay-status-tag {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    width: fit-content;
    white-space: nowrap;
    line-height: 1;
}

.clay-status-tag.mint   { background: var(--clay-mint); color: var(--clay-mint-dark); }
.clay-status-tag.purple { background: var(--clay-lavender); color: var(--clay-lavender-dark); }
.clay-status-tag.yellow { background: var(--clay-yellow); color: var(--clay-yellow-dark); }
.clay-status-tag.pink   { background: var(--clay-pink); color: var(--clay-pink-dark); }

/* ==========================================================================
   3. 90-Day Uptime Visualizer (Zero Horizontal Scrollbar)
   ========================================================================== */
.clay-uptime-visual-card {
    background: var(--clay-card-tint);
    border-radius: clamp(20px, 3.5vw, 28px);
    border: 3px solid var(--clay-border);
    box-shadow: var(--clay-shadow-card);
    padding: clamp(18px, 3vw, 26px);
    margin-bottom: clamp(24px, 4vw, 36px);
    box-sizing: border-box;
}

.clay-uptime-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.clay-uptime-title {
    font-size: 14.5px;
    font-weight: 900;
    color: var(--clay-brown-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Fluid responsive bar chart - strictly NO horizontal scrollbar */
.clay-uptime-bars-grid {
    display: flex;
    gap: 2.5px;
    align-items: flex-end;
    height: 36px;
    margin-bottom: 10px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
}

.clay-day-bar {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    background: #34d399;
    border-radius: 3px;
    transition: transform 0.15s ease, background 0.15s ease;
    cursor: pointer;
}

.clay-day-bar:hover {
    background: #059669;
    transform: scaleY(1.15);
}

.clay-uptime-legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--clay-sub-text);
    font-weight: 700;
}

/* ==========================================================================
   4. Incident & Maintenance Log
   ========================================================================== */
.clay-incidents-card {
    background: #ffffff;
    border-radius: clamp(20px, 3.5vw, 28px);
    border: 2.5px solid var(--clay-border);
    box-shadow: var(--clay-shadow-squircle);
    padding: clamp(20px, 3.5vw, 32px);
    margin-bottom: clamp(28px, 5vw, 48px);
    box-sizing: border-box;
}

.clay-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--clay-yellow);
    color: var(--clay-yellow-dark);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    margin-bottom: 10px;
    line-height: 1;
}

.clay-section-title {
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 900;
    color: var(--clay-brown-text);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.clay-section-sub {
    font-size: clamp(13.5px, 1.8vw, 15px);
    color: var(--clay-sub-text);
    margin-bottom: 20px;
    line-height: 1.6;
    font-weight: 500;
}

.clay-incident-item {
    padding: 16px 0;
    border-bottom: 1.5px dashed #ecd5ba;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.clay-incident-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.clay-incident-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.clay-incident-date {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--clay-sub-text);
}

.clay-incident-title {
    font-size: clamp(15.5px, 2.2vw, 17px);
    font-weight: 900;
    color: var(--clay-brown-text);
    margin: 0 0 4px 0;
    line-height: 1.35;
    letter-spacing: -0.2px;
}

.clay-incident-desc {
    font-size: clamp(13px, 1.8vw, 14.5px);
    color: var(--clay-sub-text);
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

/* ==========================================================================
   5. CTA Section
   ========================================================================== */
.clay-cta-banner-card {
    background: linear-gradient(135deg, #f3ebfc 0%, #faedf3 100%);
    border-radius: clamp(20px, 3.5vw, 30px);
    border: 3px solid var(--clay-border);
    box-shadow: var(--clay-shadow-card);
    padding: clamp(24px, 4vw, 42px) clamp(16px, 3vw, 28px);
    text-align: center;
    margin-bottom: clamp(28px, 5vw, 48px);
    box-sizing: border-box;
}

.clay-cta-title {
    font-size: clamp(20px, 3.5vw, 28px);
    font-weight: 900;
    color: var(--clay-brown-text);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.clay-cta-sub {
    font-size: clamp(13.5px, 2vw, 15.5px);
    color: var(--clay-sub-text);
    max-width: 540px;
    margin: 0 auto 18px auto;
    line-height: 1.6;
}

.clay-cta-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==========================================================================
   6. Responsive Breakpoints (Tablet & Mobile Adaptations)
   ========================================================================== */
@media (max-width: 992px) {
    .clay-service-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 600px) {
    .clay-status-hero {
        padding: 18px 12px;
        margin-bottom: 16px;
    }

    .clay-status-banner {
        padding: 12px 14px;
        gap: 10px;
        border-radius: 18px;
        width: 100%;
    }

    .clay-status-banner-text {
        font-size: 14.5px;
    }

    .clay-status-banner-sub {
        font-size: 12px;
    }

    .clay-service-grid-4 {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }

    .clay-service-card {
        padding: 14px 16px;
        border-radius: 18px;
        gap: 10px;
    }

    .clay-service-name {
        font-size: 15px;
    }

    .clay-service-latency {
        font-size: 12px;
    }

    .clay-uptime-visual-card {
        padding: 14px 14px;
        border-radius: 18px;
        margin-bottom: 20px;
    }

    .clay-uptime-title {
        font-size: 13px;
    }

    .clay-uptime-bars-grid {
        gap: 1.5px;
        height: 26px;
        margin-bottom: 8px;
    }

    .clay-day-bar {
        border-radius: 1.5px;
    }

    .clay-uptime-legend {
        font-size: 11px;
    }

    .clay-incidents-card {
        padding: 16px 14px;
        border-radius: 18px;
    }

    .clay-section-title {
        font-size: 18px;
    }

    .clay-section-sub {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .clay-incident-item {
        padding: 14px 0;
    }

    .clay-incident-title {
        font-size: 15px;
    }

    .clay-incident-desc {
        font-size: 13px;
        line-height: 1.5;
    }

    .clay-cta-banner-card {
        padding: 22px 14px;
        border-radius: 20px;
    }

    .clay-cta-title {
        font-size: 19px;
    }

    .clay-cta-sub {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .clay-cta-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .clay-cta-actions .clay-btn-purple,
    .clay-cta-actions .clay-btn-demo {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
        padding: 12px 16px;
        font-size: 14px;
    }
}
