/* ==========================================================================
   Race Boxes / Race Widgets - DIRTcar Widgets
   ========================================================================== */

/* Widget Container */
.widget-center {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Next & Last Races Widget */
.races-widget {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background-color: #FFF;
    text-align: center;
    margin-bottom: 4px;
    border-radius: 4px;
    font-family: var(--font-family, 'Oswald', sans-serif);
    text-transform: uppercase;
    min-height: 38px;
}

.race-widget-date {
    padding: 0 12px;
    font-size: 1.0rem;
    font-weight: 600;
    line-height: 18px;
    border-right: 1px solid var(--primary-color, #EA1C24);
    width: 60px;
}

.race-widget-name {
    line-height: 16px;
    width: 240px;
}

.race-widget-logo {
    display: flex;
    padding: 2px;
    justify-content: center;
}

.race-widget-logo img {
    max-width: 45px;
    height: auto;
}

.race-widget-button {
    background-color: var(--primary-color, #EA1C24);
    color: #FFF;
    padding: 3px 4px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.race-widget-button:hover,
.green:hover {
    background-color: var(--hover-color, #171717);
}

.race-widget-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 2px;
}

.widget-schedule-link,
.widget-schedule-link a {
    text-align: right;
    font-size: 1.0rem;
    font-family: var(--font-family, 'Oswald', sans-serif);
    font-weight: 600;
    line-height: 1.2em;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #FFF !important;
    text-decoration: none;
}

.widget-schedule-link a:hover {
    color: var(--hover-color, #F15A22) !important;
}

/* Live Status */
.green {
    background-color: #008000;
}

/* ==========================================================================
   Series Specific Button Colors
   ========================================================================== */
.superdirtcar,
.race-widget-button.superdirtcar {
    background-color: #EA1C24;
}

.summernationals,
.race-widget-button.summernationals {
    background-color: #F15A22;
}

.xtremeoutlaw,
.race-widget-button.xtremeoutlaw {
    background-color: #C12B2A;
}

.volusia,
.race-widget-button.volusia {
    background-color: #1a1a1a;
}

.ascs,
.race-widget-button.ascs {
    background-color: #AA3339;
}

.xtremedirtcar,
.race-widget-button.xtremedirtcar {
    background-color: #000000;
}

/* ==========================================================================
   Legacy Styles (camelCase class names)
   ========================================================================== */
.raceswidget {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background-color: #FFF;
    text-align: center;
    margin-bottom: 4px;
    border-radius: 4px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    min-height: 38px;
}

.racewidgetdate,
.racewidgetname {
    padding: 0 12px;
    font-size: 1.0rem;
    line-height: 18px;
    border-right: 1px solid #EA1C24;
}

.racewidgetlogo {
    display: flex;
    padding: 2px;
    justify-content: center;
}

.racewidgetlogo img {
    max-width: 45px;
    height: auto;
}

.racewidgetbutton {
    background-color: #EA1C24;
    color: #FFF;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.racewidgetbutton:hover {
    background-color: #171717;
}

.racewidgetbuttoncontainer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 2px;
}

.widgetschedulelink,
.widgetschedulelink a {
    text-align: right;
    font-size: 1.0rem;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    line-height: 1.4em;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #FFF;
    text-decoration: none;
}

.widgetschedulelink a:hover {
    color: #F15A22;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 767px) {
    .races-widget {
        flex-direction: column;
        padding: 10px;
    }

    .race-widget-date {
        border-right: none;
        border-bottom: 1px solid var(--primary-color, #EA1C24);
        width: 100%;
        padding: 5px 0;
    }

    .race-widget-name {
        width: 100%;
        padding: 5px 0;
    }

    .race-widget-button-container {
        margin-right: 0;
        margin-top: 5px;
    }
}
