/* --- IELTS EXAM LEADERBOARD shortcode styles --- */

.iel-wrap {
    max-width: 800px;
    margin: 30px auto;
    font-family: inherit;
    color: #333;
    line-height: 1.5;
}

/* HEADER + DATE PICKER */
.iel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.iel-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: bold;
    color: #1a1a1a;
    line-height: 1.3;
}

.iel-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.iel-date-form {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.iel-date-form label {
    font-size: 14px;
    color: #555;
}

.iel-date-form input[type="date"] {
    border: 1px solid lightgray;
    border-radius: 3px;
    padding: 6px 8px;
    font-size: 14px;
}

/* PERIOD TABS (daily / weekly / monthly / yearly) */
.iel-period-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.iel-period-tab {
    display: inline-block;
    padding: 8px 14px;
    background-color: whitesmoke;
    border: 1px solid #bbb;
    border-radius: 5px;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 14px;
    line-height: 1;
}

.iel-period-tab:hover {
    background-color: rgb(232, 232, 232);
    border-color: #888;
}

.iel-period-tab.active {
    font-weight: bold;
    background-color: #333;
    border-color: #333;
    color: #fff !important;
}

/* PER-CATEGORY SECTION */
.iel-section {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid lightgray;
}

.iel-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.iel-section-heading {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: bold;
    color: #1a1a1a;
}

/* TEST-TYPE SUB-TABS */
.iel-type-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 12px;
    flex-wrap: wrap;
}

.iel-type-tab {
    display: inline-block;
    padding: 5px 12px;
    background-color: whitesmoke;
    border: 1px solid #bbb;
    border-radius: 5px;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 13px;
    line-height: 1;
}

.iel-type-tab:hover {
    background-color: rgb(232, 232, 232);
    border-color: #888;
}

.iel-type-tab.active {
    font-weight: bold;
    background-color: #333;
    border-color: #333;
    color: #fff !important;
}

.iel-window {
    margin-bottom: 12px;
    color: #555;
    font-size: 13px;
    font-style: italic;
}

/* BUTTONS */
.iel-btn {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #bbb;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none !important;
    cursor: pointer;
    background-color: whitesmoke;
    color: #333 !important;
}

.iel-btn:hover {
    background-color: rgb(232, 232, 232);
    border-color: #888;
}

/* Solid accent button — secondary CTA that still draws the eye. */
.iel-btn-accent {
    background-color: rgb(224, 0, 0);
    color: #fff !important;
    border-color: rgb(224, 0, 0);
    font-weight: bold;
}

.iel-btn-accent:hover {
    background-color: rgb(180, 0, 0);
    border-color: rgb(180, 0, 0);
}

/* EMPTY STATE CARD */
.iel-card {
    background-color: white;
    border: 1px solid lightgray;
    border-radius: 5px;
    padding: 18px 20px;
}

.iel-card-empty {
    text-align: center;
    color: #555;
    font-style: italic;
}

/* TABLE */
.iel-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border: 1px solid lightgray;
    border-radius: 5px;
    overflow: hidden;
    font-size: 14px;
}

.iel-table thead th {
    background-color: whitesmoke;
    border-bottom: 1px solid lightgray;
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: bold;
    color: #555;
}

.iel-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.iel-table tbody tr:last-child td {
    border-bottom: none;
}

.iel-table .iel-col-rank {
    width: 70px;
    text-align: center;
}

.iel-table .iel-col-band,
.iel-table .iel-col-detail,
.iel-table .iel-col-time {
    width: 90px;
    text-align: center;
}

.iel-rank {
    color: #666;
    font-weight: bold;
}

.iel-medal {
    font-size: 20px;
}

/* CURRENT USER ROW HIGHLIGHT */
.iel-row-current-user {
    background-color: #fff8e1 !important;
    font-weight: bold;
}

.iel-row-current-user td {
    border-color: #fbe9b0 !important;
}

/* "YOUR RANK" SUMMARY (when user is below the visible page) */
.iel-your-rank {
    margin-top: 12px;
    padding: 10px 14px;
    background-color: #fff8e1;
    border: 1px solid #fbe9b0;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* MOBILE */
@media screen and (max-width: 600px) {
    .iel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .iel-table {
        font-size: 13px;
    }

    .iel-table thead th,
    .iel-table tbody td {
        padding: 8px;
    }

    .iel-table .iel-col-band,
    .iel-table .iel-col-detail,
    .iel-table .iel-col-time {
        width: auto;
    }
}
