/* =============================================================
   T4P Club Directory — Frontend Styles
   Dark theme matching ticket4play.com/events/
   Colors: bg #444, text #f7f7f7, accent gradient #ff0066→#9900ff
   ============================================================= */

/* ---- Filter Sidebar --------------------------------------- */
/* Layout (side-by-side vs stacked) is handled by the page's
   Gutenberg column blocks, matching the events page structure. */

.tcd-filter-sidebar {
    background: rgba(26, 26, 26, 0.8);
    border-radius: 0.5rem;
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
}

/* Filter header — becomes accordion toggle on mobile */
.tcd-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default;
}

.tcd-filter-title {
    font-family: Poppins, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #FF00FF;
    width: 100%;
}

.tcd-filter-toggle-icon {
    display: none;        /* hidden on desktop */
    color: #888;
    font-size: 0.7rem;
    transition: transform 0.25s;
}

.tcd-filter-form {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr;
}

.tcd-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tcd-form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #ffffff;
}

.tcd-filter-input {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 0.375rem;
    color: #212121;
    height: 2rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.875rem;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.tcd-filter-input:focus {
    outline: none;
    border-color: #ff00ff;
}

/* Sort select in the results bar stays dark */
.tcd-filter-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.375rem;
    color: #f7f7f7;
    height: 2rem;
    padding: 0.25rem 1.8rem 0.25rem 0.6rem;
    font-size: 0.875rem;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23aaa'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
}

.tcd-filter-select:focus {
    outline: none;
    border-color: #ff00ff;
}

.tcd-filter-select option {
    background: #222;
    color: #f7f7f7;
}

.tcd-filter-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.tcd-filter-btn {
    background: #FF00FF;
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-family: Poppins, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.tcd-filter-btn:hover {
    opacity: 0.85;
}

.tcd-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #9e9e9e;
    border-radius: 0.375rem;
    color: #9e9e9e;
    background: transparent;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: Poppins, sans-serif;
    text-decoration: none;
    white-space: nowrap;
    margin-left: 0.5rem;
    transition: background 0.2s, color 0.2s;
}

.tcd-clear-btn:hover {
    background: #9e9e9e;
    color: #ffffff;
}

/* ---- Main Content Area ------------------------------------ */

.tcd-clubs-main {
    min-width: 0;
}

/* ---- List Controls Bar ------------------------------------ */

.tcd-list-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.tcd-results-count {
    color: #888;
    font-size: 0.82rem;
    flex: 1;
    min-width: 0;
}

.tcd-results-count strong {
    color: #f7f7f7;
}

.tcd-layout-switcher {
    display: flex;
    gap: 0.25rem;
}

.tcd-layout-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #888;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    line-height: 1;
}

.tcd-layout-btn:hover,
.tcd-layout-btn.active {
    background: rgba(153, 0, 255, 0.25);
    border-color: rgba(153, 0, 255, 0.6);
    color: #f7f7f7;
}

.tcd-sort-selector {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.tcd-sort-selector label {
    font-size: 0.78rem;
    color: #888;
}

.tcd-sort-select {
    width: auto;
    padding: 0.35rem 1.8rem 0.35rem 0.5rem;
    font-size: 0.82rem;
}

/* ---- Club Card Grid --------------------------------------- */

.tcd-clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
}

.tcd-club-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(100, 0, 194, 0.4);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s;
}

.tcd-club-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 0, 255, 0.55);
}

.tcd-card-img-link {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.tcd-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.75rem;
    box-sizing: border-box;
    transition: transform 0.3s;
}

.tcd-club-card:hover .tcd-card-img {
    transform: scale(1.04);
}

.tcd-card-body {
    padding: 0.75rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tcd-card-title {
    font-family: Poppins, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.3rem;
    line-height: 1.3;
}

.tcd-card-title a {
    color: #f7f7f7;
    text-decoration: none;
    transition: color 0.2s;
}

.tcd-card-title a:hover {
    color: #ff00ff;
}

.tcd-card-location {
    color: #999;
    font-size: 0.8rem;
    margin: 0 0 0.75rem;
    flex: 1;
}

.tcd-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FF00FF;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: Poppins, sans-serif;
    cursor: pointer;
    transition: background 150ms ease-in-out;
    align-self: flex-start;
}

.tcd-card-btn:hover {
    background: rgb(214, 0, 214);
    color: #fff;
}

.tcd-no-results {
    color: #888;
    font-style: italic;
}

/* ---- List Layout ------------------------------------------ */

.tcd-clubs-grid.tcd-layout-list {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.tcd-clubs-grid.tcd-layout-list .tcd-club-card {
    flex-direction: row;
    align-items: center;
}

.tcd-clubs-grid.tcd-layout-list .tcd-card-img-link {
    flex: 0 0 100px;
    aspect-ratio: 1;
}

.tcd-clubs-grid.tcd-layout-list .tcd-card-body {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
}

.tcd-clubs-grid.tcd-layout-list .tcd-card-title {
    flex: 1;
    min-width: 140px;
    margin: 0;
}

.tcd-clubs-grid.tcd-layout-list .tcd-card-location {
    flex: 0 0 auto;
    margin: 0;
    min-width: 120px;
}

.tcd-clubs-grid.tcd-layout-list .tcd-card-btn {
    flex-shrink: 0;
    margin-left: auto;
}

/* ---- Single Club ------------------------------------------ */

/* Hide the theme-injected post date on single club pages */
.single-club .entry-date,
.single-club .posted-on,
.single-club time.entry-date,
.single-club .wp-block-post-date {
    display: none !important;
}

/* Single club wrapper */
.tcd-single-club-content {
    color: #f7f7f7;
}

/* Two-column: large image left, details right */
.tcd-single-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.tcd-single-image-col {
    flex: 0 0 45%;
    max-width: 45%;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(100, 0, 194, 0.3);
}

.tcd-single-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    padding: 1.25rem;
    box-sizing: border-box;
}

.tcd-single-boxes {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Back link */
.tcd-back-link {
    margin: 0 0 1.25rem;
}

.tcd-back-link a {
    color: #FF00FF;
    text-decoration: none;
    font-size: 0.83rem;
    transition: color 0.2s;
    background-color: #ffffff33;
    padding: 5px 10px;
    border-radius: 50px;
}

.tcd-back-link a:hover {
    color: #9900ff;
}

/* Card backgrounds — matching ECP */
.tcd-club-header,
.tcd-club-description,
.tcd-club-social-sharing {
    background-color: #424242;
    border: 1px solid #1a1a1a;
    border-radius: 0.5rem;
    padding: 3rem;
    overflow: hidden;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: box-shadow 150ms ease-in-out;
    margin-bottom: 1rem;
}

/* Meta grid — matching ECP auto-fit grid */
.tcd-club-meta-primary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.tcd-club-location,
.tcd-club-address,
.tcd-club-phone,
.tcd-club-email {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tcd-meta-icon {
    flex-shrink: 0;
    font-size: 1.125rem;
    margin-top: 0.1rem;
}

.tcd-meta-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tcd-meta-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.tcd-meta-subtitle {
    color: #757575;
    font-size: 0.875rem;
    line-height: 1.625;
}

.tcd-meta-link {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.tcd-meta-link:hover {
    color: #ff00ff;
}

/* Section headings — matching ECP h3 */
.tcd-club-description h3,
.tcd-club-social-sharing h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 1.5rem 0;
}

/* Description text */
.tcd-club-description p,
.tcd-club-description li {
    color: #ffffff;
    line-height: 1.625;
}

.tcd-no-description {
    color: #757575;
    font-style: italic;
}

/* Visit Website CTA — matching ecp-btn--primary */
.tcd-club-website-wrapper {
    margin-top: 1.25rem;
}

.tcd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: Poppins, sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.tcd-btn--primary {
    background-color: #FF00FF;
    color: #fff;
}

.tcd-btn--primary:hover {
    opacity: 0.85;
    color: #fff;
}

/* Social sharing */
.tcd-social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tcd-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: Poppins, sans-serif;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.2s, transform 0.2s;
    line-height: 1.4;
}

.tcd-social-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.tcd-social-facebook {
    background: #1877f2;
    color: #fff;
}

.tcd-social-twitter {
    background: #1da1f2;
    color: #fff;
}

.tcd-social-bluesky {
    background: #00bfff;
    color: #fff;
}

.tcd-copy-link {
    background: transparent;
    border-color: #757575;
    color: #757575;
}

.tcd-copy-link.copied {
    background: rgba(0, 200, 100, 0.2);
    border-color: rgba(0, 200, 100, 0.5);
    color: #4ade80;
}

/* ---- Active Filter Tags ----------------------------------- */

.tcd-active-filters {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tcd-active-filters__title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #777;
    margin-bottom: 0.5rem;
}

.tcd-active-filters__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tcd-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid rgba(255, 0, 255, 0.2);
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #cc00cc;
    line-height: 1.3;
}

.tcd-filter-tag__label {
    opacity: 0.8;
}

.tcd-filter-tag__value {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tcd-filter-tag__remove {
    color: inherit;
    text-decoration: none;
    font-size: 1.2em;
    line-height: 1;
    padding: 0 0.1rem;
    opacity: 0.7;
    transition: opacity 150ms ease-in-out;
}

.tcd-filter-tag__remove:hover {
    opacity: 1;
    color: inherit;
}

/* ---- Responsive ------------------------------------------- */

@media ( max-width: 767px ) {
    .tcd-filter-sidebar {
        position: static;
    }

    /* Header is just the clickable wrapper — the h2 is the visible button */
    .tcd-filter-header {
        cursor: pointer;
        padding: 0;
    }

    /* h2 becomes the full-width magenta accordion button — matching ECP */
    .tcd-filter-title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        margin: 0;
        background: #FF00FF;
        color: #ffffff;
        border-bottom: none;
        border-radius: 0.375rem;
        font-size: 1.125rem;
        transition: background-color 150ms ease-in-out;
    }

    .tcd-filter-title:hover {
        background: #cc00cc;
    }

    /* Hide the HTML-entity span; use CSS :after chevron instead */
    .tcd-filter-toggle-icon {
        display: none;
    }

    .tcd-filter-title:after {
        content: "\f107";
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        transition: transform 150ms ease-in-out;
    }

    .tcd-filter-header.tcd-collapsed .tcd-filter-title:after {
        transform: rotate(-90deg);
    }

    /* Form animates open/closed with max-height + opacity — matching ECP */
    .tcd-filter-form {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 200ms ease-in-out, opacity 200ms ease-in-out;
    }

    .tcd-filter-form.tcd-filter-expanded {
        max-height: none;
        opacity: 1;
        overflow: visible;
        padding: 1rem;
    }

    /* Active filters also collapse */
    .tcd-filter-header.tcd-collapsed ~ .tcd-filter-form + .tcd-active-filters {
        display: none;
    }

    .tcd-single-layout {
        flex-direction: column;
    }

    .tcd-single-image-col {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

}


@media ( max-width: 540px ) {
    .tcd-clubs-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* ---- Pagination ------------------------------------------- */

.tcd-pagination {
    margin-top: 2rem;
}

.tcd-pagination .page-numbers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
}

.tcd-pagination .page-numbers li {
    margin: 0;
    padding: 0;
}

.tcd-pagination .page-numbers a,
.tcd-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: Poppins, sans-serif;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #ccc;
}

.tcd-pagination .page-numbers a:hover {
    background: rgba(153, 0, 255, 0.2);
    border-color: rgba(153, 0, 255, 0.5);
    color: #f7f7f7;
}

.tcd-pagination .page-numbers .current {
    background: linear-gradient(135deg, #ff0066, #9900ff);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.tcd-pagination .page-numbers .dots {
    border-color: transparent;
    background: transparent;
    color: #666;
}

/* ---- No Results ------------------------------------------- */

.tcd-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #aaa;
}

.tcd-no-results-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    filter: grayscale(1) opacity(0.4);
}

.tcd-no-results-title {
    font-family: Poppins, sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #FF00FF;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.tcd-no-results-desc {
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
}

