/* =========================================================
   Fanzo Events – Front-end Styles
   Matches the "Upcoming Sporting Events" screenshot design.
   ========================================================= */

/* ---- Variables ---- */
:root {
    --fanzo-green:       #3d6b5a;
    --fanzo-green-dark:  #2f5245;
    --fanzo-white:       #ffffff;
    --fanzo-text:        #222222;
    --fanzo-muted:       #666666;
    --fanzo-border:      #e0e0e0;
    --fanzo-radius:      6px;
    --fanzo-font:        inherit;
}

/* =========================================================
   EVENTS LIST
   ========================================================= */

.fanzo-events-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 40px;
    font-family: var(--fanzo-font);
}

.fanzo-events-title {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--fanzo-green);
    margin-bottom: 28px;
}

/* ---- Filter bar (search + date) ---- */
.fanzo-events-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.fanzo-filter-search,
.fanzo-filter-date {
    position: relative;
    flex: 1 1 220px;
    max-width: 320px;
}

.fanzo-filter-search-input,
.fanzo-filter-date-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 34px 10px 14px;
    border: 1px solid var(--fanzo-border);
    border-radius: var(--fanzo-radius);
    font-size: .9rem;
    font-family: var(--fanzo-font);
    color: var(--fanzo-text);
    background: var(--fanzo-white);
}
.fanzo-filter-search-input:focus,
.fanzo-filter-date-input:focus {
    outline: none;
    border-color: var(--fanzo-green);
}

.fanzo-filter-search-clear,
.fanzo-filter-date-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--fanzo-muted);
    cursor: pointer;
    padding: 4px 6px;
}
.fanzo-filter-search-clear:hover,
.fanzo-filter-date-clear:hover {
    color: var(--fanzo-text);
}

.fanzo-events-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: opacity .15s ease;
}
.fanzo-events-table[aria-busy="true"] {
    opacity: .5;
}

/* ---- Single Row ---- */
.fanzo-row {
    display: grid;
    grid-template-columns: 220px 140px 80px 1fr auto;
    align-items: center;
    gap: 12px;
    background: var(--fanzo-white);
    border: 1px solid var(--fanzo-border);
    border-radius: var(--fanzo-radius);
    padding: 14px 20px;
    transition: box-shadow .15s ease;
}
.fanzo-row:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

/* Dark highlighted row (3rd row in screenshot) */
.fanzo-row--highlight {
    background: var(--fanzo-green);
    border-color: var(--fanzo-green);
    color: var(--fanzo-white);
}
.fanzo-row--highlight .fanzo-row__league span,
.fanzo-row--highlight .fanzo-row__date,
.fanzo-row--highlight .fanzo-row__time,
.fanzo-row--highlight .fanzo-game-name {
    color: var(--fanzo-white);
}

/* ---- Row Columns ---- */
.fanzo-row__league {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: .9rem;
    color: var(--fanzo-text);
}
.fanzo-row--highlight .fanzo-row__league {
    font-weight: 400;
    font-size: .85rem;
}

.fanzo-competition-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.fanzo-row__date,
.fanzo-row__time {
    font-weight: 600;
    font-size: .9rem;
    color: var(--fanzo-text);
    white-space: nowrap;
}

.fanzo-row__game {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
}
.fanzo-team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}
.fanzo-game-name {
    color: var(--fanzo-text);
    font-weight: 500;
}

.fanzo-row__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.fanzo-btn {
    display: inline-block;
    text-decoration: none;
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 50px;
    padding: 9px 22px;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
    cursor: pointer;
}

/* Reserve – green pill */
.fanzo-btn--reserve {
    background: var(--fanzo-green);
    color: var(--fanzo-white);
    border: 2px solid var(--fanzo-green);
}
.fanzo-btn--reserve:hover {
    background: var(--fanzo-green-dark);
    border-color: var(--fanzo-green-dark);
    color: var(--fanzo-white);
}

/* Highlighted row: Reserve button is white/outlined */
.fanzo-row--highlight .fanzo-btn--reserve {
    background: var(--fanzo-white);
    color: var(--fanzo-green);
    border-color: var(--fanzo-white);
}
.fanzo-row--highlight .fanzo-btn--reserve:hover {
    background: transparent;
    color: var(--fanzo-white);
}

/* Read More – text link */
.fanzo-btn--readmore {
    background: transparent;
    color: var(--fanzo-muted);
    border: none;
    padding: 0;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-decoration: underline;
}
.fanzo-btn--readmore:hover {
    color: var(--fanzo-green);
}
.fanzo-row--highlight .fanzo-btn--readmore {
    color: rgba(255,255,255,.75);
}
.fanzo-row--highlight .fanzo-btn--readmore:hover {
    color: var(--fanzo-white);
}

/* Large CTA button (detail page) */
.fanzo-btn--large {
    font-size: .9rem;
    padding: 14px 36px;
}

/* Back button */
.fanzo-btn--back {
    background: transparent;
    color: var(--fanzo-muted);
    border: 1px solid var(--fanzo-border);
    font-size: .8rem;
    padding: 8px 18px;
}
.fanzo-btn--back:hover {
    color: var(--fanzo-text);
    border-color: #aaa;
}

/* =========================================================
   ERROR / EMPTY STATES
   ========================================================= */

.fanzo-error,
.fanzo-no-events {
    text-align: center;
    padding: 24px;
    color: var(--fanzo-muted);
    font-style: italic;
}
.fanzo-error { color: #c0392b; }

/* =========================================================
   EVENT DETAIL PAGE
   ========================================================= */

.fanzo-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px 60px;
    font-family: var(--fanzo-font);
}

/* Banner */
.fanzo-detail__banner {
    position: relative;
    height: 220px;
    background-size: cover;
    background-position: center;
    border-radius: var(--fanzo-radius);
    overflow: hidden;
    margin-bottom: 32px;
}
.fanzo-detail__banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.2), rgba(0,0,0,.5));
}

/* Header row */
.fanzo-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 16px;
}
.fanzo-detail__meta {
    display: flex;
    align-items: center;
    gap: 14px;
}
.fanzo-detail__comp-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}
.fanzo-detail__competition {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fanzo-text);
}
.fanzo-detail__sport {
    display: block;
    font-size: .85rem;
    color: var(--fanzo-muted);
    margin-top: 2px;
}
.fanzo-detail__datetime {
    text-align: right;
}
.fanzo-detail__date {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--fanzo-text);
}
.fanzo-detail__time {
    display: block;
    font-size: .95rem;
    color: var(--fanzo-green);
    font-weight: 600;
    margin-top: 2px;
}

/* Teams */
.fanzo-detail__teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.fanzo-detail__team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.fanzo-detail__team-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
}
.fanzo-detail__team-name {
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    color: var(--fanzo-text);
}
.fanzo-detail__vs {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--fanzo-green);
    letter-spacing: .05em;
}

/* Channels */
.fanzo-detail__channels {
    margin-bottom: 40px;
}
.fanzo-detail__channels-title {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--fanzo-muted);
    margin-bottom: 14px;
}
.fanzo-detail__channels-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.fanzo-detail__channel {
    background: #f5f5f5;
    border-radius: 4px;
    padding: 8px 14px;
}
.fanzo-detail__channel-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
    display: block;
}
.fanzo-detail__channel-name {
    font-size: .82rem;
    font-weight: 600;
    color: var(--fanzo-text);
}

/* CTA */
.fanzo-detail__cta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
    .fanzo-row {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
    }
    .fanzo-row__league { grid-column: 1 / -1; }
    .fanzo-row__game   { grid-column: 1 / -1; }
    .fanzo-row__actions { grid-column: 1 / -1; }

    .fanzo-detail__teams { gap: 16px; }
    .fanzo-detail__team-logo { width: 64px; height: 64px; }
    .fanzo-detail__vs { font-size: 1.3rem; }
}
