/* Matches Public Page */

.matches-calendar-section {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(circle at top right, rgba(10, 168, 158, 0.08), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.matches-calendar-header {
    position: relative;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.matches-calendar-header .section-title {
    margin-bottom: 8px;
    line-height: 1.05;
}

.matches-calendar-header .public-list-subtitle {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
    max-width: 840px;
}

.matches-calendar-header .public-list-count {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(10, 106, 99, 0.08);
    color: #0a6a63;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.matches-filter-bar {
    position: relative;
    border-color: rgba(10, 106, 99, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 251, 0.98) 100%);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.matches-filter-field .control-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #60707b;
}

.matches-search-input,
.matches-select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.matches-search-input::placeholder {
    color: #7a8794;
    font-weight: 600;
}

.matches-view-nav,
.matches-month-nav {
    position: relative;
    margin-bottom: 16px;
    padding: 4px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 16px;
    background: rgba(248, 251, 253, 0.92);
}

.matches-month-chip,
.matches-view-chip {
    min-height: 36px;
    padding: 0 14px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.matches-view-chip.is-active,
.matches-view-chip:hover,
.matches-month-chip.is-active,
.matches-month-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(10, 106, 99, 0.08);
}

.matches-active-filters {
    margin-bottom: 18px;
}

.matches-active-filter {
    box-shadow: inset 0 0 0 1px rgba(10, 106, 99, 0.05);
}

.matches-live-strip {
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(220, 38, 38, 0.12), transparent 34%),
        linear-gradient(135deg, rgba(255, 247, 247, 0.98), rgba(245, 251, 250, 0.98));
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

.matches-live-strip__head h2 {
    font-weight: 900;
    color: #15212b;
}

.matches-live-strip__badge {
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.08);
}

.matches-month-block {
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 252, 253, 0.98) 100%);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.045);
}

.matches-month-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.matches-month-head h2 {
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #14212a;
}

.matches-day-block {
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
}

.matches-day-head {
    padding-bottom: 6px;
}

.matches-day-label {
    letter-spacing: -0.01em;
}

.matches-card-grid {
    gap: 12px;
}

.match-calendar-card {
    position: relative;
    gap: 8px;
    padding: 12px;
    border-color: rgba(15, 23, 42, 0.07);
    background:
        linear-gradient(180deg, #ffffff 0%, #f9fcfd 100%);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.match-calendar-card::before {
    display: none;
    content: none;
}

.match-calendar-card:hover {
    transform: translateY(-2px);
    border-color: rgba(10, 106, 99, 0.14);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

.match-calendar-card.is-live {
    border-color: rgba(220, 38, 38, 0.14);
    box-shadow: 0 8px 22px rgba(220, 38, 38, 0.08);
}

.match-calendar-card.is-live::before {
    display: none;
    content: none;
}

.match-calendar-card__top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding-bottom: 2px;
}

.match-calendar-card__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 0;
}

.match-calendar-card__league,
.match-calendar-card__jornada,
.match-calendar-card__time,
.match-calendar-card__local-badge,
.match-calendar-card__live-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.match-calendar-card__league {
    max-width: 100%;
    background: rgba(15, 23, 42, 0.05);
    color: #5f6b76;
}

.match-calendar-card .proximo-liga {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #5f6b76;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-calendar-card__meta + .match-calendar-card__time,
.match-calendar-card__top .match-calendar-card__time {
    align-self: center;
}

.match-calendar-card__time {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(0,0,0,.04);
    border: 1px solid rgba(0,0,0,.06);
    color: #0a6a63;
    font-size: 12px;
    font-weight: 800;
}

.match-calendar-card__jornada {
    background: rgba(10, 168, 158, 0.10);
    color: #0a6a63;
}

.match-calendar-card__local-badge {
    background: rgba(37, 99, 235, 0.10);
    color: #1d4ed8;
}

.match-calendar-card__live-state {
    align-self: center;
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.match-calendar-card__live-state.is-break {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.match-calendar-card__time.is-pending {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(217, 119, 6, .18);
    color: #b45309;
}

.match-calendar-card__league {
    overflow-wrap: anywhere;
}

.match-calendar-card__teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 8px;
    padding: 2px 0;
}

.match-calendar-card__team {
    display: flex;
    align-items: stretch;
    min-width: 0;
}

.match-calendar-card__team .team-link-inline {
    width: 100%;
    min-width: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 4px 2px 0;
    color: inherit;
    transition: color 0.2s ease, transform 0.2s ease;
}

.match-calendar-card__team .team-link-inline:hover {
    transform: translateY(-1px);
}

.match-calendar-card__team .team-link-inline:hover > span:not(.team-shield-wrap) {
    color: #0a6a63;
}

.match-calendar-card__team.is-away > .team-link-inline {
    flex-direction: column-reverse;
}

.match-calendar-card__team > .team-shield-wrap,
.match-calendar-card__team > .team-link-inline > .team-shield-wrap {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
}

.match-calendar-card__team > .team-shield-wrap,
.match-calendar-card__team > .team-link-inline > .team-shield-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 999px;
}

.match-calendar-card__team > .team-shield-wrap,
.match-calendar-card__team > .team-link-inline > .team-shield-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.98) 0%, rgba(247,250,252,.96) 48%, rgba(236,242,247,.96) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.9),
        0 8px 18px rgba(15, 23, 42, 0.10);
}

.match-calendar-card__team > .team-shield-wrap .team-shield,
.match-calendar-card__team > .team-link-inline > .team-shield-wrap .team-shield {
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    max-width: calc(100% - 4px);
    max-height: calc(100% - 4px);
    object-fit: contain;
    object-position: center;
    filter: none;
}

.match-calendar-card__team > .team-shield-wrap::after,
.match-calendar-card__team > .team-link-inline > .team-shield-wrap::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255,255,255,.7);
    pointer-events: none;
}

.match-calendar-card__team > .team-shield-wrap .team-shield-fallback,
.match-calendar-card__team > .team-link-inline > .team-shield-wrap .team-shield-fallback,
.match-calendar-card__team > .team-shield-fallback,
.match-calendar-card__team > .team-link-inline > .team-shield-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 14px;
    background: rgba(10, 168, 158, 0.10);
    border: 1px solid rgba(10, 168, 158, 0.16);
    box-shadow: none;
}

.match-calendar-card__team > .team-shield-wrap.is-fallback .team-shield-fallback,
.match-calendar-card__team > .team-link-inline > .team-shield-wrap.is-fallback .team-shield-fallback,
.match-calendar-card__team > .team-shield-wrap.is-fallback-only .team-shield-fallback,
.match-calendar-card__team > .team-link-inline > .team-shield-wrap.is-fallback-only .team-shield-fallback {
    display: inline-flex;
}

.match-calendar-card__team > span:not(.team-shield-wrap),
.match-calendar-card__team > .team-link-inline > span:not(.team-shield-wrap) {
    min-width: 0;
    max-width: 100%;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    color: #15212b;
    text-align: center;
    white-space: nowrap;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.2em;
}

.match-calendar-card__versus {
    align-self: center;
    width: auto;
    height: auto;
    min-width: 34px;
    min-height: 34px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: none;
    color: #607180;
}

.match-calendar-card__versus.match-info-link {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.match-calendar-card__versus:hover {
    background: rgba(10, 168, 158, 0.10);
    border-color: rgba(10, 168, 158, 0.18);
    color: #0a6a63;
}

.match-calendar-card .partido-card-action {
    margin-top: 2px;
    justify-content: center;
    padding-top: 2px;
}

.match-calendar-card .partido-card-action .match-info-link {
    min-height: 34px;
    padding-inline: 14px;
    font-size: 12px;
}

.matches-empty-state {
    padding: 24px 0 8px;
}

.matches-empty-state .u-muted {
    margin: 0;
    padding: 18px;
    border: 1px dashed rgba(15, 23, 42, 0.14);
    border-radius: 16px;
    background: rgba(248, 251, 253, 0.9);
}

.matches-content-layout > .home-sidebar {
    gap: 14px;
}

.matches-content-layout > .home-sidebar .sidebar-card {
    border-color: rgba(15, 23, 42, 0.07);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 253, 0.98) 100%);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.matches-content-layout > .home-sidebar .sidebar-card:hover {
    border-color: rgba(10, 106, 99, 0.12);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.matches-content-layout > .home-sidebar .sidebar-head {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.matches-content-layout > .home-sidebar .sidebar-title {
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #15212b;
}

.matches-content-layout > .home-sidebar .sidebar-subtitle {
    margin-bottom: 12px;
    color: #60707b;
}

.matches-content-layout > .home-sidebar .sidebar-link-all {
    font-weight: 800;
}

.matches-content-layout > .home-sidebar .sidebar-list li,
.matches-content-layout > .home-sidebar .sidebar-match-item,
.matches-content-layout > .home-sidebar .sidebar-live-item {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
}

.matches-content-layout > .home-sidebar .sidebar-score-link,
.matches-content-layout > .home-sidebar .sidebar-next-link,
.matches-content-layout > .home-sidebar .sidebar-live-link.match-info-link {
    border-radius: 14px;
    border-color: rgba(10, 106, 99, 0.10);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.matches-content-layout > .home-sidebar .sidebar-score-link:hover,
.matches-content-layout > .home-sidebar .sidebar-next-link:hover,
.matches-content-layout > .home-sidebar .sidebar-live-link.match-info-link:hover {
    border-color: rgba(10, 106, 99, 0.16);
}

.matches-content-layout > .home-sidebar .sidebar-live-link.match-info-link {
    background: linear-gradient(180deg, rgba(255, 247, 247, 0.98), rgba(245, 251, 250, 0.98));
}

.matches-content-layout > .home-sidebar .sidebar-next-link {
    background: linear-gradient(180deg, rgba(248, 251, 253, 0.98), rgba(242, 248, 249, 0.98));
}

.matches-content-layout > .home-sidebar .sidebar-team .team-link-inline {
    color: inherit;
}

.matches-content-layout > .home-sidebar .sidebar-team .team-link-inline:hover > span:last-child {
    color: #0a6a63;
}

.matches-content-layout > .home-sidebar .sidebar-links a {
    border-radius: 12px;
}

@media (max-width: 900px) {
    .matches-calendar-section {
        padding: 16px;
    }

    .matches-month-block {
        padding: 16px;
    }

    .matches-day-block {
        padding: 12px;
    }

    .matches-content-layout > .home-sidebar {
        gap: 12px;
    }

    .matches-filter-bar,
    .matches-live-grid,
    .matches-card-grid {
        grid-template-columns: 1fr;
    }

    .matches-filter-bar {
        padding: 12px;
        gap: 10px;
    }
}

@media (max-width: 640px) {
    .matches-calendar-section {
        padding: 14px;
        border-radius: 16px;
    }

    .matches-calendar-header {
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .matches-calendar-header .public-list-subtitle {
        gap: 8px;
        font-size: 14px;
    }

    .matches-view-nav,
    .matches-month-nav {
        margin-bottom: 14px;
        padding: 4px;
        border-radius: 14px;
        gap: 6px;
    }

    .matches-month-chip,
    .matches-view-chip {
        min-height: 34px;
        padding: 0 12px;
        font-size: 12px;
    }

    .matches-filter-field {
        gap: 4px;
    }

    .matches-filter-field .control-label {
        font-size: 11px;
    }

    .matches-search-input,
    .matches-select,
    .matches-filter-actions .btn-primary,
    .matches-filter-actions .btn-ghost {
        min-height: 42px;
    }

    .matches-filter-actions {
        flex-direction: column;
    }

    .matches-search-icon {
        left: 12px;
        font-size: 16px;
    }

    .matches-select-icon {
        right: 12px;
        font-size: 16px;
    }

    .matches-live-strip,
    .matches-month-block {
        padding: 14px;
        border-radius: 18px;
    }

    .matches-month-head {
        padding-bottom: 10px;
    }

    .matches-day-block {
        padding: 11px;
        border-radius: 16px;
    }

    .matches-content-layout > .home-sidebar .sidebar-card {
        border-radius: 16px;
    }

    .matches-content-layout > .home-sidebar .sidebar-head {
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .match-calendar-card {
        padding: 14px;
        border-radius: 16px;
    }

    .match-calendar-card__top,
    .match-calendar-card__teams {
        align-items: stretch;
    }

    .match-calendar-card__meta {
        gap: 5px;
    }

    .match-calendar-card__team .team-link-inline {
        padding: 4px 0 0;
    }

    .match-calendar-card__team .team-shield-wrap,
    .match-calendar-card__team .team-shield-fallback {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .match-calendar-card__versus {
        width: 36px;
        min-width: 36px;
        min-height: 36px;
        padding: 0;
        border-radius: 12px;
    }
}

@media (max-width: 390px) {
    .matches-calendar-section {
        padding: 12px;
    }

    .matches-calendar-header .section-title {
        font-size: clamp(24px, 7vw, 28px);
    }

    .matches-calendar-header .public-list-subtitle {
        font-size: 13px;
    }

    .matches-live-strip,
    .matches-month-block,
    .match-calendar-card {
        padding: 12px;
    }

    .matches-day-block {
        padding: 10px;
    }

    .matches-content-layout > .home-sidebar .sidebar-card {
        border-radius: 14px;
    }

    .matches-day-label {
        font-size: 14px;
    }

    .match-calendar-card__league,
    .match-calendar-card__jornada,
    .match-calendar-card__time,
    .match-calendar-card__local-badge,
    .match-calendar-card__live-state {
        min-height: 26px;
        padding: 0 9px;
        font-size: 11px;
    }

    .match-calendar-card__team span:last-child,
    .match-calendar-card__team .team-link-inline > span:last-child {
        font-size: 10.5px;
    }
}
