/* ACC Importer Plugin Styles */

/* Plugin container */
.acc-importer-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header section */
.acc-importer-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.acc-importer-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

.acc-importer-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Controls section */
.acc-importer-controls {
    padding: 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.form-group input, 
.form-group select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus, 
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Button styles */
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 600;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Status messages */
.status {
    padding: 20px 30px;
    background: #e8f5e8;
    border-left: 4px solid #28a745;
    margin: 20px 30px;
    border-radius: 8px;
    display: none;
}

.status.error {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.status.loading {
    background: #d1ecf1;
    border-left-color: #17a2b8;
}

/* Categories container */
.categories-container {
    padding: 30px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Category cards */
.category-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.2);
}

.category-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.category-card .category-id {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.category-card .parent-info {
    color: #28a745;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Statistics cards */
.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    min-width: 150px;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-card .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Responsive design */
@media (max-width: 768px) {
    .acc-importer-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .acc-importer-header h2 {
        font-size: 2rem;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .stat-card {
        min-width: auto;
    }
}

/* WordPress admin integration */
.wp-admin .acc-importer-container {
    margin: 20px 0;
}

.wp-admin .acc-importer-header h2 {
    font-size: 2rem;
}

/* Shortcode display in admin */
#acc-importer-test-display .acc-importer-container {
    max-width: 100%;
    margin: 0;
}

/* Form validation visual feedback */
.form-group input.error {
    border-color: #dc3545;
}

.form-group input.success {
    border-color: #28a745;
}

/* Accessibility improvements */
.btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.form-group input:focus,
.form-group select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Category select with product counts */
.category-filter-select {
    min-width: 300px;
}

.category-filter-select option {
    padding: 8px 12px;
}

.category-filter-select optgroup {
    font-weight: bold;
    color: #2c3e50;
    background: #f8f9fa;
}

/* Product count styling in select options */
.category-filter-select option:not([value=""]) {
    color: #495057;
}

/* Highlight categories with products */
.category-filter-select option[data-count]:not([data-count="0"]) {
    background: #e8f5e8;
}

/* Style for zero product categories */
.category-filter-select option[data-count="0"] {
    color: #6c757d;
    font-style: italic;
}

/* Admin form styling improvements */
.form-table th {
    font-weight: 600;
    color: #2c3e50;
}

.form-table select {
    min-width: 250px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s;
}

.form-table select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Import status styling */
.import-status-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.import-status-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.status-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.status-item .number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.status-item .label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Print styles */
@media print {
    .acc-importer-controls,
    .btn,
    .loading-spinner {
        display: none !important;
    }
    
    .acc-importer-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .category-card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
}
