/* ============================================================
   UKSOR — EVENT SYSTEM STYLESHEET
   Cleaned & Organised — August 2026
============================================================ */


/* ============================================================
   1. EVENT GRID (Upcoming Events)
============================================================ */

.rc-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.rc-event-card {
    background: #1A1A1A;
    border: 1px solid #FFD500;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.rc-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 16px;
}

.rc-title a {
    color: #fff;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

.rc-meta {
    color: #ccc;
    margin: 10px 0 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
}

.rc-button {
    display: inline-block;
    min-width: 130px;
    background: #FFD500;
    color: #000;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
}


/* ============================================================
   2. MEETING SCHEDULE — UKSOR MODERN CARDS
============================================================ */

.rc-all-events {
    width: 100%;
    min-width: 0;
}

/* Section headings */
.rc-all-events > h2 {
    background: #171717;
    color: #fff;
    border-left: 5px solid var(--uksor-red, #d00000);
    border-radius: 6px;
    padding: 13px 18px;
    margin: 0 0 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

/* Meeting cards */
.rc-all-events .rc-event-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: 3px solid var(--uksor-red, #d00000);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 22px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

/* Text column */
.rc-all-events .rc-event-info {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.rc-all-events .rc-event-item.has-ribbon .rc-event-info {
    padding-left: 24px;
}

.rc-all-events .rc-event-info h3 {
    margin: 0 0 12px;
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #171717;
}

.rc-all-events .rc-event-info h3 a {
    color: #171717;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rc-all-events .rc-event-info h3 a:hover {
    color: var(--uksor-red, #d00000);
}

.rc-all-events .rc-event-info p {
    margin: 6px 0;
    color: #444;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.rc-all-events .rc-event-info p strong {
    color: #171717;
    font-weight: 700;
}

/* Formula / completed line */
.rc-all-events .rc-event-info .rc-event-formulas {
    margin: 12px 0 0;
    padding: 10px 0 0;
    background: transparent;
    border: 0;
    border-top: 1px solid #ececec;
    border-radius: 0;
    color: #555;
    font-weight: 600;
}

/* Image column */
.rc-all-events .rc-event-thumb {
    flex: 0 0 38%;
    min-width: 0;
    margin: 0;
}

.rc-all-events .rc-event-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: transform 0.25s ease;
}

.rc-all-events .rc-event-thumb img:hover {
    transform: scale(1.02);
}

/* Past event result area */
.rc-all-events .rc-past-button {
    flex: 0 0 35%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
}

/* Separation between upcoming and past */
.rc-all-events > hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 30px 0;
}

/* Responsive layout */
@media (max-width: 700px) {

    .rc-all-events .rc-event-item {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 18px;
    }

    .rc-all-events .rc-event-info,
    .rc-all-events .rc-event-item.has-ribbon .rc-event-info {
        width: 100%;
        padding-left: 0;
    }

    .rc-all-events .rc-event-item.has-ribbon .rc-event-info {
        padding-top: 22px;
    }

    .rc-all-events .rc-event-info h3 {
        font-size: 18px;
    }

    .rc-all-events .rc-event-thumb,
    .rc-all-events .rc-past-button {
        flex: none;
        width: 100%;
    }

    .rc-all-events .rc-past-button {
        justify-content: flex-start;
    }
}

/* ============================================================
   3. RESULTS BUTTONS
============================================================ */

.rc-results-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 40px;
    min-width: 105px;
    padding: 0 16px;
    margin-left: 6px;
    background-color: #ffcc00;
    color: #000;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1;
    letter-spacing: -0.2px;
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: all 0.2s ease-in-out;
}

.rc-results-button:hover {
    background-color: #e0b800;
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
}

.rc-results-pending {
    display: inline-block;
    background: #ccc;
    color: #000;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 700;
    opacity: 0.8;
}

.rc-results-button:first-child {
    margin-left: 0;
}



/* ============================================================
   4–6. EVENT DETAIL — UKSOR MODERN STYLE
============================================================ */

.rc-event-detail {
    position: relative;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    font-family: 'Roboto', sans-serif;
}

/* ------------------------------------------------------------
   Title
------------------------------------------------------------ */

.rc-event-detail .rc-event-title {
    margin: 0 0 20px;
    padding: 13px 18px;
    background: #171717;
    color: #fff;
    border-left: 5px solid var(--uksor-red, #d00000);
    border-radius: 6px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.rc-event-detail .rc-orange-line {
    display: none;
}

/* ------------------------------------------------------------
   Split banner — preserve both images
------------------------------------------------------------ */

.rc-event-detail .rc-event-banner-split {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin: 0 0 20px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.rc-event-detail .rc-banner-left,
.rc-event-detail .rc-banner-right {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
}

.rc-event-detail .rc-banner-left img,
.rc-event-detail .rc-banner-right img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
}

/* ------------------------------------------------------------
   Meeting information
------------------------------------------------------------ */

.rc-event-detail .rc-event-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    margin: 0 0 20px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: 3px solid var(--uksor-red, #d00000);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.rc-event-detail .rc-event-meta p {
    margin: 0;
    padding: 9px 0;
    color: #444;
    font-size: 14px;
    line-height: 1.5;
    border-bottom: 1px solid #ececec;
}

.rc-event-detail .rc-event-meta p:nth-last-child(-n+2) {
    border-bottom: 0;
}

.rc-event-detail .rc-event-meta strong {
    color: #171717;
    font-weight: 700;
}

/* ------------------------------------------------------------
   Booking / registration / results
------------------------------------------------------------ */

.rc-event-detail .rc-event-actions-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin: 0 0 22px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
}

.rc-event-detail .rc-event-requirement {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    background: #fff7e6;
    border: 1px solid #e6c36a;
    border-radius: 6px;
    color: #664d00;
    font-size: 13px;
    font-weight: 700;
    box-sizing: border-box;
}

.rc-event-detail .rc-event-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    background: var(--uksor-red, #d00000);
    color: #fff;
    border: 1px solid var(--uksor-red, #d00000);
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rc-event-detail .rc-event-action-button:hover {
    background: #a90000;
    border-color: #a90000;
    color: #fff;
    transform: translateY(-1px);
}

/* Shared results buttons retain their yellow styling */
.rc-event-detail .rc-event-actions-row .rc-results-button {
    margin-left: 0;
}

.rc-event-detail .rc-event-actions-row .rc-results-pending {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    box-sizing: border-box;
}

/* ------------------------------------------------------------
   Description
------------------------------------------------------------ */

.rc-event-detail .rc-event-description {
    margin: 0 0 22px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #333;
    font-size: 15px;
    line-height: 1.7;
}

.rc-event-detail .rc-event-description p:first-child {
    margin-top: 0;
}

.rc-event-detail .rc-event-description p:last-child {
    margin-bottom: 0;
}

/* ------------------------------------------------------------
   Notes
------------------------------------------------------------ */

.rc-event-detail .rc-event-notes {
    margin: 0 0 22px;
    padding: 18px 20px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-left: 4px solid var(--uksor-red, #d00000);
    border-radius: 6px;
    color: #333;
    line-height: 1.6;
}

.rc-event-detail .rc-event-notes h3 {
    margin: 0 0 10px;
    color: #171717;
    font-size: 18px;
    font-weight: 700;
}

.rc-event-detail .rc-event-notes p:last-child {
    margin-bottom: 0;
}

/* ------------------------------------------------------------
   Existing formula panel, if used elsewhere in event detail
------------------------------------------------------------ */

.rc-event-detail .rc-event-formulas {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.rc-event-detail .rc-event-formulas h3 {
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--uksor-red, #d00000);
    font-size: 18px;
    font-weight: 600;
}

.rc-event-detail .rc-event-formulas ul {
    margin: 0;
    padding-left: 20px;
}

.rc-event-detail .rc-event-formulas li {
    margin-bottom: 4px;
}

/* ------------------------------------------------------------
   Mobile
------------------------------------------------------------ */

@media (max-width: 700px) {

    .rc-event-detail .rc-event-title {
        font-size: 20px;
        padding: 12px 15px;
    }

    .rc-event-detail .rc-event-banner-split {
        flex-direction: column;
    }

    .rc-event-detail .rc-banner-left,
    .rc-event-detail .rc-banner-right {
        flex: none;
        width: 100%;
    }

    .rc-event-detail .rc-banner-left img,
    .rc-event-detail .rc-banner-right img {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .rc-event-detail .rc-event-meta {
        grid-template-columns: 1fr;
        padding: 14px 16px;
    }

    .rc-event-detail .rc-event-meta p:nth-last-child(-n+2) {
        border-bottom: 1px solid #ececec;
    }

    .rc-event-detail .rc-event-meta p:last-child {
        border-bottom: 0;
    }

    .rc-event-detail .rc-event-actions-row {
        align-items: stretch;
        padding: 14px;
    }

    .rc-event-detail .rc-event-requirement,
    .rc-event-detail .rc-event-action-button {
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
    }

    .rc-event-detail .rc-event-description {
        padding: 16px;
    }
}


/* ============================================================
   7. MULTI-CLASS BADGE
============================================================ */

.rc-event-multiclass {
    margin-top: 10px;
    padding: 8px 12px;
    background: #e8f4ff;
    border-left: 4px solid #0073e6;
    border-radius: 4px;
    font-weight: 600;
    color: #004a99;
}


/* ============================================================
   8. RIBBONS (Event Detail + Archive)
============================================================ */

.event-ribbon {
    background: linear-gradient(90deg, #cc5a00 0%, #ff8c1a 50%, #cc5a00 100%);
    color: #000;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: absolute;
    top: 22px;
    left: -32px;
    width: 140px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-45deg);
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
    z-index: 20;
}

.rc-event-detail .rc-banner-left,
.rc-event-detail .rc-banner-right {
    z-index: 1;
}

/* Championship overrides (NEW CLASSES) */
.event-ribbon.irc {
    background: linear-gradient(90deg, #169b62 0%, #ffffff 50%, #ff883e 100%);
}

.event-ribbon.bc {
    background: linear-gradient(90deg, #cf142b 0%, #ffffff 50%, #00247d 100%);
}

.event-ribbon.sc {
    background: linear-gradient(90deg, #0065bd 0%, #ffffff 100%);
}

.event-ribbon.ec {
    background: linear-gradient(90deg, #003399 0%, #ffffff 50%, #003399 100%);
    color: #003399;
}

.event-ribbon.wcqr {
    background: linear-gradient(90deg, #ffcc00 0%, #ffffff 50%, #ffcc00 100%);
}

.event-ribbon.wcsf {
    background: linear-gradient(90deg, #ff6600 0%, #000000 100%);
    color: #fff;
}

.event-ribbon.wc {
    background: linear-gradient(90deg, #d4af37 0%, #000000 100%);
    color: #fff;
}

.event-ribbon.open {
    background: linear-gradient(90deg, #666 0%, #888 50%, #666 100%);
    color: #fff;
}

.event-ribbon.round-tag {
    background: #0066cc;
    color: #fff;
}



/* ============================================================
   9. ARCHIVE ROWS
============================================================ */

.rc-archive-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    font-size: 15px;
}

.rc-archive-left {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rc-archive-right {
    white-space: nowrap;
}

.rc-pagination a {
    padding: 6px 10px;
    margin: 0 4px;
    background: #eee;
    border-radius: 4px;
    text-decoration: none;
}

.rc-pagination .active {
    background: #333;
    color: #fff;
}


/* ============================================================
   10. EVENT DETAIL — LEFT/RIGHT ACTIONS (FINAL WORKING VERSION)
============================================================ */

.rc-event-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 15px 0;
}

.rc-event-actions-left {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 10px;
}

.rc-event-actions-right {
    flex: 1 1 auto;
    text-align: right;
}

.rc-event-actions-right a {
    margin-left: 10px;
}

/* ============================================================
   EVENT DETAIL — LEFT NOTICE ALIGNMENT
   ============================================================ */

.rc-event-actions-left .rc-notice {
    margin-bottom: 0;
    flex: 0 0 auto;
}

/* ============================================================
   11. BOOKING / REGISTRATION BUTTONS
============================================================ */


.rc-register-button {
    display: inline-block;
    background: #d00000;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
}

.rc-register-button:hover {
    background: #d00000;
    color: #fff;
    transform: scale(1.05);
}

.rc-book-button {
    display: inline-block;
    background: #0046aa;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
}

.rc-book-button:hover {
    background: #0046aa;
    color: #fff;
    transform: scale(1.05);
}

/* ============================================================
   CLASS BADGES (Manage Events)
============================================================ */

.rc-class-badge {
    display: inline-block;
    margin-top: 2px;
    margin-right: 6px;
    margin-bottom: 2px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Bangers */
.rc-class-bangers {
    background: #333;
}

/* 1300cc Series */
.rc-class-1300cc-series {
    background: #c40000;
}

/* F2 Stock Cars */
.rc-class-f2-stockcars {
    background: #005bbb;
}

/* 2L Hotrods */
.rc-class-2l-hotrods {
    background: #6a0dad;
}

/* Ministox */
.rc-class-ministox {
    background: #ff7a00;
}

/* Legends */
.rc-class-legends {
    background: #0077ff;
}


/* Multi Formula */
.rc-class-multi-formula {
    background: #444;
}

/* ============================================================
   EVENT TABLE — CLEAN COLUMN SPACING
============================================================ */

/* Column widths */
.rc-event-table td:first-child {
    width: 140px; /* class badge */
}
.rc-event-table td:nth-child(2) {
    width: 320px; /* event name */
}
.rc-event-table td:nth-child(3) {
    width: 180px; /* date/time */
}
.rc-event-table td:nth-child(4) {
    width: auto; /* formulas */
}

/* Inline filter bar */
.rc-filter-form {
    display: flex;
    align-items: center;
    gap: 12px;              /* spacing between items */
    flex-wrap: nowrap;      /* keep everything on one line */
    margin-bottom: 5px;
}

/* Make selects consistent size */
.rc-filter-form select {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Keep the Apply button aligned */
.rc-filter-form button {
    padding: 7px 14px;
    height: 46px;
    display: flex;
    align-items: center;
}

/* ============================================================
   NEXT MEETING TICKER — UKSOR
============================================================ */

.next-event-inline {
    display: flex;
    align-items: stretch;
    width: 100%;
    margin-bottom: 20px;

    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 8px;
    overflow: hidden;

    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.08);

    font-family: 'Roboto', sans-serif;
}


/* ============================================================
   LABEL
============================================================ */

.next-event-inline .ticker-label {
    display: flex;
    align-items: center;

    flex: 0 0 auto;

    padding: 10px 14px;

    background: #171717;
    color: #ffffff;

    border-left: 5px solid var(--uksor-red, #d00000);

    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.next-event-inline .ticker-label i {
    margin-right: 8px;

    color: var(--uksor-red, #d00000);

    font-size: 16px;
}


/* ============================================================
   MEETING DETAILS
============================================================ */

.next-event-inline .ticker-details {
    display: flex;
    align-items: center;

    flex: 1;
    min-width: 0;

    padding: 10px 14px;

    background: #ffffff;
    color: #333333;

    font-size: 15px;
    font-weight: 600;
}


/* ============================================================
   EVENT LINK
============================================================ */

.next-event-inline .ticker-details a {
    color: #222222;
    text-decoration: none;
    font-weight: 700;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.next-event-inline .ticker-details a:hover {
    color: var(--uksor-red, #d00000);
    text-decoration: none;
}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 700px) {

    .next-event-inline {
        display: block;
    }

    .next-event-inline .ticker-label {
        width: 100%;

        border-left: 0;
        border-bottom: 3px solid var(--uksor-red, #d00000);

        padding: 9px 12px;
    }

    .next-event-inline .ticker-details {
        width: 100%;

        padding: 10px 12px;

        font-size: 14px;
        line-height: 1.45;
    }
}