﻿/**
 * Site Extensions Snapshot - Admin Styles
 *
 * @package Siteexsn
 * @since 1.0.0
 */

/* Stats Cards */
.siteexsn-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.siteexsn-stat-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    padding: 14px 16px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
}

.siteexsn-stat-icon {
    grid-row: 1 / span 2;
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #2271b1;
}

.siteexsn-stat-value {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    color: #1d2327;
}

.siteexsn-stat-label {
    font-size: 12px;
    color: #50575e;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.siteexsn-stat-active { border-left-color: #00a32a; }
.siteexsn-stat-active .siteexsn-stat-icon { color: #00a32a; }

.siteexsn-stat-inactive { border-left-color: #8c8f94; }
.siteexsn-stat-inactive .siteexsn-stat-icon { color: #8c8f94; }

.siteexsn-stat-updates { border-left-color: #d63638; }
.siteexsn-stat-updates .siteexsn-stat-icon { color: #d63638; }

/* Filter Chips */
.siteexsn-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 8px;
}

.siteexsn-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 999px;
    color: #2c3338;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.siteexsn-chip:hover {
    background: #fff;
    border-color: #2271b1;
    color: #2271b1;
}

.siteexsn-chip.is-active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.siteexsn-chip-count {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    padding: 0 8px;
    font-size: 11px;
    line-height: 18px;
    min-width: 18px;
    text-align: center;
}

.siteexsn-chip.is-active .siteexsn-chip-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Update Badge */
.siteexsn-update-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 1px 8px;
    background: #fcf0f1;
    color: #b32d2e;
    border: 1px solid #f1c2c4;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.siteexsn-update-badge .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

/* Export Section */
.siteexsn-export-section {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.siteexsn-export-section .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.siteexsn-export-section .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.siteexsn-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 999px;
    min-width: 260px;
    max-width: 420px;
    flex: 1 1 320px;
}

.siteexsn-search-wrap .dashicons {
    color: #2271b1;
}

.siteexsn-search-wrap .siteexsn-search {
    border: none;
    background: transparent;
    width: 100%;
    padding: 4px 2px;
    font-size: 13px;
    outline: none;
}

/* Tab Navigation */
.nav-tab-wrapper .siteexsn-count {
    font-size: 11px;
    color: #666;
    font-weight: normal;
    margin-left: 5px;
}

/* Content Area */
.siteexsn-content {
    margin-top: 20px;
}

/* Table Container */
.siteexsn-table-container {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.siteexsn-table-container table {
    margin: 0;
    border: none;
}

.siteexsn-table-container th {
    background: #f9f9f9;
    border-bottom: 1px solid #ccd0d4;
    font-weight: 600;
    color: #23282d;
}

.siteexsn-table-container td {
    border-bottom: 1px solid #f0f0f1;
    vertical-align: top;
}

.siteexsn-table-container tr:last-child td {
    border-bottom: none;
}

/* Status Indicators */
.siteexsn-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.siteexsn-status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.siteexsn-status-inactive {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Description Column */
.siteexsn-table-container td:last-child {
    max-width: 300px;
    word-wrap: break-word;
}

/* Responsive Design */
@media screen and (max-width: 1100px) {
    .siteexsn-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 782px) {
    .siteexsn-table-container {
        overflow-x: auto;
    }
    
    .siteexsn-table-container table {
        min-width: 600px;
    }
    
    .siteexsn-table-container th,
    .siteexsn-table-container td {
        padding: 8px 6px;
        font-size: 13px;
    }
    
    .siteexsn-table-container td:last-child {
        max-width: 200px;
    }
}

@media screen and (max-width: 600px) {
    .siteexsn-export-section {
        text-align: center;
        flex-direction: column;
        align-items: stretch;
    }
    
    .siteexsn-export-section .button {
        width: 100%;
        justify-content: center;
    }

    .siteexsn-search-wrap {
        max-width: none;
        min-width: 0;
    }
    
    .nav-tab-wrapper {
        display: flex;
        flex-direction: column;
    }
    
    .nav-tab-wrapper .nav-tab {
        margin-bottom: 5px;
        text-align: center;
    }
}

/* Loading State */
.siteexsn-loading {
    opacity: 0.6;
    pointer-events: none;
}

.siteexsn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: siteexsn-spin 1s linear infinite;
}

@keyframes siteexsn-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.siteexsn-notice {
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.siteexsn-notice-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.siteexsn-notice-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.siteexsn-notice-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

/* Hover Effects */
.siteexsn-table-container tbody tr:hover {
    background-color: #f9f9f9;
}

.siteexsn-export-section .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Focus States */
.siteexsn-export-section .button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .siteexsn-export-section,
    .nav-tab-wrapper,
    .siteexsn-filter-chips {
        display: none;
    }
    
    .siteexsn-table-container {
        border: none;
        box-shadow: none;
    }
    
    .siteexsn-table-container th {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
} 






