/*
 * Sprint Connect for HelloAsso Pro — frontend data explorer.
 *
 * The managed page can live inside a block theme constrained content wrapper.
 * The explorer deliberately breaks out of that wrapper and occupies 95% of
 * the browser viewport while remaining centered.
 */
.scha-front-explorer {
    display: block !important;
    box-sizing: border-box !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;

    width: 95vw !important;
    min-width: 0 !important;
    max-width: 95vw !important;

    /* Break out of WordPress/theme constrained-content wrappers. */
    margin-top: 24px !important;
    margin-bottom: 24px !important;
    margin-left: calc(50% - 47.5vw) !important;
    margin-right: calc(50% - 47.5vw) !important;

    padding: 0 !important;
    font: inherit;
    color: inherit;
}

.scha-front-explorer,
.scha-front-explorer * {
    box-sizing: border-box;
}

.scha-front-mode,
.scha-front-heading,
.scha-front-filters,
.scha-front-summary,
.scha-front-table-wrap,
.scha-front-pagination {
    width: 100%;
    max-width: none !important;
}

.scha-front-mode {
    margin: 0 0 16px;
}

.scha-front-heading { margin-bottom: 20px; }
.scha-front-heading h2 { margin: 0 0 6px; }
.scha-front-heading p { margin: 0; opacity: .72; }

.scha-front-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    align-items: end;
    padding: 18px;
    border: 1px solid #dfe3e8;
    border-radius: 14px;
    background: #f8fafc;
    margin: 0 0 18px;
}

.scha-front-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    font-weight: 600;
}

.scha-front-filters input,
.scha-front-filters select {
    width: 100%;
    max-width: none !important;
    min-width: 0;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #111827;
}

.scha-front-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    grid-column: 1 / -1;
}

.scha-front-filter-actions button,
.scha-front-filter-actions a,
.scha-front-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 700;
    box-sizing: border-box;
    flex: 0 0 auto;
    white-space: nowrap;
}

.scha-front-filter-actions button {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
    cursor: pointer;
}

.scha-front-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
}

.scha-front-summary span {
    padding: 8px 12px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.scha-front-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

.scha-front-table {
    width: 100% !important;
    max-width: none !important;
    border-collapse: collapse;
    min-width: 900px;
}

.scha-front-table th,
.scha-front-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.scha-front-table th {
    background: #f8fafc;
    font-weight: 700;
}

.scha-front-table tr:last-child td { border-bottom: 0; }
.scha-front-empty { text-align: center !important; padding: 28px !important; opacity: .7; }

.scha-front-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.scha-front-notice {
    width: min(95vw, 900px) !important;
    max-width: 95vw !important;
    margin: 20px auto !important;
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
}

@media (max-width: 782px) {
    .scha-front-explorer {
        width: 95vw !important;
        max-width: 95vw !important;
        margin-left: calc(50% - 47.5vw) !important;
        margin-right: calc(50% - 47.5vw) !important;
        margin-top: 20px !important;
        margin-bottom: 20px !important;
    }

    .scha-front-filters { grid-template-columns: 1fr; }
    .scha-front-filter-actions { align-items: stretch; }
    .scha-front-filter-actions > * { flex: 1 1 auto; }
    .scha-front-pagination { flex-wrap: wrap; }
}

/* Saved card presentation, configured per HelloAsso form. */
.scha-front-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: none !important;
}

.scha-front-card {
    min-width: 0;
    margin: 0;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .05);
}

.scha-front-card dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.scha-front-card dl > div {
    display: grid;
    grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr);
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.scha-front-card dl > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.scha-front-card dt {
    margin: 0;
    font-weight: 700;
}

.scha-front-card dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.scha-front-empty-card {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    text-align: center;
    opacity: .72;
}

@media (max-width: 600px) {
    .scha-front-card dl > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
