/**
 * Frontpage Leagues Shortcode Styles
 *
 * Full-width league cards with country, season, round, and match info
 *
 * @since 2.0.22
 */

/* Container */
.oe-frontpage-leagues {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.oe-frontpage-leagues--empty {
    padding: 40px;
    text-align: center;
    color: var(--oe-color-text);
    background: var(--oe-color-bg);
    border-radius: 8px;
}

.oe-frontpage-leagues__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* League Card */
.oe-frontpage-leagues__card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--oe-color-white);
    border: 1px solid var(--oe-color-border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.oe-frontpage-leagues__card:hover {
    border-color: var(--oe-color-primary);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.15);
    transform: translateY(-2px);
}

.oe-frontpage-leagues__card:hover .oe-frontpage-leagues__arrow {
    color: var(--oe-color-primary);
    transform: translateX(4px);
}

/* Logos Section */
.oe-frontpage-leagues__logos {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-width: 90px;
}

.oe-frontpage-leagues__flag {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.oe-frontpage-leagues__logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Info Section */
.oe-frontpage-leagues__info {
    flex: 1;
    min-width: 0;
}

.oe-frontpage-leagues__name {
    margin: 0 0 4px 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--oe-color-text-dark);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oe-frontpage-leagues__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--oe-color-text);
}

.oe-frontpage-leagues__country {
    color: var(--oe-color-text-light);
}

.oe-frontpage-leagues__season {
    padding-left: 8px;
    border-left: 1px solid var(--oe-color-border);
}

/* Status Badge */
.oe-frontpage-leagues__status {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Upcoming season (starts soon) */
.oe-frontpage-leagues__status--upcoming {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

/* Season on break */
.oe-frontpage-leagues__status--break {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
    border: 1px solid #ffcc80;
}

/* Season ended/finished */
.oe-frontpage-leagues__status--finished {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    color: #616161;
    border: 1px solid #bdbdbd;
}

/* Off-season (no current season) */
.oe-frontpage-leagues__status--off-season {
    background: linear-gradient(135deg, #fce4ec, #f8bbd9);
    color: #c2185b;
    border: 1px solid #f48fb1;
}

/* Inline meta stats (same style as season) */
.oe-frontpage-leagues__meta-stat {
    padding-left: 8px;
    border-left: 1px solid var(--oe-color-border);
}

/* Tips highlight when count > 0 */
.oe-frontpage-leagues__meta-stat--tips {
    color: var(--oe-color-primary);
    font-weight: 600;
}

/* Arrow */
.oe-frontpage-leagues__arrow {
    flex-shrink: 0;
    color: var(--oe-color-border);
    transition: all 0.2s ease;
}

.oe-frontpage-leagues__arrow svg {
    display: block;
}

/* ================================
   TABS
   ================================ */

.oe-frontpage-leagues__tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    background: var(--oe-color-white);
    padding: 6px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.oe-frontpage-leagues__tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 0%;
    padding: 10px 8px;
    background: var(--oe-color-bg);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--oe-color-text);
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.oe-frontpage-leagues__tab:hover,
.oe-frontpage-leagues__tab:focus,
.oe-frontpage-leagues__tab:active {
    background: var(--oe-color-primary-tint);
    color: var(--oe-color-primary);
    outline: none;
}

.oe-frontpage-leagues__tab:focus-visible {
    outline: 2px solid var(--oe-color-primary);
    outline-offset: -2px;
}

.oe-frontpage-leagues__tab.active,
.oe-frontpage-leagues__tab.active:hover,
.oe-frontpage-leagues__tab.active:focus,
.oe-frontpage-leagues__tab.active:active {
    background: var(--oe-color-primary);
    color: #fff;
}

.oe-frontpage-leagues__tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
}

.oe-frontpage-leagues__tab:not(.active) .oe-frontpage-leagues__tab-badge {
    background: var(--oe-color-bg-alt);
    color: var(--oe-color-text-light);
}

.oe-frontpage-leagues__tab-panel {
    display: none;
}

.oe-frontpage-leagues__tab-panel.active {
    display: block;
    animation: oe-frontpage-fadeIn 0.2s ease;
}

@keyframes oe-frontpage-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

/* Tablet */
@media (max-width: 900px) {
    .oe-frontpage-leagues__meta {
        font-size: 12px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .oe-frontpage-leagues__card {
        flex-wrap: wrap;
        padding: 14px 16px;
        gap: 12px;
    }

    .oe-frontpage-leagues__logos {
        min-width: auto;
        gap: 8px;
    }

    .oe-frontpage-leagues__flag {
        width: 24px;
        height: 17px;
    }

    .oe-frontpage-leagues__logo {
        width: 32px;
        height: 32px;
    }

    .oe-frontpage-leagues__info {
        flex: 1;
        min-width: calc(100% - 90px);
    }

    .oe-frontpage-leagues__name {
        font-size: 15px;
    }

    .oe-frontpage-leagues__meta {
        font-size: 12px;
    }

    .oe-frontpage-leagues__arrow {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
    }

    .oe-frontpage-leagues__card {
        position: relative;
        padding-right: 40px;
    }

    .oe-frontpage-leagues__card:hover .oe-frontpage-leagues__arrow {
        transform: translateY(-50%) translateX(4px);
    }
}

/* Small mobile */
@media (max-width: 400px) {
    .oe-frontpage-leagues__meta {
        font-size: 11px;
    }

    .oe-frontpage-leagues__tabs {
        gap: 3px;
        padding: 4px;
    }

    .oe-frontpage-leagues__tab {
        padding: 8px 4px;
        font-size: 12px;
        gap: 4px;
    }

    .oe-frontpage-leagues__tab-badge {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
        padding: 0 4px;
    }
}

