/* Downtime Monitor - Public Styles */

.dtm-monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dtm-service-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 16px;
    padding: 24px;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.dtm-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.25);
}

.dtm-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
}

.dtm-service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.dtm-service-header h3 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 700;
    color: #ffffff;
}

.dtm-status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dtm-status-up {
    background: rgba(67, 233, 123, 0.2);
    color: #43e97b;
    border: 1px solid rgba(67, 233, 123, 0.3);
}

.dtm-status-down {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
    border: 1px solid rgba(233, 69, 96, 0.3);
    animation: dtm-pulse 2s infinite;
}

.dtm-status-partial {
    background: rgba(246, 211, 101, 0.2);
    color: #f6d365;
    border: 1px solid rgba(246, 211, 101, 0.3);
}

@keyframes dtm-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.dtm-service-graph {
    height: 60px;
    margin: 16px 0;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.dtm-mini-graph {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    width: 100%;
    height: 100%;
}

.dtm-graph-bar {
    flex: 1;
    min-width: 4px;
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
}

.dtm-graph-empty {
    color: #666;
    font-size: 0.85em;
    text-align: center;
    width: 100%;
}

.dtm-service-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: #a0a0c0;
    margin-bottom: 16px;
}

.dtm-response-time {
    font-family: 'Courier New', monospace;
    color: #667eea;
}

.dtm-report-buttons {
    display: flex;
    gap: 10px;
}

.dtm-btn-report {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dtm-btn-report[data-status="down"] {
    background: linear-gradient(135deg, #e94560, #c73e54);
    color: white;
}

.dtm-btn-report[data-status="down"]:hover {
    background: linear-gradient(135deg, #ff6b6b, #e94560);
    transform: scale(1.02);
}

.dtm-btn-report[data-status="up"] {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: #1a5c2e;
}

.dtm-btn-report[data-status="up"]:hover {
    background: linear-gradient(135deg, #5af08f, #43e97b);
    transform: scale(1.02);
}

.dtm-btn-report:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Inline Status Shortcode */
.dtm-inline-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.95em;
}

.dtm-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dtm-inline-status.dtm-status-up .dtm-status-dot {
    background: #43e97b;
    box-shadow: 0 0 8px rgba(67, 233, 123, 0.5);
}

.dtm-inline-status.dtm-status-down .dtm-status-dot {
    background: #e94560;
    box-shadow: 0 0 8px rgba(233, 69, 96, 0.5);
    animation: dtm-pulse 2s infinite;
}

.dtm-inline-status.dtm-status-partial .dtm-status-dot {
    background: #f6d365;
    box-shadow: 0 0 8px rgba(246, 211, 101, 0.5);
}

/* Loading State */
.dtm-loading {
    opacity: 0.6;
    pointer-events: none;
}

.dtm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: dtm-spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes dtm-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Toast Notification */
.dtm-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 16px 28px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.dtm-toast.show {
    transform: translateX(-50%) translateY(0);
}

.dtm-toast-success {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: #1a5c2e;
}

.dtm-toast-error {
    background: linear-gradient(135deg, #e94560, #c73e54);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dtm-monitor-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .dtm-service-card {
        padding: 18px;
    }

    .dtm-service-header h3 {
        font-size: 1.1em;
    }

    .dtm-btn-report {
        padding: 10px 12px;
        font-size: 0.85em;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: light) {
    .dtm-service-card {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-color: rgba(0,0,0,0.1);
        color: #333;
    }

    .dtm-service-card::before {
        background: linear-gradient(90deg, #667eea, #764ba2);
    }

    .dtm-service-header h3 {
        color: #333;
    }

    .dtm-service-meta {
        color: #666;
    }

    .dtm-graph-empty {
        color: #999;
    }
}
