/* WebFort Status Page - Additional Styles */

/* Status dot pulse animation */
.status-dot {
    position: relative;
}
.status-dot::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: inherit;
    animation: statusPulse 2s ease-in-out infinite;
    opacity: 0.5;
}
@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 0; }
}

/* Overall status banner */
.status-banner {
    transition: all 0.3s ease;
}
.status-banner.operational {
    background: linear-gradient(135deg, rgba(200, 255, 0, 0.15), rgba(200, 255, 0, 0.05));
    border-color: rgba(200, 255, 0, 0.3);
}
.status-banner.degraded {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.15), rgba(250, 204, 21, 0.05));
    border-color: rgba(250, 204, 21, 0.3);
}
.status-banner.partial_outage {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.05));
    border-color: rgba(249, 115, 22, 0.3);
}
.status-banner.major_outage {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border-color: rgba(239, 68, 68, 0.3);
}
.status-banner.maintenance {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    border-color: rgba(59, 130, 246, 0.3);
}

/* Server group accordion */
.server-group {
    transition: all 0.3s ease;
}
.server-group:hover {
    transform: translateY(-2px);
}
.server-group-header {
    cursor: pointer;
}
.server-group-servers {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}
.server-group.expanded .server-group-servers {
    grid-template-rows: 1fr;
}
.server-group-servers-inner {
    overflow: hidden;
}

/* Status bar */
.status-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}
.status-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}
.status-bar-fill.operational { background: #c8ff00; }
.status-bar-fill.degraded { background: #facc15; }
.status-bar-fill.partial_outage { background: #f97316; }
.status-bar-fill.major_outage { background: #ef4444; }
.status-bar-fill.maintenance { background: #3b82f6; }

/* Incident timeline */
.incident-timeline {
    position: relative;
    padding-left: 24px;
}
.incident-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}
.incident-update {
    position: relative;
    padding-bottom: 20px;
}
.incident-update:last-child {
    padding-bottom: 0;
}
.incident-update::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: #0a0f1c;
}
.incident-update.investigating::before { border-color: #ef4444; background: rgba(239, 68, 68, 0.3); }
.incident-update.identified::before { border-color: #f97316; background: rgba(249, 115, 22, 0.3); }
.incident-update.monitoring::before { border-color: #facc15; background: rgba(250, 204, 21, 0.3); }
.incident-update.resolved::before { border-color: #c8ff00; background: rgba(200, 255, 0, 0.3); }

/* Admin form styles */
.admin-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 15px;
    transition: all 0.2s ease;
}
.admin-input:focus {
    outline: none;
    border-color: rgba(200, 255, 0, 0.5);
    background: rgba(255, 255, 255, 0.08);
}
.admin-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.admin-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.admin-textarea {
    min-height: 120px;
    resize: vertical;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.admin-btn-primary {
    background: #c8ff00;
    color: #0a0f1c;
}
.admin-btn-primary:hover {
    box-shadow: 0 0 30px rgba(200, 255, 0, 0.3);
    transform: translateY(-2px);
}
.admin-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.admin-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}
.admin-btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.admin-btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.admin-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Status select colors */
.status-select-operational { background: rgba(200, 255, 0, 0.2); color: #c8ff00; }
.status-select-degraded { background: rgba(250, 204, 21, 0.2); color: #facc15; }
.status-select-partial_outage { background: rgba(249, 115, 22, 0.2); color: #f97316; }
.status-select-major_outage { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.status-select-maintenance { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }

/* Checkbox styling */
.admin-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    appearance: none;
    position: relative;
}
.admin-checkbox:checked {
    background: #c8ff00;
    border-color: #c8ff00;
}
.admin-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #0a0f1c;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Auto-refresh indicator */
.refresh-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}
.refresh-indicator .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c8ff00;
    animation: refreshPulse 2s ease-in-out infinite;
}
@keyframes refreshPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 90-Day Uptime Bar */
.uptime-bar {
    display: flex;
    gap: 1px;
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
}
.uptime-day {
    flex: 1;
    min-width: 2px;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
    position: relative;
}
.uptime-day:hover {
    transform: scaleY(1.3);
    opacity: 0.8;
    z-index: 1;
}

/* Scheduled Maintenance Banner */
.maintenance-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    border-color: rgba(59, 130, 246, 0.3);
}
.maintenance-banner .maintenance-icon {
    animation: maintenancePulse 2s ease-in-out infinite;
}
@keyframes maintenancePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Upcoming Maintenance Card */
.upcoming-maintenance {
    border-left: 3px solid #3b82f6;
}
.upcoming-maintenance .countdown {
    font-family: 'Space Mono', monospace;
}

/* History Page */
.history-incident {
    transition: all 0.2s ease;
}
.history-incident:hover {
    background: rgba(255, 255, 255, 0.05);
}
.history-incident-timeline {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.history-incident.expanded .history-incident-timeline {
    max-height: 1000px;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 4px;
}
.pagination a, .pagination span {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.pagination a {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}
.pagination a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}
.pagination .active {
    background: #c8ff00;
    color: #0a0f1c;
}
.pagination .disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Mobile improvements */
@media (max-width: 640px) {
    .server-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .incident-timeline {
        padding-left: 20px;
    }
    .incident-timeline::before {
        left: 5px;
    }
    .incident-update::before {
        left: -17px;
        width: 10px;
        height: 10px;
    }
}
