/**
 * Frontpage Odds Matches Widget
 * [oe_frontpage_odds_matches] shortcode styling
 */

.oe-frontpage-odds {
    width: 100%;
    margin: 0 auto;
    background: transparent !important;
}

.oe-frontpage-odds__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.oe-frontpage-odds__card {
    position: relative;
    background: var(--oe-color-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 16px;
}

/* Bookmaker logo (upper right corner) */
.oe-frontpage-odds__bookmaker {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
}

.oe-frontpage-odds__bookmaker-logo {
    width: 48px;
    height: 24px;
    object-fit: contain;
}

/* League header */
.oe-frontpage-odds__league {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--oe-color-border);
}

.oe-frontpage-odds__league-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.oe-frontpage-odds__league-name {
    font-size: 12px;
    color: var(--oe-color-text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Teams link (clickable to match page) */
.oe-frontpage-odds__teams-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 12px;
}

.oe-frontpage-odds__teams-link:hover {
    background: var(--oe-color-primary-tint);
    border-radius: 6px;
}

.oe-frontpage-odds__teams-link:hover .oe-frontpage-odds__team {
    color: var(--oe-color-primary);
}

.oe-frontpage-odds__teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}

.oe-frontpage-odds__team {
    font-size: 13px;
    font-weight: 600;
    color: var(--oe-color-text-dark);
    line-height: 1.4;
    transition: color 0.2s ease;
    min-width: 0;
}

.oe-frontpage-odds__team--home {
    text-align: center;
}

.oe-frontpage-odds__team--away {
    text-align: center;
}

.oe-frontpage-odds__vs {
    font-size: 11px;
    color: var(--oe-color-text-light);
    text-transform: lowercase;
    flex-shrink: 0;
}

/* Kick-off time (inside absolute-positioned corner) */
.oe-frontpage-odds__kickoff {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--oe-color-text);
}

/* Bookmaker logo (in-flow, between teams and odds) */
.oe-frontpage-odds__bookmaker-row {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.oe-frontpage-odds__date {
    font-weight: 500;
}

.oe-frontpage-odds__time {
    font-weight: 600;
    color: var(--oe-color-text-dark);
}

/* Odds row */
.oe-frontpage-odds__odds {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

/* Odds buttons (clickable links to bookmaker) */
.oe-frontpage-odds__odd {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 3px;
    background: var(--oe-color-bg);
    border-radius: 5px;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--oe-color-border-light, rgba(0, 0, 0, 0.06));
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.oe-frontpage-odds__odd:hover {
    background: var(--oe-color-bg-alt);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.oe-frontpage-odds__odd-label {
    font-size: 9px;
    color: var(--oe-color-text-light);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1px;
}

.oe-frontpage-odds__odd-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--oe-color-primary);
}

/* Legal disclaimer */
.oe-frontpage-odds__legal {
    margin-top: 10px;
    padding: 6px 0;
    font-size: 10px;
    font-style: italic;
    color: var(--oe-color-text-light);
    text-align: center;
    line-height: 1.5;
}

.oe-frontpage-odds__legal a {
    color: var(--oe-color-text-light);
    text-decoration: underline;
}

.oe-frontpage-odds__legal a:hover {
    color: var(--oe-color-text);
}

/* Responsive: tablet */
@media (max-width: 900px) {
    .oe-frontpage-odds__grid {
        gap: 12px;
    }

    .oe-frontpage-odds__card {
        padding: 14px;
    }
}

/* Responsive: mobile */
@media (max-width: 640px) {
    .oe-frontpage-odds__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .oe-frontpage-odds__card {
        max-width: 100%;
        padding: 14px 16px;
    }

    .oe-frontpage-odds__teams-link {
        margin-bottom: 10px;
    }

    .oe-frontpage-odds__odd {
        padding: 5px 3px;
        gap: 0;
    }

    .oe-frontpage-odds__odd-label {
        font-size: 7px;
    }

    .oe-frontpage-odds__odd-value {
        font-size: 10px;
    }

    .oe-frontpage-odds__legal {
        font-size: 9px;
    }
}
