/**
 * VegaVend Product Issues Page Styles
 * 
 * @package VegaVend_Merchant_Connector
 * @since 1.1.3
 */

/* Main dashboard styles */
.vegavend-stats-dashboard .stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vegavend-stats-dashboard .stat-card-clickable {
    cursor: pointer;
}

.vegavend-stats-dashboard .stat-card:hover,
.vegavend-stats-dashboard .stat-card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    text-decoration: none;
}

.vegavend-stats-dashboard .stat-card-clickable:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
    text-decoration: none;
}

/* Ensure text color doesn't change on hover for clickable cards */
.vegavend-stats-dashboard .stat-card-clickable:hover,
.vegavend-stats-dashboard .stat-card-clickable:focus,
.vegavend-stats-dashboard .stat-card-clickable:visited {
    color: inherit;
    text-decoration: none;
}

/* Filter and button styles */
.severity-filters .button {
    margin-right: 5px;
}

.severity-filters .button:focus {
    box-shadow: 0 0 0 2px #007cba;
    outline: none;
}

/* Issues count badge */
.issues-count {
    display: inline-block;
    min-width: 20px;
    text-align: center;
    font-weight: bold;
    border-radius: 12px;
}

/* Quick action buttons */
.vegavend-quick-action {
    min-width: 30px;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid #ccd0d4;
    background: #f6f7f7;
}

.vegavend-quick-action:hover {
    background-color: #f0f0f0;
    transform: scale(1.1);
    border-color: #999;
}

.vegavend-quick-action:focus {
    box-shadow: 0 0 0 2px #007cba;
    outline: none;
}

/* Table enhancements */
.wp-list-table tbody tr:hover {
    background-color: #f5f5f5;
}

.wp-list-table tbody tr[style*="background-color: rgb(255, 235, 238)"] {
    border-left: 4px solid #f44336;
}

/* Meta box styles */
.vegavend-enhanced-issues-metabox .button-small {
    font-size: 11px;
    padding: 4px 8px;
    line-height: 1.2;
}

.vegavend-enhanced-issues-metabox ul {
    list-style-type: disc;
}

.vegavend-enhanced-issues-metabox h4 {
    font-size: 13px;
    margin: 0 0 8px 0;
}

/* Pagination styles */
.tablenav .pagination-links .button.disabled {
    color: #a0a5aa;
    background: #f6f7f7;
    border-color: #ddd;
    cursor: default;
    pointer-events: none;
}

.tablenav .pagination-links .button:not(.disabled):hover {
    background-color: #f0f0f0;
    border-color: #999;
}

/* Filter tabs */
.subsubsub .current {
    font-weight: bold;
    color: #000;
}

.subsubsub a:hover {
    color: #0073aa;
}

/* Severity group styles for legacy list view */
.severity-group {
    margin: 20px 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.severity-header {
    font-weight: bold;
    padding: 10px;
    color: white;
}

.issues-list {
    margin: 0;
    padding: 15px;
    background: #fff;
}

.issues-list li {
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #ddd;
    transition: border-color 0.2s ease;
}

.issues-list li:hover {
    border-left-color: #007cba;
}

/* OPTIMIZED: Loading states for AJAX */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner.is-active {
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 1200px) {
    .vegavend-stats-dashboard {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 782px) {
    .vegavend-stats-dashboard {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 15px 0;
        padding: 15px;
    }
    
    .wp-list-table th,
    .wp-list-table td {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .wp-list-table .button-small {
        padding: 2px 4px;
        font-size: 10px;
    }
    
    .vegavend-quick-action {
        min-width: 25px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .vegavend-stats-dashboard {
        padding: 10px;
    }
    
    .stat-card {
        padding: 10px;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}