/**
 * Practice Test CSS for ExamHub Theme
 */

/* Practice Test Page Layout */
.practice-test-page {
    background: #f8f9fa;
    min-height: 100vh;
}

.page-header {
    background: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e1e5e9;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    color: #1a1a1a;
}

.page-title i {
    color: #007cba;
}

.page-description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.archive-description {
    color: #555;
    margin-bottom: 1rem;
}

.archive-description p {
    margin: 0;
    font-style: italic;
}

/* Button styles moved to buttons.css */

/* MCQs Container - Single Column Layout */
.mcqs-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: none;
}

.mcq-item-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.mcq-item-wrapper:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Pagination */
.pagination-container {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0.5rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #007cba;
    border-color: #007cba;
    color: white;
    text-decoration: none;
}

.pagination .current a,
.pagination .current span {
    background: #007cba;
    border-color: #007cba;
    color: white;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    color: #666;
}

/* No MCQs Found */
.no-mcqs-found {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-content-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.no-mcqs-found h3 {
    color: #666;
    margin-bottom: 1rem;
}

.no-mcqs-found p {
    color: #888;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Topic Selection Mode */
.topic-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-section {
    display: flex;
    gap: 2rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.filter-section select,
.search-section input {
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease;
    min-width: 200px;
}

.filter-section select:focus,
.search-section input:focus {
    outline: none;
    border-color: #007cba;
}

.search-section {
    flex: 1;
}

/* Topics Container */
.topics-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.subject-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.subject-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 1rem;
}

.subject-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.subject-title i {
    color: #007cba;
}

.mcq-count {
    color: #666;
    font-weight: normal;
    font-size: 0.9rem;
}

.subject-description {
    color: #666;
    margin: 0;
    font-style: italic;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.topic-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.topic-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #007cba;
}

.topic-content {
    flex: 1;
}

.topic-title {
    margin-bottom: 0.75rem;
    color: #1a1a1a;
    font-size: 1.25rem;
}

.topic-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.topic-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.topic-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Topic Actions */
.topic-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: auto;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.topic-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: transparent;
    border: 1px solid #dee2e6;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.dropdown-toggle:hover {
    background: #f8f9fa;
    border-color: #007cba;
    color: #007cba;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #007cba;
    text-decoration: none;
}

.dropdown-item:last-child {
    border-bottom: none;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e1e5e9;
}

.modal-header h3 {
    margin: 0;
    color: #1a1a1a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #dc3545;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease;
}

.form-group select:focus {
    outline: none;
    border-color: #007cba;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* No Topics Found */
.no-topics-found {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-topics-found .no-content-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.no-topics-found h3 {
    color: #666;
    margin-bottom: 1rem;
}

.no-topics-found p {
    color: #888;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .filter-section {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-section select,
    .search-section input {
        min-width: auto;
        width: 100%;
    }

    .topics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .topic-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .dropdown-menu {
        right: auto;
        left: 0;
        width: 100%;
    }

    .modal-content {
        margin: 1rem;
        max-width: none;
    }

    .modal-actions {
        flex-direction: column;
    }

    .mcqs-container {
        gap: 1rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 1rem 0;
    }

    .page-title {
        font-size: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .subject-section {
        padding: 1rem;
    }

    .topic-card {
        padding: 1rem;
    }

    .topic-title {
        font-size: 1.1rem;
    }

    .mcq-item-wrapper {
        margin: 0 0 1rem 0;
        border-radius: 8px;
    }

    .no-mcqs-found,
    .no-topics-found {
        padding: 2rem 1rem;
    }

    .modal-header,
    .modal-body {
        padding: 1rem;
    }
}

/* Loading and Animation States */
.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.loading-spinner::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    border-top-color: #007cba;
    animation: spin 1s ease-in-out infinite;
    margin-left: 0.5rem;
}

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

/* Text utilities */
.text-center {
    text-align: center;
}

/* Hidden elements */
[style*="display: none"] {
    display: none !important;
}
