/* --- Base Styling --- */
body {
    font-family: Arial, sans-serif;
    background-color: #f7f9fb;
    padding: 20px;
    margin: 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.page-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 3px solid #4a69bd;
    padding-bottom: 5px;
}

/* --- Notification Messages --- */
.message-box {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.message-box.success {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #065f46;
}

.message-box.error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #991b1b;
}

/* --- Filter Card and Form --- */
.filter-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f2f5f9;
}

.filter-label {
    font-weight: bold;
    color: #555;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.status-name {
    margin-left: 5px;
    font-size: 0.9em;
    font-weight: 500;
}

.filter-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.text-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* --- Buttons --- */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-btn {
    background-color: #4a69bd;
    color: white;
}

.primary-btn:hover {
    background-color: #3b53a0;
}

.secondary-btn {
    background-color: #e0e0e0;
    color: #444;
}

.secondary-btn:hover {
    background-color: #ccc;
}

/* --- Table Styles --- */
.table-wrapper {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

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

.data-table th {
    background-color: #f0f3f7;
    color: #666;
    font-size: 0.8em;
    text-transform: uppercase;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background-color: #f9f9f9;
}

.no-records {
    text-align: center;
    color: #999;
    padding: 20px;
}

/* --- Status Badges (Color Coding) --- */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 9999px; /* Pill shape */
    font-size: 0.8em;
    font-weight: bold;
}

/* Sent - Green */
.status-badge.status-sent {
    background-color: #d1fae5;
    color: #065f46;
}
.status-name.status-sent {
    color: #065f46;
}

/* Deferred - Orange */
.status-badge.status-deferred {
    background-color: #ffedd5;
    color: #c2410c;
}
.status-name.status-deferred {
    color: #c2410c;
}

/* Bounced - Red */
.status-badge.status-bounced {
    background-color: #fee2e2;
    color: #991b1b;
}
.status-name.status-bounced {
    color: #991b1b;
}

/* --- Pagination --- */
.pagination-info {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination-nav {
    display: inline-flex;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.page-link {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #4a69bd;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
}

.page-link:hover {
    background-color: #f0f3f7;
}

.page-link.current-page {
    background-color: #4a69bd;
    color: white;
    border-color: #4a69bd;
}

.page-link.current-page:hover {
    background-color: #4a69bd;
}

.page-link.ellipsis {
    color: #999;
    cursor: default;
}

.page-link.ellipsis:hover {
    background-color: #fff;
}

.action-delete {
    color: #cc0000;
    text-decoration: none;
    transition: color 0.15s;
}

.action-delete:hover {
    color: #990000;
    text-decoration: underline;
}

/* --- Responsive Adjustments --- */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    .filter-controls {
        flex-direction: column;
    }
    .text-input, .btn {
        width: 100%;
        box-sizing: border-box;
    }
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* --- Suppression page--- */

/* Custom styles for reasons since they differ from statuses */
    .status-badge.reason-hard_bounce { background-color: #fee2e2; color: #991b1b; } /* Red for Hard Bounce */
    .status-badge.reason-spam_report { background-color: #ffedd5; color: #c2410c; } /* Orange for Spam Report */
    .status-badge.reason-manual_block { background-color: #d1fae5; color: #065f46; } /* Green for Manual Block */

/* Match the text color for filters */
.reason-name.reason-hard_bounce { color: #991b1b; }
.reason-name.reason-spam_report { color: #c2410c; }
.reason-name.reason-manual_block { color: #065f46; }
