/* ─── TFA Membership Frontend Styles ───────────────────────────────────────── */
:root {
    --tfa-navy: #1e3a5f;
    --tfa-gold: #c8a951;
    --tfa-light: #f8f9fa;
    --tfa-border: #e5e7eb;
    --tfa-text: #1f2937;
    --tfa-muted: #6b7280;
}

/* Plans Grid */
.tfa-plans-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 0; }

.tfa-billing-toggle {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; margin-bottom: 32px;
}
.tfa-billing-label { font-size: 15px; font-weight: 600; color: var(--tfa-muted); cursor: pointer; }
.tfa-billing-label.active { color: var(--tfa-navy); }
.tfa-save-badge { background: #dcfce7; color: #15803d; font-size: 11px; padding: 2px 6px; border-radius: 10px; }

.tfa-toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.tfa-toggle-switch input { opacity: 0; width: 0; height: 0; }
.tfa-toggle-slider { position: absolute; inset: 0; background: #d1d5db; border-radius: 13px; cursor: pointer; transition: .3s; }
.tfa-toggle-slider:before { content:''; position: absolute; width: 20px; height: 20px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .3s; }
input:checked + .tfa-toggle-slider { background: var(--tfa-navy); }
input:checked + .tfa-toggle-slider:before { transform: translateX(22px); }

.tfa-plans-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px;
}

.tfa-plan-card {
    background: #fff; border: 2px solid var(--tfa-border); border-radius: 16px;
    overflow: hidden; position: relative; transition: transform .2s, box-shadow .2s;
}
.tfa-plan-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.12); }
.tfa-plan-featured { border-color: var(--tier-color, var(--tfa-navy)); box-shadow: 0 8px 30px rgba(0,0,0,.1); }
.tfa-plan-badge {
    background: var(--tier-color, var(--tfa-navy)); color: #fff;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    padding: 6px 16px; text-align: center;
}

.tfa-plan-header { padding: 24px 24px 0; text-align: center; }
.tfa-plan-icon { font-size: 36px; margin-bottom: 8px; }
.tfa-plan-name { font-size: 22px; font-weight: 700; color: var(--tfa-navy); margin: 0 0 8px; }
.tfa-plan-desc { font-size: 13px; color: var(--tfa-muted); margin: 0; line-height: 1.5; }

.tfa-plan-price { padding: 20px 24px; text-align: center; }
.tfa-price-amount { font-size: 36px; font-weight: 800; color: var(--tier-color, var(--tfa-navy)); }
.tfa-price-period { font-size: 14px; color: var(--tfa-muted); }

.tfa-plan-features { padding: 0 24px 20px; list-style: none; margin: 0; }
.tfa-plan-features li { padding: 6px 0; font-size: 14px; border-bottom: 1px solid #f3f4f6; display: flex; gap: 8px; }
.tfa-check { color: #22c55e; font-weight: bold; flex-shrink: 0; }

.tfa-plan-action { padding: 20px 24px 24px; }

/* Buttons */
.tfa-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; border: none; transition: all .15s; text-decoration: none;
    box-sizing: border-box;
}
.tfa-btn-full { width: 100%; }
.tfa-btn-primary { background: var(--tfa-navy); color: #fff; }
.tfa-btn-primary:hover { background: #15294a; color: #fff; }
.tfa-btn-secondary { background: #f3f4f6; color: var(--tfa-text); border: 1px solid var(--tfa-border); }
.tfa-btn-danger { background: #fee2e2; color: #dc2626; }
.tfa-btn-join { background: var(--tier-color, var(--tfa-navy)); color: #fff; width: 100%; padding: 12px; font-size: 15px; }
.tfa-btn-join:hover { opacity: .9; color: #fff; }

/* Modal */
.tfa-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.tfa-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.tfa-modal-content {
    position: relative; background: #fff; border-radius: 16px;
    width: 100%; max-width: 500px; margin: 20px; max-height: 90vh; overflow-y: auto;
    padding: 32px; box-shadow: 0 24px 80px rgba(0,0,0,.3);
}
.tfa-modal-content h2 { color: var(--tfa-navy); margin: 0 0 6px; }
.tfa-modal-subtitle { color: var(--tfa-muted); margin: 0 0 24px; }
.tfa-modal-close {
    position: absolute; top: 16px; right: 16px; background: #f3f4f6;
    border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 18px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.tfa-success-icon { font-size: 48px; text-align: center; margin-bottom: 16px; }

/* Forms */
.tfa-form-group { margin-bottom: 16px; }
.tfa-form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--tfa-text); margin-bottom: 5px; }
.tfa-form-group input, .tfa-form-group select, .tfa-form-group textarea {
    width: 100%; padding: 9px 12px; border: 1.5px solid var(--tfa-border);
    border-radius: 8px; font-size: 14px; box-sizing: border-box; color: var(--tfa-text);
    transition: border-color .15s;
}
.tfa-form-group input:focus, .tfa-form-group select:focus { outline: none; border-color: var(--tfa-navy); }
.tfa-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tfa-checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.tfa-checkbox-label input { width: auto; }
.tfa-error { color: #dc2626; background: #fee2e2; padding: 10px; border-radius: 6px; font-size: 13px; }

/* Dashboard */
.tfa-dashboard { max-width: 900px; margin: 0 auto; }
.tfa-dashboard-header {
    background: linear-gradient(135deg, var(--tfa-navy), #2d5a8e);
    padding: 28px; border-radius: 16px; display: flex; align-items: center; gap: 20px;
    margin-bottom: 24px; color: #fff;
}
.tfa-dashboard-avatar { font-size: 48px; }
.tfa-dashboard-info h2 { color: #fff; margin: 0 0 4px; }
.tfa-member-badge { background: var(--tier-color, rgba(255,255,255,.2)); color: #fff; padding: 3px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; display: inline-block; margin-bottom: 4px; }
.tfa-member-status { font-size: 13px; margin: 0; }
.tfa-status-active { color: #4ade80; }
.tfa-status-pending_approval { color: #fbbf24; }

.tfa-dashboard-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px;
}
.tfa-stat { background: #fff; border: 1px solid var(--tfa-border); border-radius: 12px; padding: 16px; text-align: center; }
.tfa-stat-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--tfa-muted); letter-spacing: .5px; margin-bottom: 4px; }
.tfa-stat-value { display: block; font-size: 16px; font-weight: 700; color: var(--tfa-navy); }

.tfa-dashboard-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--tfa-border); margin-bottom: 24px; }
.tfa-tab { background: none; border: none; padding: 10px 20px; font-size: 14px; font-weight: 600; color: var(--tfa-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s; }
.tfa-tab.active { color: var(--tfa-navy); border-bottom-color: var(--tfa-navy); }
.tfa-tab-content { display: none; }
.tfa-tab-content.active { display: block; }

/* Directory */
.tfa-directory-search { margin-bottom: 20px; }
.tfa-directory-search input { width: 100%; padding: 10px 16px; border: 1.5px solid var(--tfa-border); border-radius: 8px; font-size: 15px; }
.tfa-directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tfa-dir-card { background: #fff; border: 1px solid var(--tfa-border); border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 12px; transition: box-shadow .2s; }
.tfa-dir-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.tfa-dir-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #fff; flex-shrink: 0; }
.tfa-dir-info h4 { margin: 0 0 2px; font-size: 14px; }
.tfa-dir-tier { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.tfa-dir-county { font-size: 12px; color: var(--tfa-muted); margin: 2px 0 0; }

/* Access denied */
.tfa-access-denied { text-align: center; padding: 40px 20px; background: #f9fafb; border: 2px dashed var(--tfa-border); border-radius: 12px; margin: 20px 0; }
.tfa-access-icon { font-size: 36px; margin-bottom: 12px; }
.tfa-access-denied h3 { color: var(--tfa-navy); margin: 0 0 8px; }
.tfa-access-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }
.tfa-notice { background: #fef3c7; border-left: 4px solid #f59e0b; padding: 12px 16px; border-radius: 4px; font-size: 14px; }

@media (max-width: 640px) {
    .tfa-plans-grid { grid-template-columns: 1fr; }
    .tfa-dashboard-stats { grid-template-columns: repeat(2, 1fr); }
    .tfa-form-grid { grid-template-columns: 1fr; }
    .tfa-dashboard-header { flex-direction: column; text-align: center; }
}

/* ─── Guest Free Tier Banner ──────────────────────────────────────────────── */
.tfa-guest-banner {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #1e3a5f, #2d5a8e);
    border-radius: 16px; padding: 28px 32px; margin-bottom: 24px;
    gap: 24px; flex-wrap: wrap;
}
.tfa-guest-banner-left {
    display: flex; align-items: flex-start; gap: 16px; flex: 1;
}
.tfa-guest-icon { font-size: 40px; flex-shrink: 0; }
.tfa-guest-banner-left h3 { color: #fff; margin: 0 0 6px; font-size: 20px; }
.tfa-guest-banner-left p { color: #a0c4e8; margin: 0 0 12px; font-size: 14px; }
.tfa-guest-features { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.tfa-guest-features li { color: #cbd5e1; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.tfa-guest-features .tfa-check { color: #4ade80; }

.tfa-guest-banner-right { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 180px; }
.tfa-guest-price { text-align: center; }
.tfa-guest-free { display: block; font-size: 36px; font-weight: 800; color: #c8a951; letter-spacing: 2px; }
.tfa-guest-forever { display: block; font-size: 13px; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; }

.tfa-btn-guest {
    background: #c8a951; color: #1e3a5f; font-weight: 700;
    padding: 12px 24px; font-size: 15px; border-radius: 8px;
    border: none; cursor: pointer; width: 100%; transition: all .15s;
}
.tfa-btn-guest:hover { background: #d4b866; }
.tfa-guest-login { color: #94a3b8; font-size: 13px; margin: 0; text-align: center; }
.tfa-guest-login a { color: #c8a951; }

.tfa-current-plan-badge {
    background: rgba(255,255,255,.15); color: #fff;
    padding: 8px 16px; border-radius: 8px; font-size: 13px;
    font-weight: 600; border: 1px solid rgba(255,255,255,.3);
    text-align: center;
}

/* Divider */
.tfa-plans-divider {
    text-align: center; position: relative; margin: 8px 0 24px;
}
.tfa-plans-divider::before {
    content: ''; position: absolute; top: 50%; left: 0; right: 0;
    height: 1px; background: var(--tfa-border);
}
.tfa-plans-divider span {
    position: relative; background: #fff; padding: 0 16px;
    color: var(--tfa-muted); font-size: 13px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .5px;
}

/* Free registration form */
#tfa-register-form .tfa-form-grid { grid-template-columns: 1fr 1fr; }

@media (max-width: 640px) {
    .tfa-guest-banner { flex-direction: column; }
    .tfa-guest-banner-right { width: 100%; }
    .tfa-btn-guest { width: 100%; }
    #tfa-register-form .tfa-form-grid { grid-template-columns: 1fr; }
}
