/**
 * Webisport Dashboard — Footclub Members Section
 */

.footclub-members-section-shell .webisport-tab-content {
    padding-top: 1rem;
}

/* Inscriptions filter bar — long default labels and Footclub status values */
.webisport-dashboard .webisport-filter-card[data-section="footclub-members"] #footclub-members-nature_demande-filter,
.webisport-dashboard .webisport-filter-card[data-section="footclub-members"] #footclub-members-statut_footclub-filter,
.webisport-dashboard .webisport-filter-card[data-section="footclub-members"] #footclub-members-account_status-filter {
    min-width: min(100%, 240px);
    max-width: 320px;
}

.footclub-table-card {
    padding: 0;
}

.footclub-status-row {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem 0;
    flex-wrap: wrap;
}

.footclub-status-block {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 120px;
}

.footclub-status-block .webisport-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--webisport-text-muted, #6b7280);
    font-weight: 500;
}

.footclub-empty-inline {
    color: var(--webisport-text-muted, #6b7280);
    font-style: italic;
    margin: 0;
}

.footclub-wp-account-actions,
.footclub-payment-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* ── Import modal ──────────────────────────────────────────────── */

.footclub-import-modal-body {
    padding: 0.5rem 0;
}

.footclub-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

.footclub-dropzone:hover,
.footclub-dropzone:focus,
.footclub-dropzone.is-dragging {
    border-color: var(--ws-primary-border, var(--webisport-primary));
    background: var(--ws-primary-alpha-16, rgba(37, 99, 235, 0.04));
}

.footclub-dropzone .dashicons {
    font-size: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--ws-primary-ink, var(--webisport-primary));
    margin-bottom: 0.75rem;
}

.footclub-dropzone p {
    margin: 0.25rem 0;
}

.footclub-dropzone-hint {
    font-size: 0.85rem;
    color: var(--webisport-text-muted, #6b7280);
}

.footclub-selected-file {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(34, 197, 94, 0.08);
    border-left: 3px solid #22c55e;
    border-radius: 4px;
    font-weight: 500;
}

.footclub-import-progress {
    margin-top: 1rem;
    text-align: center;
}

.footclub-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem;
}

.footclub-progress-fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, var(--webisport-primary) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: footclub-progress 1.4s linear infinite;
}

@keyframes footclub-progress {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.footclub-import-result {
    margin-top: 1.5rem;
}

.footclub-import-summary h4 {
    margin: 0 0 0.75rem 0;
}

.footclub-import-summary table {
    width: 100%;
    margin-bottom: 1rem;
}

.footclub-import-summary table th {
    text-align: left;
    width: 40%;
    color: var(--webisport-text-muted, #6b7280);
    font-weight: 500;
}

.footclub-import-summary details summary {
    cursor: pointer;
    color: #b45309;
    font-weight: 500;
}

.footclub-import-summary details ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.footclub-form-hint {
    display: block;
    margin-top: 0.25rem;
    color: var(--webisport-text-muted, #6b7280);
    font-size: 0.85rem;
}

.footclub-refund-payment-body .webisport-form-error,
#footclub-refund-payment-modal .footclub-form-error {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0;
    padding: 0.625rem 0.875rem;
    border-radius: var(--ws-radius-lg);
    background: var(--ws-danger-light);
    border: 1px solid rgba(255, 76, 81, 0.25);
    color: var(--ws-danger-dark);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.footclub-edit-representant-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.footclub-modal-required-legend {
    margin: 0 0 1rem;
}

#footclub-edit-profile-modal .webisport-modal-form-error-icon,
#footclub-edit-representant-modal .webisport-modal-form-error-icon,
#footclub-edit-health-modal .webisport-modal-form-error-icon,
#footclub-status-modal .webisport-modal-form-error-icon,
#footclub-manual-member-modal .webisport-modal-form-error-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.1rem;
    font-size: 1.25rem;
    line-height: 1.25rem;
    color: var(--ws-danger, #ff4c51);
}

.footclub-manual-member-body .webisport-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.footclub-manual-rep-heading {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ws-text, #2f2b3d);
}

.footclub-guardian-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footclub-guardian-card-header .footclub-manual-rep-heading {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.footclub-guardian-card {
    margin-top: 1rem;
    padding: 1rem 1rem 0.25rem;
    border: 1px solid var(--ws-border, #e6e6e8);
    border-radius: var(--ws-radius, 0.375rem);
    background: var(--ws-bg-subtle, #f8f8f9);
}

.footclub-guardian-card + .footclub-guardian-card {
    margin-top: 1.25rem;
    border-top: 3px solid rgba(var(--ws-primary-border-rgb, 115, 103, 240), 0.2);
}

.footclub-guardian-card > .footclub-address-copy-option {
    margin-bottom: 0.85rem;
}

.footclub-guardian-card .footclub-address-fields-block {
    margin-top: 0.25rem;
}

.footclub-manual-guardians-section.is-required {
    border-left: 3px solid var(--ws-primary-border, #7367f0);
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

.pr-section-number--bis {
    width: auto;
    min-width: 1.6rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.footclub-address-copy-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.footclub-address-copy-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border: 1px dashed var(--ws-border, #e6e6e8);
    border-radius: var(--ws-radius, 0.375rem);
    background: #fff;
    font-size: 0.875rem;
    color: var(--ws-text-muted, #6d6b77);
    cursor: pointer;
}

.footclub-address-copy-option span {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.45;
}

/* Beat WP admin / theme rules (input { width: 100% }, min-height, borders, etc.) */
.webisport-dashboard #footclub-manual-member-modal .footclub-address-copy-option input[type="checkbox"] {
    appearance: auto;
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    display: inline-block;
    flex: 0 0 auto;
    align-self: flex-start;
    width: 1rem !important;
    height: 1rem !important;
    min-width: 1rem !important;
    min-height: 1rem !important;
    max-width: 1rem !important;
    max-height: 1rem !important;
    margin: 0.15rem 0 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    accent-color: var(--ws-primary);
    cursor: pointer;
    vertical-align: top;
}

.footclub-address-fields-block[hidden] {
    display: none !important;
}

.footclub-minor-contact-notice {
    margin-bottom: 0.85rem;
}

.footclub-minor-contact-notice[hidden] {
    display: none !important;
}

.footclub-manual-rep-optional {
    font-weight: 400;
    font-size: 0.82rem;
    color: var(--webisport-text-muted, #6b7280);
}

.footclub-manual-guardians-section[hidden] {
    display: none !important;
}

#footclub-edit-dernier-club-wrap[hidden],
#footclub-edit-dernier-club-wrap.footclub-edit-dernier-club-field--hidden,
#footclub-manual-dernier-club-wrap[hidden],
#footclub-manual-dernier-club-wrap.footclub-manual-dernier-club-field--hidden {
    display: none !important;
}

.footclub-manual-guardians-section .pr-section-body > .pr-field-hint:first-child {
    display: block;
    margin-bottom: 0.75rem;
}

.footclub-manual-guardian-grid .webisport-form-group--full {
    grid-column: 1 / -1;
}

.pr-advanced + .pr-advanced {
    margin-top: 0.75rem;
}

.webisport-dashboard #footclub-manual-member-modal .webisport-modal-content.webisport-modal-large {
    max-width: min(52rem, calc(100vw - 2rem));
    width: 100%;
}

.webisport-dashboard #footclub-manual-member-modal .webisport-modal-body {
    max-height: min(75vh, 44rem);
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.members-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.footclub-manual-member-body .pr-section-body > .pr-field-hint:first-child {
    display: block;
    margin-bottom: 0.75rem;
}

/* Loading + spinner */
.webisport-loading-placeholder {
    padding: 2rem;
    text-align: center;
    color: var(--webisport-text-muted, #6b7280);
}

.webisport-spin {
    animation: footclub-spin 1s linear infinite;
    display: inline-block;
}

@keyframes footclub-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ─── Encaissement manuel + remboursement modals ─────────────────────── */
#footclub-manual-payment-modal,
#footclub-refund-payment-modal {
    --footclub-mp-gap: 1rem;
    --footclub-mp-gap-lg: 1.5rem;
    --footclub-mp-section-gap: 1.25rem;
}

.webisport-dashboard #footclub-manual-payment-modal .webisport-modal-content.webisport-modal-large,
.webisport-dashboard #footclub-refund-payment-modal .webisport-modal-content.webisport-modal-large {
    max-width: min(60rem, calc(100vw - 2rem));
    width: 100%;
}

.webisport-dashboard #footclub-manual-payment-modal .webisport-modal-body,
.webisport-dashboard #footclub-refund-payment-modal .webisport-modal-body {
    max-height: min(80vh, 48rem);
    overflow-y: auto;
    padding: 1.25rem 1.5rem 1.5rem;
}

#footclub-manual-payment-modal .footclub-manual-payment-body,
#footclub-refund-payment-modal .footclub-refund-payment-body {
    width: 100%;
    max-width: none;
    margin: 0;
}

#footclub-manual-payment-modal .footclub-mp-section,
#footclub-refund-payment-modal .footclub-mp-section {
    border-top: 1px solid var(--ws-border-light, rgba(47, 43, 61, 0.08));
    margin-top: var(--footclub-mp-section-gap);
    padding-top: var(--footclub-mp-section-gap);
}

#footclub-manual-payment-modal .footclub-mp-section:first-of-type,
#footclub-refund-payment-modal .footclub-mp-section:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

#footclub-manual-payment-modal .pr-section-header,
#footclub-refund-payment-modal .pr-section-header {
    margin-bottom: 0.875rem;
}

#footclub-manual-payment-modal .pr-section-number,
#footclub-refund-payment-modal .pr-section-number {
    background: var(--ws-primary);
}

#footclub-manual-payment-modal .pr-section-title,
#footclub-refund-payment-modal .pr-section-title {
    color: var(--ws-text-secondary, #6d6b77);
    font-size: 0.8125rem;
}

#footclub-manual-payment-modal .pr-section-body,
#footclub-refund-payment-modal .pr-section-body {
    padding-left: 0;
}

#footclub-manual-payment-modal .footclub-mp-stack,
#footclub-refund-payment-modal .footclub-mp-stack {
    display: flex;
    flex-direction: column;
    gap: var(--footclub-mp-gap);
}

#footclub-manual-payment-modal .footclub-form-error,
#footclub-refund-payment-modal .footclub-form-error {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0;
    padding: 0.625rem 0.875rem;
    border-radius: var(--ws-radius-lg);
    background: var(--ws-danger-light);
    border: 1px solid rgba(255, 76, 81, 0.25);
    color: var(--ws-danger-dark);
    font-size: 0.8125rem;
    line-height: 1.45;
}

#footclub-manual-payment-modal #footclub-record-payment-quote-loading,
#footclub-manual-payment-modal .footclub-encaissement-quote-loading {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0;
    color: var(--ws-text-secondary);
}

#footclub-manual-payment-modal .footclub-installment-grid label,
#footclub-refund-payment-modal .footclub-refund-line-grid label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ws-text-secondary);
    margin-bottom: 0.35rem;
    display: block;
}

#footclub-manual-payment-modal .footclub-encaissement-comment,
#footclub-refund-payment-modal .footclub-encaissement-comment {
    margin: 0;
}

#footclub-manual-payment-modal .footclub-encaissement-comment label,
#footclub-refund-payment-modal .footclub-encaissement-comment label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ws-text);
    margin-bottom: 0.35rem;
    display: block;
}

.footclub-encaissement-target {
    padding: 0.875rem 1rem;
    background: var(--ws-bg-subtle);
    border-radius: var(--ws-radius-lg);
    border: 1px solid var(--ws-border-light, rgba(47, 43, 61, 0.06));
}

.footclub-encaissement-target-name {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ws-text);
    line-height: 1.3;
}

.footclub-encaissement-target-category {
    font-size: 0.8125rem;
    color: var(--ws-text-secondary);
    margin-top: 0.2rem;
}

.footclub-encaissement-invoice {
    border-radius: var(--ws-radius-lg);
    background: var(--ws-bg-subtle);
    overflow: hidden;
    border: 1px solid var(--ws-border-light);
}

#footclub-manual-payment-modal .footclub-encaissement-breakdown {
    list-style: none;
    margin: 0;
    padding: 0.5rem 1rem 0;
    display: flex;
    flex-direction: column;
}

#footclub-manual-payment-modal .footclub-encaissement-breakdown:empty {
    display: none;
}

#footclub-manual-payment-modal .footclub-encaissement-breakdown-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.45rem 0;
    font-size: 0.875rem;
    color: var(--ws-text-secondary);
    border-bottom: 1px solid var(--ws-border-light);
}

#footclub-manual-payment-modal .footclub-encaissement-breakdown-line:last-child {
    border-bottom: none;
}

#footclub-manual-payment-modal .footclub-encaissement-breakdown-line strong {
    color: var(--ws-text);
    font-weight: 600;
}

#footclub-manual-payment-modal .footclub-encaissement-breakdown-line.footclub-encaissement-breakdown-reduction,
#footclub-manual-payment-modal .footclub-encaissement-breakdown-line.footclub-encaissement-breakdown-reduction strong {
    color: var(--ws-success);
}

#footclub-manual-payment-modal .footclub-encaissement-breakdown-line.footclub-encaissement-breakdown-refund,
#footclub-manual-payment-modal .footclub-encaissement-breakdown-line.footclub-encaissement-breakdown-refund strong {
    color: var(--ws-danger);
}

#footclub-manual-payment-modal .footclub-encaissement-refund-breakdown:not(:empty) {
    padding-top: 0.25rem;
    border-top: 1px solid var(--ws-border-light);
}

#footclub-manual-payment-modal .footclub-encaissement-net-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--ws-border-light);
    background: rgba(var(--ws-primary-rgb), 0.04);
}

#footclub-manual-payment-modal .footclub-encaissement-breakdown-line.footclub-encaissement-breakdown-surcharge,
#footclub-manual-payment-modal .footclub-encaissement-breakdown-line.footclub-encaissement-breakdown-surcharge strong {
    color: var(--ws-text);
}

.footclub-encaissement-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin: 0;
    background: rgba(var(--ws-primary-rgb), 0.04);
}

#footclub-manual-payment-modal .footclub-encaissement-breakdown:not(:empty) + .footclub-encaissement-total-row {
    border-top: 1px solid var(--ws-border-light);
}

.footclub-encaissement-total-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ws-text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.footclub-encaissement-total {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1;
    color: var(--ws-primary-ink);
}

.footclub-encaissement-paid-hint {
    padding: 0.625rem 1rem;
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ws-success-dark);
    background: transparent;
    border-top: 1px solid var(--ws-border-light);
}

.footclub-encaissement-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    margin-top: 0.25rem;
}

.footclub-encaissement-field {
    min-width: 0;
}

.footclub-encaissement-spacer {
    display: none;
}

@media (max-width: 720px) {
    .footclub-encaissement-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.footclub-paid-chip {
    display: inline-block;
    margin: 0 0 0.25rem 0;
    padding: 0.125rem 0.5rem;
    border-radius: var(--ws-radius-full);
    background: var(--ws-success-light);
    color: var(--ws-success-dark);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
}

#footclub-manual-payment-modal .footclub-mp-installments-panel,
#footclub-refund-payment-modal .footclub-mp-installments-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#footclub-manual-payment-modal #footclub-mp-plan-notice-wrap:not(:empty) {
    margin-bottom: 0;
}

.footclub-encaissement-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
}

.footclub-encaissement-summary-tile {
    padding: 0.875rem 1rem;
    border-radius: var(--ws-radius-lg);
    background: var(--ws-bg-subtle);
    border: 1px solid transparent;
}

.footclub-encaissement-summary-tile--paid {
    background: var(--ws-success-light);
    border-color: rgba(40, 199, 111, 0.15);
}

.footclub-encaissement-summary-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ws-text-secondary);
    margin-bottom: 0.35rem;
}

.footclub-encaissement-summary-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ws-text);
}

.footclub-encaissement-summary-tile--paid .footclub-encaissement-summary-value {
    color: var(--ws-success-dark);
}

.footclub-encaissement-summary-tile--due {
    background: var(--ws-danger-light);
    border-color: rgba(255, 76, 81, 0.12);
}

.footclub-encaissement-summary-tile--due .footclub-encaissement-summary-value {
    color: var(--ws-danger-dark);
}

.footclub-encaissement-summary-tile--due.footclub-encaissement-summary-tile--cleared {
    background: var(--ws-success-light);
    border-color: rgba(40, 199, 111, 0.15);
}

.footclub-encaissement-summary-tile--due.footclub-encaissement-summary-tile--cleared .footclub-encaissement-summary-value {
    color: var(--ws-success-dark);
}

.footclub-encaissement-summary-tile--surplus {
    background: var(--ws-warning-light, #fff6e5);
    border-color: rgba(255, 159, 67, 0.25);
}

.footclub-encaissement-summary-tile--surplus .footclub-encaissement-summary-value {
    color: var(--ws-warning-dark, #b76e00);
}

/* Beat `.webisport-dashboard p { margin:0; padding:0 }` for the live surplus guard. */
#footclub-manual-payment-modal p.footclub-encaissement-surplus-hint {
    margin: 0.5rem 0 0;
    padding: 0.6rem 0.85rem;
    border-radius: var(--ws-radius-lg);
    background: var(--ws-warning-light, #fff6e5);
    border: 1px solid rgba(255, 159, 67, 0.25);
    color: var(--ws-warning-dark, #8a5500);
    font-size: 0.875rem;
    line-height: 1.4;
}

/* ── Manage payments: optional tariff rules ─────────────────────── */
#footclub-manual-payment-modal .footclub-optional-rules {
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: var(--ws-radius-lg);
    background: var(--ws-white);
    border: 1px solid var(--ws-border-light);
}

#footclub-manual-payment-modal .footclub-optional-rules:empty {
    display: none;
    padding: 0;
    border: none;
}

#footclub-manual-payment-modal .footclub-optional-rules .footclub-form-hint {
    margin: 0 0 0.5rem;
    color: var(--ws-text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.footclub-opt-rule-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.45rem 0;
    margin: 0;
    border: none;
    border-radius: var(--ws-radius);
    background: transparent;
    font-size: 0.875rem;
    color: var(--ws-text);
    cursor: pointer;
    transition: background 0.15s ease;
}

.footclub-opt-rule-label + .footclub-opt-rule-label {
    border-top: 1px solid var(--ws-border-light);
    padding-top: 0.5rem;
    margin-top: 0.125rem;
}

.footclub-opt-rule-label:hover {
    background: transparent;
}

.footclub-opt-rule-label input {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0;
    border: 2px solid var(--ws-border);
    border-radius: var(--ws-radius-sm);
    background: var(--ws-white);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.footclub-opt-rule-label input:checked {
    background: var(--ws-primary);
    border-color: var(--ws-primary);
}

.footclub-opt-rule-label input:checked::after {
    content: "";
    position: absolute;
    left: 0.3125rem;
    top: 0.0625rem;
    width: 0.3125rem;
    height: 0.5625rem;
    border: solid var(--ws-on-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.footclub-opt-rule-label input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--ws-primary-rgb), 0.2);
}

/* ── Manage payments: mode toggle (radio cards) ─────────────────── */
#footclub-manual-payment-modal .footclub-payment-mode-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
}

.footclub-payment-mode-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--ws-border);
    border-radius: var(--ws-radius-lg);
    background: var(--ws-white);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.footclub-payment-mode-option:hover {
    border-color: var(--ws-primary-border);
    background: rgba(var(--ws-primary-border-rgb), 0.02);
}

.footclub-payment-mode-option:has(input:checked) {
    border-color: var(--ws-primary-border);
    background: rgba(var(--ws-primary-border-rgb), 0.06);
    box-shadow: 0 0 0 1px var(--ws-primary-border);
}

.footclub-payment-mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.footclub-payment-mode-indicator {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    border: 2px solid #97959e;
    border-radius: 50%;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.footclub-payment-mode-indicator::after {
    content: "";
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 50%;
    background: var(--ws-primary);
    transform: scale(0);
    transition: transform 0.12s ease-in-out;
}

.footclub-payment-mode-option:has(input:checked) .footclub-payment-mode-indicator {
    border-color: var(--ws-primary-border);
    box-shadow: inset 0 0 0 1px #fff;
}

.footclub-payment-mode-option:has(input:checked) .footclub-payment-mode-indicator::after {
    transform: scale(1);
}

.footclub-payment-mode-option:has(input:focus-visible) {
    box-shadow: 0 0 0 3px rgba(var(--ws-primary-rgb), 0.18);
}

.footclub-payment-mode-option:has(input:focus-visible) .footclub-payment-mode-indicator {
    box-shadow: 0 0 0 3px rgba(var(--ws-primary-rgb), 0.18);
}

.footclub-payment-mode-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    line-height: 1.35;
    min-width: 0;
}

.footclub-payment-mode-text strong {
    font-weight: 600;
    color: var(--ws-text);
}

.footclub-payment-mode-text small {
    color: var(--ws-text-secondary);
    font-size: 0.78rem;
}

/* ── Manage payments: installment rows ──────────────────────────── */
.footclub-plan-notice {
    border-radius: var(--ws-radius-lg);
    padding: 0.625rem 0.875rem;
    margin: 0;
    background: rgba(var(--ws-primary-rgb), 0.06);
    border: 1px solid rgba(var(--ws-primary-border-rgb), 0.15);
    color: var(--ws-text);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.footclub-plan-notice--online {
    background: rgba(255, 159, 67, 0.08);
    border-color: rgba(255, 159, 67, 0.25);
}

.footclub-plan-notice-text {
    margin: 0 0 0.625rem;
}

.footclub-plan-notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footclub-installments-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footclub-installment-row[data-locked] {
    background: var(--ws-bg-subtle);
    border-color: rgba(47, 43, 61, 0.08);
    border-style: dashed;
}

.footclub-installment-row {
    border: 1px solid var(--ws-border-light);
    border-radius: var(--ws-radius-lg);
    padding: 0.875rem 1rem;
    background: var(--ws-white);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.footclub-installment-row:focus-within {
    border-color: var(--ws-primary-border);
    box-shadow: 0 0 0 1px var(--ws-primary-border);
}

.footclub-installment-grid {
    display: grid;
    /* Date before status: date keeps ~11rem so dd/mm/yyyy is never clipped */
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(11rem, 1.35fr) minmax(0, 0.9fr) minmax(0, 1fr) auto;
    gap: 0.75rem 0.75rem;
    align-items: end;
}

.footclub-installment-grid .webisport-form-group {
    margin: 0;
    min-width: 0;
}

.footclub-installment-date-cell {
    min-width: 11rem;
}

.footclub-installment-date {
    min-width: 11rem;
}

.footclub-refund-line-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.footclub-refund-line-grid .webisport-form-group {
    margin: 0;
    min-width: 0;
}

#footclub-refund-payment-modal .footclub-refund-payment-intro {
    margin: 0;
    line-height: 1.5;
}

#footclub-refund-payment-modal .footclub-refund-summary {
    margin: 0;
}

#footclub-refund-payment-modal .footclub-refund-operation-summary {
    margin: 0;
}

.footclub-installment-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    color: var(--ws-danger);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    border-radius: var(--ws-radius);
    transition: background 0.15s ease;
}

.footclub-installment-remove:hover {
    background: var(--ws-danger-light);
}

#footclub-manual-payment-modal .footclub-mp-installments-actions,
#footclub-refund-payment-modal .footclub-mp-installments-actions {
    display: flex;
    align-items: center;
    padding-top: 0.125rem;
}

#footclub-manual-payment-modal .footclub-add-installment,
#footclub-refund-payment-modal #footclub-add-refund-line {
    margin: 0;
}

.footclub-installment-line {
    font-size: 0.85rem;
    color: var(--ws-text);
    white-space: nowrap;
}

.webisport-installment-summary {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ws-space-3, 0.75rem);
    margin-bottom: var(--ws-space-4, 1rem);
}

.webisport-installment-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1 1 10rem;
    min-width: 10rem;
    padding: 0.75rem 1rem;
    background: var(--ws-bg, #f8f7fa);
    border-radius: var(--ws-radius, 0.375rem);
}

.webisport-installment-summary-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #444050;
    line-height: 1.3;
}

.webisport-installment-summary-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #97959e;
}

@media (max-width: 720px) {
    #footclub-manual-payment-modal .footclub-payment-mode-toggle {
        grid-template-columns: 1fr;
    }

    .footclub-encaissement-summary {
        grid-template-columns: 1fr;
    }

    .footclub-installment-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.625rem 0.75rem;
    }

    .footclub-refund-line-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.625rem 0.75rem;
    }

    .footclub-installment-remove,
    .footclub-refund-line-remove {
        grid-column: 2;
        justify-self: end;
        align-self: end;
    }
}

/* ── Health edit modal (context-aware blocks) ─────────────────── */

#footclub-edit-health-modal .health-form-block.is-hidden {
    display: none;
}

/* Beat WP/theme input { width:100% }, transparent reset, and autofill tint */
#footclub-edit-health-modal .webisport-input,
#footclub-edit-health-modal textarea.webisport-input {
    width: 100%;
    max-width: 100%;
    background-color: #fff;
    color: #444050;
    -webkit-text-fill-color: #444050;
    line-height: 1.5;
    vertical-align: middle;
}

#footclub-edit-health-modal .webisport-input:-webkit-autofill,
#footclub-edit-health-modal .webisport-input:-webkit-autofill:hover,
#footclub-edit-health-modal .webisport-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #444050;
}

#footclub-edit-health-modal input.webisport-input[type="number"] {
    appearance: auto;
    -webkit-appearance: auto;
}

#footclub-edit-health-modal .webisport-form-group--yes-no {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0;
}

#footclub-edit-health-modal .webisport-form-group--yes-no > .webisport-form-caption {
    margin-bottom: 0;
}

/* Yes/No — pill buttons (hidden native radio avoids dashboard custom radio CSS) */
.webisport-dashboard #footclub-edit-health-modal .health-yes-no-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
}

/* Nested <label> chips/pills must not inherit .webisport-form-group label spacing */
.webisport-dashboard #footclub-edit-health-modal .webisport-form-group--yes-no label.health-yes-no-pill,
.webisport-dashboard #footclub-edit-health-modal label.health-choice-chip {
    margin-bottom: 0;
}

.webisport-dashboard #footclub-edit-health-modal .health-yes-no-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.4375rem 0.875rem;
    border: 1px solid var(--ws-form-border, #dbdade);
    border-radius: 0.375rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.webisport-dashboard #footclub-edit-health-modal .health-yes-no-pill:hover {
    border-color: rgba(var(--ws-primary-border-rgb), 0.45);
    background: rgba(var(--ws-primary-border-rgb), 0.04);
}

.webisport-dashboard #footclub-edit-health-modal .health-yes-no-pill.is-selected {
    border-color: var(--ws-primary-border);
    background: rgba(var(--ws-primary-border-rgb), 0.1);
    box-shadow: 0 0 0 2px rgba(var(--ws-primary-border-rgb), 0.12);
}

.webisport-dashboard #footclub-edit-health-modal .health-yes-no-pill-label {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    color: #444050;
}

.webisport-dashboard #footclub-edit-health-modal .health-yes-no-pill.is-selected .health-yes-no-pill-label {
    color: var(--ws-primary-ink);
}

.webisport-dashboard #footclub-edit-health-modal .health-yes-no-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
    pointer-events: none;
}

/* Allergy types — chip toggles with native checkbox (no webisport-checkbox-item) */
#footclub-edit-health-modal .health-allergy-types {
    margin-bottom: var(--ws-space-5);
}

.webisport-dashboard #footclub-edit-health-modal .health-choice-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
}

.webisport-dashboard #footclub-edit-health-modal .health-choice-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.4375rem 0.875rem;
    border: 1px solid var(--ws-form-border, #dbdade);
    border-radius: 0.375rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.webisport-dashboard #footclub-edit-health-modal .health-choice-chip:hover {
    border-color: rgba(var(--ws-primary-border-rgb), 0.45);
    background: rgba(var(--ws-primary-border-rgb), 0.04);
}

.webisport-dashboard #footclub-edit-health-modal .health-choice-chip.is-selected {
    border-color: var(--ws-primary-border);
    background: rgba(var(--ws-primary-border-rgb), 0.1);
    box-shadow: 0 0 0 2px rgba(var(--ws-primary-border-rgb), 0.12);
}

.webisport-dashboard #footclub-edit-health-modal .health-choice-chip span {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    color: #444050;
}

.webisport-dashboard #footclub-edit-health-modal .health-choice-chip.is-selected span {
    color: var(--ws-primary-ink);
}

.webisport-dashboard #footclub-edit-health-modal .health-choice-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
    pointer-events: none;
}

#footclub-edit-health-modal .pr-two-col-grid .webisport-form-group--yes-no {
    min-width: 0;
}

#footclub-edit-health-modal .health-emergency-info-box {
    margin-bottom: 1rem;
}

#footclub-edit-health-modal .health-emergency-info-box p {
    margin: 0;
}

#footclub-edit-health-modal .health-emergency-info-box p strong {
    font-weight: 600;
}

/* ── Verify-info confirmation modal ───────────────────────────────── */
.webisport-dashboard #footclub-verify-info-modal .webisport-modal-title {
    visibility: hidden;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.webisport-dashboard #footclub-verify-info-modal .webisport-modal-header {
    min-height: 2.5rem;
    border-bottom: none;
    padding-bottom: 0;
}

.webisport-dashboard #footclub-verify-info-modal .webisport-modal-body {
    padding-top: 0.5rem;
}

.webisport-dashboard .footclub-verify-info-body {
    text-align: center;
}

.webisport-dashboard .footclub-verify-info-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.webisport-dashboard .footclub-verify-info-doc-icon {
    font-size: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    color: #444050;
}

.webisport-dashboard .footclub-verify-info-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #444050;
    line-height: 1.35;
}

.webisport-dashboard .footclub-verify-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
}

.webisport-dashboard .footclub-verify-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}

.webisport-dashboard .footclub-verify-info-item p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6d6b77;
}

.webisport-dashboard .footclub-verify-info-item-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-top: 0.1rem;
}

.webisport-dashboard .footclub-verify-info-item-icon .dashicons {
    font-size: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
}

.webisport-dashboard .footclub-verify-info-item--warning .footclub-verify-info-item-icon {
    color: #ff9f43;
}

.webisport-dashboard .footclub-verify-info-item--phone .footclub-verify-info-item-icon {
    color: #28c76f;
}

.webisport-dashboard .footclub-verify-info-item-icon--euro {
    font-size: 1.25rem;
    font-weight: 600;
    color: #00cfe8;
    line-height: 1;
}

/* ── Configuration tab (import welcome email) ─────────────────── */

.footclub-configuration-layout {
    display: grid;
    gap: 1.5rem;
}

.footclub-configuration-card {
    background: var(--ws-surface, #fff);
    border: 1px solid var(--ws-border, #e2e8f0);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.footclub-configuration-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ws-text, #2f2b3d);
}

.footclub-configuration-help,
.footclub-configuration-hint {
    margin: 0 0 1rem;
    color: var(--ws-text-muted, #64748b);
    font-size: 0.92rem;
    line-height: 1.5;
}

.footclub-configuration-hint {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
}

.footclub-configuration-empty {
    margin: 0 0 1rem;
    color: var(--ws-text-muted, #64748b);
    font-style: italic;
}

.footclub-configuration-switch {
    margin-bottom: 0.25rem;
}

.webisport-dashboard .footclub-configuration-switch input[type="checkbox"]:checked + .webisport-switch-slider {
    background: var(--ws-success, #28c76f);
}

.footclub-configuration-label,
.footclub-configuration-variables-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--ws-text, #2f2b3d);
}

.footclub-configuration-variables-title {
    margin: 1.25rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--ws-border, #e2e8f0);
}

.footclub-configuration-input {
    width: 100%;
    max-width: 32rem;
    border: 1px solid var(--ws-border, #cbd5e1);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    font: inherit;
}

.footclub-configuration-template-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
}

.footclub-configuration-template-filename {
    font-weight: 500;
    color: var(--ws-text, #2f2b3d);
}

.footclub-configuration-template-updated {
    color: var(--ws-text-muted, #64748b);
    font-size: 0.85rem;
}

.footclub-configuration-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.footclub-configuration-save-status {
    font-size: 0.9rem;
    font-weight: 500;
}

.footclub-configuration-save-status.is-success {
    color: var(--ws-success, #28c76f);
}

.footclub-configuration-save-status.is-error {
    color: var(--ws-danger, #ff4c51);
}

.footclub-variables-table code {
    font-size: 0.875rem;
}

.footclub-configuration-variables .footclub-table-card {
    padding: 0;
    border: none;
    background: transparent;
}

/* ── WP account reset modal ───────────────────────────────────── */
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--ws-radius, 0.375rem);
    background: rgba(255, 76, 81, 0.1);
    border: 1px solid rgba(255, 76, 81, 0.35);
    color: var(--ws-text, #444050);
}

.footclub-reset-accounts-warning .dashicons {
    color: var(--ws-danger, #ff4c51);
    font-size: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.footclub-reset-accounts-warning p {
    margin: 0 0 0.5rem;
}

.footclub-reset-accounts-warning p:last-child {
    margin-bottom: 0;
}

.footclub-reset-accounts-blocked {
    padding: 0.875rem 1rem;
    border-radius: var(--ws-radius, 0.375rem);
    background: rgba(var(--ws-primary-rgb, 115, 103, 240), 0.08);
    border: 1px solid rgba(var(--ws-primary-border-rgb, 115, 103, 240), 0.2);
}

.footclub-reset-accounts-section {
    margin-top: 0.5rem;
}

.footclub-reset-accounts-section-title {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
}

.footclub-reset-accounts-section-title--danger {
    color: var(--ws-danger, #ff4c51);
}

.footclub-reset-accounts-section-title--warning {
    color: var(--ws-warning, #ff9f43);
}

.footclub-reset-accounts-list {
    margin: 0;
    padding-left: 1.25rem;
}

.footclub-reset-accounts-shared {
    color: var(--ws-text-muted, #6d6b77);
    font-size: 0.875rem;
}

.footclub-reset-accounts-status-note {
    margin: 0;
    color: var(--ws-text-muted, #6d6b77);
}

.footclub-reset-accounts-ack {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 500;
}

.footclub-reset-accounts-ack input {
    margin-top: 0.2rem;
}
