/* ==========================================================================
   ValueStats · Venue directory and profile
   ========================================================================== */

.venue-directory,
.venue-profile {
    --venue-canvas: var(--vs-color-canvas);
    --venue-surface: var(--vs-color-surface);
    --venue-surface-muted: var(--vs-color-surface-muted);
    --venue-border: var(--vs-color-border);
    --venue-border-strong: var(--vs-color-border-strong);
    --venue-ink: var(--vs-color-ink);
    --venue-muted: var(--vs-color-muted);
    --venue-primary: var(--vs-color-primary-emphasis);
    min-height: 100vh;
    color: var(--venue-ink);
    background: var(--venue-canvas);
}

.venue-directory-hero,
.venue-profile-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(61, 108, 86, .18);
    background:
        radial-gradient(circle at 82% 12%, rgba(21, 150, 106, .13), transparent 29%),
        linear-gradient(142deg, #f4f7f5 0%, #e7eee9 62%, #dfe9e3 100%);
    box-shadow: 0 10px 28px rgba(25, 52, 38, .08);
}

.venue-directory-hero::before,
.venue-profile-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .06;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(8, 74, 49, .3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 74, 49, .3) 1px, transparent 1px);
    background-size: 54px 54px;
    -webkit-mask-image: linear-gradient(90deg, #000, transparent 88%);
    mask-image: linear-gradient(90deg, #000, transparent 88%);
}

.venue-directory-hero::after,
.venue-profile-hero::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, #15966a, rgba(21, 150, 106, .18) 42%, transparent 82%);
}

.venue-directory-hero-inner,
.venue-profile-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: clamp(1.8rem, 3.4vw, 3.15rem) clamp(1rem, 3.4vw, 3rem);
}

.venue-directory-hero-inner {
    display: flex;
    min-height: 12.5rem;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.venue-directory-hero-copy {
    max-width: 52rem;
}

.venue-directory-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .65rem;
    color: var(--venue-primary);
    font-size: .68rem;
    font-weight: 760;
    letter-spacing: .085em;
    text-transform: uppercase;
}

.venue-directory-kicker svg {
    width: 1rem;
    height: 1rem;
}

.venue-directory-hero h1,
.venue-profile-heading h1 {
    margin: 0;
    color: #14241b;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 720;
    letter-spacing: -.055em;
    line-height: 1;
}

.venue-directory-hero p {
    max-width: 46rem;
    margin: .95rem 0 0;
    color: #607168;
    font-size: clamp(.9rem, 1.2vw, 1rem);
    line-height: 1.65;
}

.venue-directory-hero-mark {
    display: grid;
    width: clamp(6rem, 10vw, 9rem);
    height: clamp(6rem, 10vw, 9rem);
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(8, 122, 85, .16);
    border-radius: .55rem;
    color: rgba(8, 122, 85, .4);
    background: rgba(255, 255, 255, .42);
    box-shadow: 0 18px 42px rgba(25, 55, 39, .08);
}

.venue-directory-hero-mark svg {
    width: 56%;
    height: 56%;
}

.venue-directory-shell,
.venue-profile-shell {
    width: 100%;
    padding: 1rem clamp(.75rem, 1.7vw, 1.5rem) 2.5rem;
}

.venue-directory-card,
.venue-profile-panel {
    overflow: hidden;
    border: 1px solid var(--venue-border);
    border-radius: .52rem;
    background: var(--venue-surface);
    box-shadow: 0 8px 24px rgba(25, 45, 35, .055), 0 1px 2px rgba(25, 45, 35, .04);
}

.venue-directory-toolbar {
    display: grid;
    min-height: 4.6rem;
    grid-template-columns: minmax(15rem, 1fr) minmax(12rem, 18rem) auto auto;
    gap: .55rem;
    align-items: center;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--venue-border);
    background: var(--venue-surface-muted);
}

.venue-directory-search,
.venue-directory-country {
    position: relative;
    display: block;
}

.venue-directory-search > svg {
    position: absolute;
    top: 50%;
    left: .72rem;
    width: 1rem;
    height: 1rem;
    color: #798880;
    pointer-events: none;
    transform: translateY(-50%);
}

.venue-directory-search input,
.venue-directory-country select {
    width: 100%;
    min-height: 2.45rem;
    border: 1px solid var(--venue-border-strong);
    border-radius: .32rem;
    color: #304139;
    background: #fff;
    font-size: .76rem;
    font-weight: 600;
    outline: none;
}

.venue-directory-search input {
    padding: .48rem .75rem .48rem 2.25rem;
}

.venue-directory-country select {
    padding: .48rem 2.25rem .48rem .75rem;
    appearance: none;
}

.venue-directory-country > svg {
    position: absolute;
    top: 50%;
    right: .72rem;
    width: .9rem;
    height: .9rem;
    color: #718078;
    pointer-events: none;
    transform: translateY(-50%);
}

.venue-directory-search input:focus,
.venue-directory-country select:focus {
    border-color: #15966a;
    box-shadow: 0 0 0 3px rgba(21, 150, 106, .12);
}

.venue-directory-submit {
    min-height: 2.45rem;
    padding: .48rem .9rem;
    border: 1px solid #087a55;
    border-radius: .32rem;
    color: #fff;
    background: #087a55;
    font-size: .74rem;
    font-weight: 690;
}

.venue-directory-submit:hover {
    border-color: #075f45;
    background: #075f45;
}

.venue-directory-total {
    display: inline-flex;
    min-width: 2.4rem;
    min-height: 2.1rem;
    align-items: center;
    justify-content: center;
    padding: 0 .55rem;
    border: 1px solid var(--venue-border);
    border-radius: .28rem;
    color: var(--venue-muted);
    background: var(--venue-surface);
    font-size: .66rem;
    font-weight: 720;
}

.venue-directory-table-wrap table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.venue-directory-table-wrap thead th {
    height: 2.75rem;
    padding: .65rem 1rem !important;
    border-color: #d6e0db !important;
    color: #65766d !important;
    background: #f0f4f2 !important;
    font-size: .64rem !important;
    font-weight: 740 !important;
    letter-spacing: .05em !important;
}

.venue-directory-table-wrap thead th:first-child {
    width: 52%;
}

.venue-directory-table-wrap tbody td {
    height: 4rem;
    padding: .55rem 1rem !important;
    border-color: #e0e7e3 !important;
    background: var(--venue-surface);
}

.venue-directory-table-wrap tbody tr:hover td {
    background: #eff6f2 !important;
}

.venue-directory-table-wrap tbody a:hover {
    color: var(--venue-primary) !important;
}

.venue-directory-table-wrap .text-gray-900 {
    color: #203128 !important;
}

.venue-directory-table-wrap .text-gray-500 {
    color: #78877f !important;
}

.venue-directory-pagination {
    justify-content: center !important;
    border-color: var(--venue-border) !important;
    background: var(--venue-surface-muted) !important;
}

.venue-directory-pagination nav a {
    display: grid;
    min-width: 2.1rem;
    min-height: 2.1rem;
    place-items: center;
    border: 1px solid transparent;
    border-radius: .25rem;
    font-size: .7rem !important;
}

.venue-directory-pagination nav a.bg-green-600 {
    border-color: #087a55;
    background: #087a55 !important;
}

/* Profile hero */
.venue-profile-hero-inner {
    min-height: 15rem;
}

.venue-profile-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: 1.45rem;
    color: #607168;
    font-size: .7rem;
    font-weight: 680;
}

.venue-profile-back:hover {
    color: var(--venue-primary);
}

.venue-profile-back svg {
    width: .9rem;
    height: .9rem;
}

.venue-profile-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(10rem, auto);
    gap: 1.25rem;
    align-items: center;
}

.venue-profile-symbol {
    display: grid;
    width: 6rem;
    height: 6rem;
    place-items: center;
    border: 1px solid rgba(8, 122, 85, .16);
    border-radius: .5rem;
    color: #087a55;
    background: rgba(255, 255, 255, .7);
    box-shadow: 0 12px 28px rgba(22, 48, 34, .09);
}

.venue-profile-symbol svg {
    width: 3.1rem;
    height: 3.1rem;
}

.venue-profile-heading {
    min-width: 0;
}

.venue-profile-heading h1 {
    max-width: 50rem;
    overflow-wrap: anywhere;
}

.venue-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem 1rem;
    margin-top: .85rem;
    color: #63746b;
    font-size: .76rem;
}

.venue-profile-meta > span {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
}

.venue-profile-meta img {
    width: 1.25rem;
    height: .86rem;
    object-fit: cover;
    border: 1px solid rgba(42, 71, 56, .12);
}

.venue-profile-meta svg {
    width: .9rem;
    height: .9rem;
    color: var(--venue-primary);
}

.venue-profile-capacity {
    min-width: 11rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(8, 122, 85, .16);
    border-radius: .45rem;
    background: rgba(255, 255, 255, .52);
}

.venue-profile-capacity span {
    display: block;
    margin-bottom: .25rem;
    color: #73847b;
    font-size: .6rem;
    font-weight: 730;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.venue-profile-capacity strong {
    color: #203128;
    font-size: 1.4rem;
    font-weight: 720;
    letter-spacing: -.035em;
    font-variant-numeric: tabular-nums;
}

.venue-profile-shell {
    display: grid;
    gap: 1rem;
}

.venue-profile-panel > header {
    display: flex;
    min-height: 3.65rem;
    align-items: center;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--venue-border);
    background: var(--venue-surface-muted);
}

.venue-profile-panel > header h2 {
    margin: 0;
    color: #1b2c23;
    font-size: .92rem;
    font-weight: 690;
    letter-spacing: -.018em;
}

.venue-profile-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.venue-profile-facts > div {
    min-width: 0;
    min-height: 5rem;
    padding: 1rem;
    border-right: 1px solid var(--venue-border);
}

.venue-profile-facts > div:last-child {
    border-right: 0;
}

.venue-profile-facts dt {
    margin-bottom: .45rem;
    color: var(--venue-muted);
    font-size: .6rem;
    font-weight: 720;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.venue-profile-facts dd {
    overflow-wrap: anywhere;
    color: #26372e;
    font-size: .8rem;
    font-weight: 630;
    line-height: 1.4;
}

.venue-profile-description {
    max-width: none !important;
    padding: 1.15rem 1.25rem 1.3rem;
    border-top: 1px solid var(--venue-border);
    color: #4f6157;
    font-size: .84rem;
    line-height: 1.75;
}

.venue-profile-description > :first-child {
    margin-top: 0;
}

.venue-profile-description > :last-child {
    margin-bottom: 0;
}

.venue-profile-fixtures-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.venue-profile-fixtures-body {
    min-height: 8rem;
    padding: 1rem;
}

.venue-profile-fixtures-body > div.divide-y {
    border: 1px solid var(--venue-border);
    border-radius: .32rem;
}

.venue-profile-fixtures-body > div.divide-y > div {
    border-color: var(--venue-border) !important;
}

.venue-profile-fixtures-body > div.divide-y > div:hover {
    background: #f1f6f3 !important;
}

.venue-profile-empty {
    display: grid;
    min-height: 6rem;
    place-items: center;
    margin: 0;
    color: var(--venue-muted);
    font-size: .76rem;
    text-align: center;
}

/* Dark mode */
[data-theme="dark"] .venue-directory,
[data-theme="dark"] .venue-profile {
    color-scheme: dark;
    background: var(--venue-canvas);
}

[data-theme="dark"] .venue-directory-hero,
[data-theme="dark"] .venue-profile-hero {
    border-bottom-color: rgba(151, 190, 171, .17);
    background:
        radial-gradient(circle at 82% 10%, rgba(52, 211, 153, .15), transparent 28%),
        linear-gradient(142deg, #0b241b 0%, #081c15 62%, #061711 100%);
    box-shadow: 0 12px 32px rgba(3, 18, 13, .18);
}

[data-theme="dark"] .venue-directory-hero::before,
[data-theme="dark"] .venue-profile-hero::before {
    opacity: .09;
    background-image:
        linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
}

[data-theme="dark"] .venue-directory-hero h1,
[data-theme="dark"] .venue-profile-heading h1,
[data-theme="dark"] .venue-profile-panel > header h2,
[data-theme="dark"] .venue-profile-facts dd,
[data-theme="dark"] .venue-profile-capacity strong {
    color: #e8f1ec;
}

[data-theme="dark"] .venue-directory-hero p,
[data-theme="dark"] .venue-profile-back,
[data-theme="dark"] .venue-profile-meta {
    color: #a9bbb1;
}

[data-theme="dark"] .venue-directory-kicker,
[data-theme="dark"] .venue-profile-meta svg {
    color: #6ee7b7;
}

[data-theme="dark"] .venue-directory-hero-mark,
[data-theme="dark"] .venue-profile-capacity {
    border-color: rgba(207, 229, 218, .15);
    color: rgba(110, 231, 183, .55);
    background: rgba(255, 255, 255, .045);
}

[data-theme="dark"] .venue-directory-search input,
[data-theme="dark"] .venue-directory-country select {
    border-color: var(--venue-border-strong);
    color: #d6e3dc;
    background: #101d17;
}

[data-theme="dark"] .venue-directory-total {
    border-color: var(--venue-border-strong);
    color: #9aacA2;
    background: #101d17;
}

[data-theme="dark"] .venue-directory-table-wrap thead th {
    border-color: #2a4035 !important;
    color: #93a59b !important;
    background: #0c1813 !important;
}

[data-theme="dark"] .venue-directory-table-wrap tbody,
[data-theme="dark"] .venue-directory-table-wrap tbody td {
    border-color: #263b31 !important;
    background: #101d17 !important;
}

[data-theme="dark"] .venue-directory-table-wrap tbody tr:hover td {
    background: #13281e !important;
}

[data-theme="dark"] .venue-directory-table-wrap .text-gray-900,
[data-theme="dark"] .venue-directory-table-wrap a {
    color: #dce8e1 !important;
}

[data-theme="dark"] .venue-directory-table-wrap .text-gray-500 {
    color: #8fa198 !important;
}

[data-theme="dark"] .venue-directory-pagination nav a {
    color: #a5b6ad !important;
}

[data-theme="dark"] .venue-directory-pagination nav a.bg-green-600 {
    color: #071810 !important;
    background: #34d399 !important;
}

[data-theme="dark"] .venue-profile-symbol {
    border-color: rgba(207, 229, 218, .2);
    color: #15966a;
    background: #eef5f1;
}

[data-theme="dark"] .venue-profile-description,
[data-theme="dark"] .venue-profile-description p,
[data-theme="dark"] .venue-profile-description li {
    color: #b5c5bd !important;
}

[data-theme="dark"] .venue-profile-fixtures-body > div.divide-y > div:hover {
    background: #13281e !important;
}

[data-theme="dark"] .venue-profile-fixtures-body .text-gray-900,
[data-theme="dark"] .venue-profile-fixtures-body a.text-gray-900 {
    color: #dce8e1 !important;
}

[data-theme="dark"] .venue-profile-fixtures-body .text-gray-500,
[data-theme="dark"] .venue-profile-fixtures-body .text-gray-600,
[data-theme="dark"] .venue-profile-fixtures-body .text-gray-700 {
    color: #91a39a !important;
}

[data-theme="dark"] .venue-profile-fixtures-body .bg-gray-50,
[data-theme="dark"] .venue-profile-fixtures-body .bg-gray-100 {
    background: #14261d !important;
}

@media (max-width: 767px) {
    .venue-directory-hero-inner {
        min-height: 0;
        padding: 1.55rem 1rem 1.7rem;
    }

    .venue-directory-hero h1 {
        font-size: 2rem;
    }

    .venue-directory-hero p {
        margin-top: .65rem;
        font-size: .82rem;
        line-height: 1.55;
    }

    .venue-directory-hero-mark {
        display: none;
    }

    .venue-directory-shell,
    .venue-profile-shell {
        padding: .75rem .6rem 5.5rem;
    }

    .venue-directory-toolbar {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr) auto;
        padding: .75rem;
    }

    .venue-directory-search,
    .venue-directory-country {
        grid-column: 1 / -1;
    }

    .venue-directory-submit {
        grid-column: 1;
    }

    .venue-directory-total {
        grid-column: 2;
    }

    .venue-directory-mobile-list {
        display: grid;
    }

    .venue-directory-mobile-item {
        display: grid;
        min-height: 4.75rem;
        grid-template-columns: 2.35rem minmax(0, 1fr) .85rem;
        gap: .7rem;
        align-items: center;
        padding: .7rem .75rem;
        border-bottom: 1px solid var(--venue-border);
    }

    .venue-directory-mobile-item:last-child {
        border-bottom: 0;
    }

    .venue-directory-mobile-icon {
        display: grid;
        width: 2.35rem;
        height: 2.35rem;
        place-items: center;
        border: 1px solid var(--venue-border);
        border-radius: .3rem;
        color: var(--venue-primary);
        background: var(--venue-surface-muted);
    }

    .venue-directory-mobile-icon svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .venue-directory-mobile-item a {
        display: block;
        overflow: hidden;
        color: var(--venue-ink);
        font-size: .78rem;
        font-weight: 680;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .venue-directory-mobile-meta {
        display: flex;
        overflow: hidden;
        gap: .35rem .65rem;
        margin-top: .3rem;
        color: var(--venue-muted);
        font-size: .62rem;
        white-space: nowrap;
    }

    .venue-directory-mobile-meta span {
        display: inline-flex;
        align-items: center;
        gap: .25rem;
    }

    .venue-directory-mobile-meta img {
        width: .9rem;
        height: .62rem;
        object-fit: cover;
    }

    .venue-directory-mobile-chevron {
        width: .75rem;
        height: .75rem;
        color: #98a69f;
    }

    .venue-directory-pagination {
        padding: .75rem .6rem !important;
    }

    .venue-profile-hero-inner {
        min-height: 0;
        padding: 1rem 1rem 1.55rem;
    }

    .venue-profile-back {
        margin-bottom: 1rem;
    }

    .venue-profile-identity {
        grid-template-columns: auto minmax(0, 1fr);
        gap: .85rem;
        align-items: start;
    }

    .venue-profile-symbol {
        width: 4.5rem;
        height: 4.5rem;
    }

    .venue-profile-symbol svg {
        width: 2.4rem;
        height: 2.4rem;
    }

    .venue-profile-heading h1 {
        font-size: clamp(1.55rem, 7.6vw, 2.1rem);
        line-height: 1.07;
    }

    .venue-profile-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: .35rem;
        margin-top: .65rem;
        font-size: .68rem;
    }

    .venue-profile-capacity {
        min-width: 0;
        grid-column: 1 / -1;
        padding: .7rem .8rem;
    }

    .venue-profile-capacity strong {
        font-size: 1.1rem;
    }

    .venue-profile-panel > header {
        min-height: 3.3rem;
        padding: .72rem .8rem;
    }

    .venue-profile-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .venue-profile-facts > div {
        min-height: 4.5rem;
        padding: .8rem;
        border-bottom: 1px solid var(--venue-border);
    }

    .venue-profile-facts > div:nth-child(2) {
        border-right: 0;
    }

    .venue-profile-facts > div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .venue-profile-description,
    .venue-profile-fixtures-body {
        padding: .8rem;
    }

    .venue-profile-fixtures-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .venue-directory *,
    .venue-profile * {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
