/**
 * Easy Sarkari Mock Test - Portal CSS
 */

:root {
    --es-primary: #1e40af;
    --es-primary-hover: #1d4ed8;
    --es-secondary: #0ea5e9;
    --es-accent: #f59e0b;
    --es-success: #16a34a;
    --es-danger: #dc2626;
    --es-bg: #f8fafc;
    --es-card-bg: #ffffff;
    --es-text: #1e293b;
    --es-text-muted: #64748b;
    --es-border: #e2e8f0;
    --es-radius: 10px;
    --es-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --es-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

.es-portal-container {
    font-family: 'Poppins', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--es-text);
    max-width: 1240px;
    margin: 20px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Hero Section */
.es-portal-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #0284c7 100%);
    color: #ffffff;
    padding: 35px 30px;
    border-radius: var(--es-radius);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.2);
}

.es-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.es-portal-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #ffffff !important;
    line-height: 1.3;
}

.es-portal-subtitle {
    font-size: 15px;
    color: #e0f2fe;
    margin: 0;
    max-width: 650px;
}

.es-hero-stats {
    display: flex;
    gap: 15px;
}

.es-stat-pill {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 12px 18px;
    border-radius: 8px;
    text-align: center;
    min-width: 90px;
}

.es-stat-pill strong {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.es-stat-pill span {
    font-size: 11px;
    color: #bae6fd;
}

/* Filter & Search Bar */
.es-filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.es-search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.es-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--es-text-muted);
}

.es-search-input {
    width: 100% !important;
    padding: 12px 15px 12px 38px !important;
    border: 1px solid var(--es-border) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background: #ffffff !important;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.es-search-input:focus {
    border-color: var(--es-primary) !important;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15) !important;
    outline: none;
}

.es-select-state {
    padding: 12px 15px !important;
    border: 1px solid var(--es-border) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background: #ffffff !important;
    cursor: pointer;
    min-width: 220px;
}

/* Category Tabs Navigation */
.es-category-tabs-wrapper {
    margin-bottom: 18px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.es-category-tabs {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.es-tab-btn {
    background: #ffffff;
    border: 1px solid var(--es-border);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--es-text);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.es-tab-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.es-tab-btn.active {
    background: var(--es-primary);
    color: #ffffff;
    border-color: var(--es-primary);
    box-shadow: 0 2px 6px rgba(30, 64, 175, 0.3);
}

/* Exam Filter Chips */
.es-exam-chips-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.es-chips-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--es-text-muted);
}

.es-chip {
    background: #e2e8f0;
    color: #334155;
    border: none;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.es-chip:hover {
    background: #cbd5e1;
}

.es-chip.active {
    background: #0284c7;
    color: #ffffff;
}

/* Tests Grid */
.es-grid-wrapper {
    position: relative;
    min-height: 250px;
}

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

/* Test Card */
.es-test-card {
    background: var(--es-card-bg);
    border: 1px solid var(--es-border);
    border-radius: var(--es-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: var(--es-shadow);
}

.es-test-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--es-shadow-hover);
    border-color: #93c5fd;
}

.es-card-top-badges {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.es-badge-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.es-tag-exam {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.es-tag-state {
    background: #fef3c7;
    color: #b45309;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.es-status-badges {
    display: flex;
    gap: 6px;
}

.es-badge-pyq {
    background: #fdf2f8;
    color: #be185d;
    border: 1px solid #fbcfe8;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.es-badge-free {
    background: #dcfce7;
    color: #15803d;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.es-category-sub {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    display: block;
    margin-bottom: 4px;
}

.es-card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.4;
}

.es-card-title a {
    color: var(--es-text);
    text-decoration: none;
}

.es-card-title a:hover {
    color: var(--es-primary);
}

.es-card-desc {
    font-size: 13px;
    color: var(--es-text-muted);
    line-height: 1.5;
    margin: 0 0 15px;
    min-height: 38px;
}

.es-card-metrics {
    display: flex;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 16px;
}

.es-metric-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #475569;
}

.es-metric-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--es-secondary);
}

.es-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.es-lang-chip {
    font-size: 11px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.es-lang-chip .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.es-btn-start-test {
    background: var(--es-primary);
    color: #ffffff !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s, transform 0.1s;
}

.es-btn-start-test:hover {
    background: var(--es-primary-hover);
    transform: translateX(2px);
}

/* Loader */
.es-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(2px);
    border-radius: var(--es-radius);
}

.es-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #cbd5e1;
    border-top-color: var(--es-primary);
    border-radius: 50%;
    animation: es-spin 0.8s linear infinite;
    margin-bottom: 8px;
}

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

.es-no-tests-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    background: #ffffff;
    border: 1px dashed var(--es-border);
    border-radius: var(--es-radius);
}

/* Daily Quiz Widget */
.es-daily-quiz-widget {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border: 1px solid #fde68a;
    border-radius: var(--es-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.es-dqw-tag {
    font-size: 12px;
    font-weight: 700;
    color: #b45309;
    margin-bottom: 8px;
}

.es-dqw-title {
    font-size: 18px;
    margin: 0 0 8px;
    color: #78350f;
}

.es-dqw-desc {
    font-size: 13px;
    color: #92400e;
    margin: 0 0 15px;
}

.es-dqw-btn {
    background: #d97706 !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
}

/* Responsive */
@media (max-width: 768px) {
    .es-portal-hero {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
    }
    .es-hero-stats {
        width: 100%;
        justify-content: space-between;
    }
    .es-stat-pill {
        flex: 1;
        padding: 8px;
    }
    .es-tests-grid {
        grid-template-columns: 1fr;
    }
}
