/* ============================================================
   RMF Course Schedule — style.css  v1.3
   ============================================================ */

/* ── Search + Filter toolbar ─────────────────────────────── */

.rmf-toolbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

/* Search box */
.rmf-search-wrap {
    position: relative;
    flex: 0 0 260px;
}

.rmf-search-wrap svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #888;
}

.rmf-search-input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    font-size: 14px;
    color: #222;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.rmf-search-input:focus {
    outline: none;
    border-color: #16186f;
}

/* Filter buttons */
.rmf-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.rmf-filter-btn {
    background: #16186f;
    color: #fff;
    border: 2px solid #16186f;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.rmf-filter-btn:hover {
    background: #2d30a0;
    border-color: #2d30a0;
    transform: translateY(-1px);
}

/* Active = inverted colours */
.rmf-filter-btn.active {
    background: #fff;
    color: #16186f;
    border-color: #16186f;
}

.rmf-filter-btn:focus-visible {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

/* No-results message */
.rmf-no-results {
    display: none;
    padding: 40px 20px;
    text-align: center;
    font-size: 16px;
    color: #666;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Wrapper ─────────────────────────────────────────────── */

.rmf-schedule-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* ── Category group ──────────────────────────────────────── */

.rmf-category-group {
    margin-bottom: 20px;
}

/* ── Category heading ────────────────────────────────────── */

.rmf-category-title {
    font-size: 26px;
    font-weight: 700;
    margin: 40px 0 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid #16186f;
    color: #16186f;
}

.rmf-category-group:first-child .rmf-category-title {
    margin-top: 0;
}

/* ── Course card ─────────────────────────────────────────── */

.rmf-course-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    padding: 36px 0;
    border-bottom: 1px solid #ddd;
}

/* ── Course info ─────────────────────────────────────────── */

.rmf-course-info h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #111;
}

.rmf-meta-row {
    display: flex;
    gap: 32px;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #16186f;
}

.rmf-description {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
}

.rmf-description p:last-child {
    margin-bottom: 0;
}

/* ── Date buttons ────────────────────────────────────────── */

.rmf-date-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: flex-start;
}

.rmf-date-btn {
    background: #16186f;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    min-width: 100px;
    text-align: center;
    transition: background 0.25s ease, transform 0.2s ease;
}

.rmf-date-btn:hover {
    background: #2d30a0;
    transform: translateY(-2px);
}

.rmf-date-btn:focus-visible {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

.rmf-date-btn.active {
    background: #2d30a0;
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

.rmf-date-btn span {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 3px;
}

.rmf-date-btn small {
    font-size: 12px;
    opacity: 0.9;
}

/* ── Modal overlay ───────────────────────────────────────── */

.rmf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 9990;
}

/* ── Modal ───────────────────────────────────────────────── */

.rmf-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 90%;
    max-width: 500px;
    padding: 44px 40px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 9999;
}

/* ── Modal close button ──────────────────────────────────── */

.rmf-close {
    position: absolute;
    top: 14px;
    right: 16px;
    border: none;
    background: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s ease, background 0.2s ease;
}

.rmf-close:hover {
    color: #16186f;
    background: #f0f0f0;
}

.rmf-close:focus-visible {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

/* ── Modal content ───────────────────────────────────────── */

.rmf-modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #16186f;
    padding-right: 30px;
}

.rmf-modal-content p {
    margin: 0 0 12px;
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

.rmf-modal-content p:last-child {
    margin-bottom: 0;
}

/* ── Checkout button ─────────────────────────────────────── */

.rmf-checkout-btn {
    display: inline-block;
    margin-top: 28px;
    background: #16186f;
    color: #fff;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.25s ease;
}

.rmf-checkout-btn:hover,
.rmf-checkout-btn:focus {
    background: #2d30a0;
    color: #fff;
}

.rmf-checkout-btn:focus-visible {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {

    .rmf-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-bottom: 24px;
    }

    .rmf-search-wrap {
        flex: none;
        width: 100%;
    }

    .rmf-filter-btn {
        font-size: 13px;
        padding: 8px 14px;
    }

    .rmf-course-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 28px 0;
    }

    .rmf-course-info h2 {
        font-size: 17px;
    }

    .rmf-category-title {
        font-size: 22px;
    }

    .rmf-meta-row {
        font-size: 15px;
        gap: 20px;
    }

    .rmf-modal {
        padding: 36px 24px 28px;
    }
}

@media (max-width: 400px) {

    .rmf-date-btn {
        min-width: 85px;
        padding: 10px;
    }

    .rmf-date-btn span { font-size: 13px; }
    .rmf-date-btn small { font-size: 11px; }
}
