/* WoCo Advanced SMTP Admin Styles */

.woco-settings-wrapper {
    max-width: 70%;
    float: left;
}

.woco-sidebar {
    width: 25%;
    float: right;
    margin-left: 3%;
}

.woco-sidebar .postbox {
    margin-bottom: 20px;
}

.status-configured {
    color: #46b450;
    font-weight: bold;
}

.status-not-configured {
    color: #d63638;
    font-weight: bold;
}

.status-configured .dashicons,
.status-not-configured .dashicons {
    margin-right: 5px;
}

.required {
    color: #d63638;
}

/* Statistics Grid */
.woco-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.stat-box.success {
    border-left: 4px solid #46b450;
}

.stat-box.error {
    border-left: 4px solid #d63638;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #23282d;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filters */
.woco-filters {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-row label {
    font-weight: 600;
    margin-right: 5px;
}

.filter-row input[type="date"],
.filter-row input[type="text"],
.filter-row select {
    margin-right: 10px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-sent {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-badge.status-failed {
    background-color: #f8d7da;
    color: #721c24;
}

/* Error Messages */
.error-message {
    color: #d63638;
    font-style: italic;
    margin-top: 5px;
}

.error-text {
    color: #d63638;
}

.warning-text {
    color: #dba617;
}

.success-text {
    color: #46b450;
}

/* Modal Styles */
.woco-modal {
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.woco-modal-content {
    background-color: #fff;
    margin: 5% auto;
    border-radius: 4px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.woco-modal-header {
    background-color: #f1f1f1;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.woco-modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.woco-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woco-modal-close:hover {
    color: #000;
}

.woco-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Log Details */
.woco-log-details .form-table th {
    width: 120px;
    font-weight: bold;
}

.email-message-content {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #f9f9f9;
    font-family: monospace;
    white-space: pre-wrap;
}

/* Test Email Wrapper */
.woco-test-email-wrapper {
    max-width: 800px;
}

.woco-test-email-wrapper .postbox {
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .woco-settings-wrapper {
        max-width: 100%;
        float: none;
    }
    
    .woco-sidebar {
        width: 100%;
        float: none;
        margin-left: 0;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .woco-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-row > * {
        margin-bottom: 10px;
    }
    
    .woco-modal-content {
        width: 95%;
        margin: 2% auto;
    }
}

@media (max-width: 480px) {
    .woco-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Styling */
.form-table th {
    width: 200px;
}

.postbox .inside {
    margin: 0;
    padding: 12px;
}

.postbox h2.hndle {
    padding: 8px 12px;
    margin: 0;
    line-height: 1.4;
}

/* Button Spacing */
.button + .button {
    margin-left: 5px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.margin-bottom {
    margin-bottom: 20px;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}