/* Premium Styles for Submission Error Log Page */

.dragwyb-error-log-wrap {
    margin-top: 20px;
    position: relative;
}

.dragwyb-clear-all-btn {
    float: right;
    margin-top: 3px !important;
    background: #fcf0f0 !important;
    border-color: #f5c2c2 !important;
    color: #b32d2e !important;
    font-weight: 500 !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dragwyb-clear-all-btn span {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.dragwyb-clear-all-btn:hover:not(:disabled) {
    background: #b32d2e !important;
    border-color: #b32d2e !important;
    color: #fff !important;
    box-shadow: 0 2px 4px rgba(179, 45, 46, 0.2);
}

.dragwyb-error-log-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    clear: both;
}

.dragwyb-error-log-controls .dragwyb-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dragwyb-error-log-controls .dragwyb-filters .dragwyb-select {
    padding: 3px 24px 3px 8px;
    min-width: 200px;
}

.dragwyb-error-log-controls .dragwyb-search-box {
    display: flex;
    gap: 5px;
}

.dragwyb-error-log-controls .dragwyb-search-box input[type=search] {
    padding: 3px 8px;
    min-width: 250px;
}

.dragwyb-error-log-table-container {
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.dragwyb-error-log-table-container .dragwyb-custom-table {
    margin: 0;
    border: none;
    box-shadow: none;
    width: 100%;
}

.dragwyb-error-log-table-container .dragwyb-custom-table th {
    background: #f6f7f7;
    padding: 8px 10px;
}

.dragwyb-error-log-table-container .dragwyb-custom-table td {
    padding: 12px 10px;
    vertical-align: top;
}

.dragwyb-error-log-table-container .dragwyb-custom-table tr:hover .row-actions {
    visibility: visible;
}

.dragwyb-error-log-table-container .dragwyb-custom-table tr .row-actions {
    visibility: hidden;
    font-size: 13px;
    padding: 2px 0 0;
}

.dragwyb-error-log-table-container .dragwyb-custom-table tr .row-actions span {
    color: #ddd;
}

.dragwyb-error-log-table-container .dragwyb-custom-table tr .row-actions a {
    text-decoration: none;
}

.dragwyb-error-log-table-container .dragwyb-custom-table .dragwyb-loading-state {
    text-align: center;
    padding: 30px !important;
    color: #646970;
}

/* Error Badge Styles */
.dragwyb-error-badge {
    display: inline-block;
    background: #fcf0f0;
    border: 1px solid #f8d7da;
    color: #842029;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin: 2px 4px 2px 0;
    line-height: 1.4;
}

.dragwyb-error-badge strong {
    color: #b32d2e;
}

.dragwyb-pagination {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

.dragwyb-pagination .tablenav-pages {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dragwyb-pagination .tablenav-pages .pagination-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Modal Overlay & Animations */
.dragwyb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease-out;
}

.dragwyb-modal-overlay.dragwyb-active {
    display: flex;
    opacity: 1;
}

.dragwyb-modal-overlay .dragwyb-modal {
    background: #fff;
    width: 800px;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.25s ease-out;
    border: 1px solid #dcdcdc;
    overflow: hidden;
}

.dragwyb-modal-overlay.dragwyb-active .dragwyb-modal {
    transform: scale(1);
}

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

.dragwyb-modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
    font-weight: 600;
}

.dragwyb-modal-header .dragwyb-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s ease;
    padding: 4px;
    display: flex;
    align-items: center;
}

.dragwyb-modal-header .dragwyb-modal-close:hover {
    color: #ef4444;
}

.dragwyb-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Grid Layout for details */
.dragwyb-error-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .dragwyb-error-details-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.dragwyb-detail-section {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 16px;
}

.dragwyb-detail-section h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 14px;
    color: #475569;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Error Details Section Highlight */
.dragwyb-detail-section.errors-section {
    background: #fff5f5;
    border-color: #fbcfe8;
}

.dragwyb-detail-section.errors-section h3 {
    color: #b91c1c;
    border-color: #fecdd3;
}

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

.dragwyb-detail-table th, 
.dragwyb-detail-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.dragwyb-detail-table th {
    font-weight: 600;
    color: #64748b;
    width: 30%;
}

.dragwyb-detail-table td {
    color: #334155;
    word-break: break-word;
}

.dragwyb-detail-table tr:last-child td,
.dragwyb-detail-table tr:last-child th {
    border-bottom: none;
}

.dragwyb-error-detail-card {
    background: #fff;
    border: 1px solid #fee2e2;
    border-left: 4px solid #ef4444;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.dragwyb-error-detail-card:last-child {
    margin-bottom: 0;
}

.dragwyb-error-detail-card .error-field-name {
    font-weight: 600;
    color: #991b1b;
    margin-bottom: 4px;
}

.dragwyb-error-detail-card .error-message {
    color: #7f1d1d;
    font-size: 13px;
}

.dragwyb-meta-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dragwyb-meta-list li {
    margin-bottom: 8px;
    color: #475569;
}

.dragwyb-meta-list li strong {
    color: #0f172a;
}

.dragwyb-meta-list li span.user-agent-text {
    display: block;
    font-family: monospace;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-top: 4px;
    word-break: break-all;
}
