/**
 * Batch Archive Page Styles
 * Modern UI with filters and location tabs
 */

/* Container */
.edmark-batch-archive {
    background: #F9FAFB;
    min-height: 100vh;
    padding: 40px 0;
}

.batch-archive-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Section */
.batch-archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.batch-archive-header .archive-title {
    font-size: 42px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
}

.batch-archive-header .archive-subtitle {
    font-size: 18px;
    color: #6B7280;
    margin: 0;
}

/* Location Tabs */
.location-tabs-wrapper {
    background: white;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.location-tabs {
    /* display: block !important; */
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;    
    text-align: center;
    scrollbar-width: thin;
}

.location-tabs::-webkit-scrollbar {
    height: 6px;
}

.location-tabs::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 3px;
}

.location-tabs::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.location-tab {
    flex: 0 0 auto;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.location-tab:hover {
    background: #F3F4F6;
    color: #111827;
}

.location-tab.active {
    background: #FF6B6B;
    color: white;
}

/* Main Content Layout */
.batch-archive-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

/* Sidebar Filters */
.batch-filters-sidebar {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #F3F4F6;
}

.filters-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.clear-filters {
    background: none;
    border: none;
    color: #FF6B6B;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.clear-filters:hover {
    background: #FEF2F2;
}

/* Filter Groups */
.filter-group {
    margin-bottom: 24px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

/* Search Input */
.filter-search {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.filter-search:focus {
    outline: none;
    border-color: #FF6B6B;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Custom Dropdown Filter */
.filter-dropdown {
    position: relative;
    width: 100%;
}

.filter-dropdown-toggle {
    width: 100%;
    padding: 10px 12px;
    background: white;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.filter-dropdown-toggle:hover {
    border-color: #FF6B6B;
}

.filter-dropdown-toggle:focus {
    outline: none;
    border-color: #FF6B6B;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.filter-dropdown-text {
    color: #374151;
    font-weight: 500;
}

.filter-dropdown-arrow {
    color: #6B7280;
    font-size: 12px;
    transition: transform 0.2s;
}

.filter-dropdown.active .filter-dropdown-arrow {
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    overflow: hidden;
    display: none;
    margin-top: 4px;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.filter-dropdown.active .filter-dropdown-menu {
    display: block;
}

.filter-dropdown-search {
    padding: 8px;
    border-bottom: 1px solid #E5E7EB;
}

.filter-dropdown-search input,
#courseSearchInput {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 13px;
}

.filter-dropdown-search input:focus,
#courseSearchInput:focus {
    outline: none;
    border-color: #FF6B6B;
}

.filter-dropdown-options {
    max-height: 200px;
    overflow-y: auto;
    padding: 6px;
}

/* Custom scrollbar for dropdown */
.filter-dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.filter-dropdown-options::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 3px;
}

.filter-dropdown-options::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.filter-dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

.filter-checkbox-option {
    display: flex;
    align-items: flex-start;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.15s;
    margin-bottom: 2px;
}

.filter-checkbox-option:hover {
    background-color: #FFF5F5;
}

.filter-checkbox-option input[type="checkbox"] {
    margin: 0;
    margin-right: 8px;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #FF6B6B;
}

.filter-checkbox-label {
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
    word-break: break-word;
    flex: 1;
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-option:hover {
    background: #F9FAFB;
}

.filter-option input[type="radio"] {
    margin: 0 10px 0 0;
    cursor: pointer;
    accent-color: #FF6B6B;
}

.filter-option span {
    font-size: 16px;
    color: #0c0c0c;
}

/* Filter Tags */
.filter-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-tag-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid #E5E7EB;
    background: white;
}

.filter-tag-option:hover {
    background: #F9FAFB;
    border-color: #FF6B6B;
}

.filter-tag-option input[type="checkbox"] {
    margin: 0 10px 0 0;
    cursor: pointer;
    accent-color: #FF6B6B;
}

.filter-tag-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    color: #0c0c0c;
    font-weight: 500;
}

.filter-tag-label .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #9CA3AF;
}

.filter-tag-option:hover .filter-tag-label {
    color: #111827;
}

.filter-tag-option:hover .filter-tag-label .dashicons {
    color: #FF6B6B;
}

.filter-tag-option input[type="checkbox"]:checked + .filter-tag-label {
    color: #FF6B6B;
    font-weight: 600;
}

.filter-tag-option input[type="checkbox"]:checked + .filter-tag-label .dashicons {
    color: #FF6B6B;
}

/* Batch Grid Wrapper */
.batch-grid-wrapper {
    background: transparent;
}

/* Results Info */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.results-count {
    font-size: 15px;
    color: #6B7280;
}

.results-count strong {
    color: #111827;
    font-weight: 600;
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 8px 12px;
    background: #F3F4F6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #6B7280;
}

.view-btn:hover {
    background: #E5E7EB;
}

.view-btn.active {
    background: #FF6B6B;
}

.view-btn.active .dashicons {
    color: white;
}

/* Batch Grid */
.batch-grid,
.batches-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.batch-grid.list-view,
.batches-grid.list-view {
    grid-template-columns: 1fr;
}

/* Batch Card */
.batch-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.batch-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

/* Batch Image */
.batch-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #FFE5E5 0%, #FFF5F5 100%);
}

.batch-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.batch-image .batch-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.batch-badge.bestseller {
    background: #DC2626;
    color: white;
}

.batch-badge.top-rated {
    background: #FF6B6B;
    color: white;
}

.batch-badge.new {
    background: #10B981;
    color: white;
}

/* Batch Content */
.batch-content {
    padding: 20px;
}

.batch-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.batch-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.batch-title a:hover {
    color: #FF6B6B;
}

/* Batch Meta */
.batch-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #6B7280;
}

.batch-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.batch-meta-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Batch Info */
.batch-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.batch-level {
    padding: 4px 10px;
    background: #F3F4F6;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #0c0c0c;
}

.batch-location {
    padding: 4px 10px;
    background: #FEF2F2;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #DC2626;
}

/* Batch Footer */
.batch-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #F3F4F6;
}

.batch-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.price-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.price-list {
    font-size: 14px;
    color: #9CA3AF;
    text-decoration: line-through;
    font-weight: 500;
}

.price-selling {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    word-break: break-word;
}

.price-discount {
    display: inline-block;
    padding: 4px 8px;
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    color: #DC2626;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #FECACA;
    white-space: nowrap;
}

.batch-enroll-btn {
    padding: 10px 16px;
    background: #FF6B6B;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    flex-shrink: 0;
    white-space: nowrap;
}

.batch-enroll-btn:hover {
    background: #EF4444;
    transform: scale(1.05);
}

/* List View Styles */
.batch-grid.list-view .batch-card,
.batches-grid.list-view .batch-card {
    display: grid;
    grid-template-columns: 300px 1fr;
}

.batch-grid.list-view .batch-image,
.batches-grid.list-view .batch-image {
    height: 100%;
}

.batch-grid.list-view .batch-content,
.batches-grid.list-view .batch-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #F3F4F6;
    border-top-color: #FF6B6B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-indicator p {
    color: #6B7280;
    font-size: 16px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
}

.no-results .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #D1D5DB;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 24px;
    color: #111827;
    margin: 0 0 8px 0;
}

.no-results p {
    font-size: 16px;
    color: #6B7280;
    margin: 0;
}

/* Pagination */
.batch-pagination {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #F3F4F6;
}

.batch-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.batch-pagination .page-numbers li {
    display: inline-block;
}

.batch-pagination a.page-numbers,
.batch-pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    color: #0c0c0c;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.batch-pagination a.page-numbers:hover {
    background: #F9FAFB;
    border-color: #FF6B6B;
    color: #FF6B6B;
}

.batch-pagination span.page-numbers.current {
    background: #FF6B6B;
    border-color: #FF6B6B;
    color: white;
    font-weight: 600;
}

.batch-pagination span.page-numbers.dots {
    border: none;
    background: transparent;
    color: #9CA3AF;
}

.batch-pagination a.prev,
.batch-pagination a.next {
    padding: 0 16px;
    font-weight: 500;
}

.batch-pagination a.prev .dashicons,
.batch-pagination a.next .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.batch-pagination a.prev:hover,
.batch-pagination a.next:hover {
    background: #FF6B6B;
    border-color: #FF6B6B;
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .batch-archive-content {
        grid-template-columns: 1fr;
    }
    
    .batch-filters-sidebar {
        position: static;
    }
    
    .batch-grid,
    .batches-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .batch-archive-header .archive-title {
        font-size: 32px;
    }
    
    .batch-grid,
    .batches-grid {
        grid-template-columns: 1fr;
    }
    
    .batch-grid.list-view .batch-card,
    .batches-grid.list-view .batch-card {
        grid-template-columns: 1fr;
    }
    
    .batch-grid.list-view .batch-image,
    .batches-grid.list-view .batch-image {
        height: 200px;
    }
    
    .results-info {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .batch-pagination .page-numbers {
        gap: 4px;
    }
    
    .batch-pagination a.page-numbers,
    .batch-pagination span.page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }
    
    .batch-pagination a.prev,
    .batch-pagination a.next {
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .batch-archive-container {
        padding: 0 12px;
    }
    
    .location-tab {
        padding: 10px 16px;
        font-size: 16px;
    }
    
    .batch-filters-sidebar {
        padding: 16px;
    }
    
    /* Stack footer on very small screens */
    .batch-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .batch-enroll-btn {
        width: 100%;
        text-align: center;
    }
}
