:root {
    --primary-color: #2148C0;
    --secondary-color: #FF5722;
}

/* same gutter fix all_courses.css applies to .courses-grid .row */
.ab-grid .row {
    margin-left: -12px;
    margin-right: -12px;
    row-gap: 24px;
}

.ab-grid .row > [class^="col"] {
    padding-left: 12px;
    padding-right: 12px;
}

/* status tabs (Upcoming / Active / Past) */
.ab-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    border: none;
    margin-bottom: 32px;
}

.ab-tabs .nav-item {
    list-style: none;
}

.ab-tab-btn {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .92rem;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    transition: all .25s;
    cursor: pointer;
}

.ab-tab-btn:hover {
    background: #eef1fb;
}

.ab-tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.ab-tab-count {
    background: rgba(33, 72, 192, .12);
    color: inherit;
    border-radius: 999px;
    padding: 1px 10px;
    font-size: .76rem;
    font-weight: 800;
}

.ab-tab-btn.active .ab-tab-count {
    background: rgba(255, 255, 255, .25);
}

/* status ribbon on the card's icon header, opposite side from course-badge */
.ab-status-ribbon {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.ab-ribbon-upcoming {
    background: #fef9c3;
    color: #854d0e;
}

.ab-ribbon-active {
    background: #dcfce7;
    color: #15803d;
}

.ab-ribbon-past {
    background: #e5e7eb;
    color: #4b5563;
}

/* teacher + batch-label row */
.ab-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    font-size: .82rem;
}

.ab-teacher {
    color: #555;
    font-weight: 600;
}

.ab-teacher i {
    color: var(--primary-color);
    margin-right: 5px;
}

.ab-batch-tag {
    background: #eef2ff;
    color: #4338ca;
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.ab-completed-note {
    flex: 1;
    text-align: center;
    color: #4b5563;
    font-weight: 700;
    font-size: .86rem;
    background: #f3f4f6;
    padding: 10px;
    border-radius: 20px;
}

.ab-completed-note i {
    color: #22c55e;
    margin-right: 6px;
}

/* deep-link highlight: briefly draws the eye to the specific batch card a "View Batches" button on all_courses.php was pointed at */
.course-card.ab-highlight {
    animation: ab-highlight-pulse 1.5s ease-in-out 2;
    border-color: var(--secondary-color);
}

@keyframes ab-highlight-pulse {
    0%, 100% {
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(255, 87, 34, .35), 0 12px 30px rgba(0, 0, 0, 0.25);
    }
}

/* shown when a deep-linked course has no batch yet */
.ab-no-match-note {
    background: #fff7ed;
    border: 1.5px solid #fed7aa;
    color: #9a3412;
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 24px;
    font-size: .9rem;
    font-weight: 600;
}

.ab-no-match-note i {
    color: #ea580c;
}

@media (max-width: 576px) {
    .ab-tab-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
        font-size: .85rem;
    }
}
/* "Enroll Batch" / "Join Waitlist": same white + blue-border look as "Course Details" (only on this page) */
.course-actions .btn-course {
    background: transparent;
    color: var(--primary-color, #2148C0);
    border: 2px solid var(--primary-color, #2148C0);
    padding: 8px 20px;
}
.course-actions .btn-course:hover {
    background: var(--primary-color, #2148C0);
    color: #fff;
    transform: none;
}
/* locked state (Closed / Not Open / level full) stays greyed out */
.course-actions .btn-course.btn-disabled {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #d1d5db;
}

/* white buttons with a coloured border fill with that colour on hover / click (site-wide rule) */
.ab-tab-btn:hover,
.ab-tab-btn:active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.ab-tab-btn:hover i,
.ab-tab-btn:active i {
    color: inherit;
}
