/**
 * Samrat Emily Mail Tracker Admin Styles
 */

/* Main Wrapper */
.mail-log-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    background: #fff;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}

.plugin-banner {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.mail-log-content {
    padding: 30px;
}


.mail-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.mail-log-title {
    font-size: 24px;
    font-weight: 800;
    color: #1a202c !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mail-log-title .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #3182ce;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    display: inline-block;
}

.badge-wordpress { background: #ebf8ff; color: #2b6cb0; }
.badge-woocommerce { background: #faf5ff; color: #6b46c1; }
.badge-dokan { background: #fff5f5; color: #c53030; }

/* Table */
.mail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

.mail-table th {
    text-align: left;
    padding: 16px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid #e2e8f0;
}

.mail-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #334155;
}

.mail-table tr:hover td {
    background: #f8fafc;
}

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

/* Buttons */
.btn-view {
    background: #3182ce;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-view:hover {
    background: #2b6cb0;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

/* Modal Styles */
.ml-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 100000;
    animation: ml-fadeIn 0.2s ease-out;
}

.ml-modal-content {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: white;
    border-radius: 20px;
    z-index: 100001;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 0;
    overflow: hidden;
    animation: ml-slideUp 0.3s ease-out;
}

.ml-modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.ml-modal-body {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
}

@keyframes ml-fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ml-slideUp { from { transform: translate(-50%, -45%); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }

/* Pagination */
.pagination .page-numbers {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination .page-numbers.current {
    background: #3182ce;
    color: #fff;
    border-color: #3182ce;
}

.pagination .page-numbers:hover:not(.current) {
    background: #f8fafc;
    border-color: #cbd5e0;
}

/* Settings Styles */
.settings-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f1f5f9;
}

.settings-label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 15px;
}

.settings-desc {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 15px;
}

.form-control {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: #3182ce;
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.toggle-group {
    display: flex;
    gap: 12px;
}

.toggle-btn {
    padding: 8px 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: #3182ce;
    color: white;
    border-color: #3182ce;
}

.save-btn {
    background: #3182ce;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.save-btn:hover {
    background: #2b6cb0;
}

.btn-secondary {
    background: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.2);
}

.btn-delete-log:hover {
    background: #fecaca !important;
}

/* Checkbox styling */
/* Bulk Actions */
.mail-log-actions select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
}

.mail-log-actions select:focus {
    border-color: #3182ce;
    outline: none;
}

.mail-table th:first-child,
.mail-table td:first-child {
    padding-left: 20px;
    width: 40px;
}

.mail-table input[type="checkbox"] {
    margin: 0;
    vertical-align: middle;
    width: 18px;
    height: 18px;
    cursor: pointer;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
}

.row-actions .btn-delete-log {
    transition: all 0.2s;
}

.row-actions .btn-delete-log:hover {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}
