/*
 * Public-facing stylesheet for the UPSC Mock Test plugin.
 *
 * This will style the mock test interface, results pages, and student dashboard.
 */
.upsc-mock-test-list {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fdfdfd;
}

.upsc-mock-test-list h2 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.upsc-mock-test-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.upsc-mock-test-item h3 {
    margin-top: 0;
    font-size: 1.5em;
}

.upsc-mock-test-item h3 a {
    text-decoration: none;
    color: #0073aa;
}

.upsc-mock-test-item h3 a:hover {
    color: #005177;
    text-decoration: underline;
}

.upsc-mock-test-excerpt {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 10px;
}

.upsc-mock-test-start-button {
    display: inline-block;
    background-color: #0073aa;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.upsc-mock-test-start-button:hover {
    background-color: #005177;
}

/* Student Dashboard Styles */
.upsc-student-dashboard {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fdfdfd;
}

.upsc-student-dashboard h2,
.upsc-student-dashboard h3 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 15px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
}

.upsc-test-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.upsc-test-history-table th,
.upsc-test-history-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.upsc-test-history-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #333;
}

.upsc-test-history-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.upsc-test-history-table a {
    color: #0073aa;
    text-decoration: none;
}

.upsc-test-history-table a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .upsc-mock-test-list h2,
    .upsc-student-dashboard h2,
    .upsc-student-dashboard h3 {
        font-size: 1.5em;
    }

    .upsc-mock-test-item h3 {
        font-size: 1.2em;
    }

    .upsc-test-history-table, .upsc-test-history-table tbody, .upsc-test-history-table tr, .upsc-test-history-table td, .upsc-test-history-table th {
        display: block;
    }

    .upsc-test-history-table thead {
        display: none;
    }

    .upsc-test-history-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .upsc-test-history-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    .upsc-test-history-table td:before {
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        content: attr(data-label); /* Use data-label for responsive table headers */
    }

    .upsc-test-history-table td:nth-of-type(1):before { content: "Test Name:"; }
    .upsc-test-history-table td:nth-of-type(2):before { content: "Score:"; }
    .upsc-test-history-table td:nth-of-type(3):before { content: "Time Taken:"; }
    .upsc-test-history-table td:nth-of-type(4):before { content: "Status:"; }
    .upsc-test-history-table td:nth-of-type(5):before { content: "Date Attempted:"; }
    .upsc-test-history-table td:nth-of-type(6):before { content: "Actions:"; }
}
