/**
 * SP-Mailman Frontend Styles
 */

.spm-campaigns {
    margin: 20px 0;
}

.spm-campaigns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.spm-campaigns-table th,
.spm-campaigns-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.spm-campaigns-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.spm-campaigns-table tbody tr:hover {
    background: #f9f9f9;
}

.spm-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.spm-status-completed {
    background: #d4edda;
    color: #155724;
}

.spm-status-sending,
.spm-status-running {
    background: #cce5ff;
    color: #004085;
}

.spm-status-queued {
    background: #fff3cd;
    color: #856404;
}

.spm-status-draft {
    background: #e2e3e5;
    color: #383d41;
}

.spm-status-failed {
    background: #f8d7da;
    color: #721c24;
}

.spm-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.spm-stat-card {
    flex: 1;
    min-width: 150px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.spm-stat-card .spm-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1.2;
}

.spm-stat-card .spm-stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

.spm-stat-card .spm-stat-limit {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.spm-error {
    color: #dc3545;
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Channel badges */
.spm-channel-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-right: 4px;
}
.spm-channel-on {
    background: #dcfce7;
    color: #166534;
}
.spm-channel-off {
    background: #f3f4f6;
    color: #9ca3af;
    text-decoration: line-through;
}

/* Responsive */
@media (max-width: 768px) {
    .spm-campaigns-table {
        display: block;
        overflow-x: auto;
    }

    .spm-stats {
        flex-direction: column;
    }

    .spm-stat-card {
        min-width: auto;
    }
}
