/* ── SAF Membership Table – Frontend Styles v1.1.0 ── */
/* Brand colors from safnow.org:
   Nav blue:   #2a6ebb  (main nav background)
   Dark navy:  #1a3a6b  (logo / deep accent)
   Green CTA:  #4caf50  (Join SAF button)
   Green dark: #388e3c  (hover state)
*/

:root {
    --saf-blue:        #2a6ebb;
    --saf-blue-dark:   #1a3a6b;
    --saf-blue-light:  #e8f0fb;
    --saf-green:       #4caf50;
    --saf-green-dark:  #388e3c;
    --saf-green-light: #e8f5e9;
    --saf-border:      #dde3ee;
    --saf-bg:          #f4f6fa;
    --saf-cat-bg:      #eef3fb;
    --saf-text:        #1a1a1a;
    --saf-muted:       #6b7280;
}

/* ── Wrapper ── */
.saf-mt-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0 2rem;
}

/* ── Segment tabs ── */
.saf-mt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 1.75rem;
    border-bottom: 2px solid var(--saf-border);
    padding-bottom: 0;
}

.saf-mt-tab {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    color: var(--saf-muted);
    transition: color 0.15s, border-color 0.15s;
    outline: none;
    white-space: nowrap;
}

.saf-mt-tab:hover {
    color: var(--saf-blue);
}

.saf-mt-tab.active {
    color: var(--saf-blue);
    border-bottom-color: var(--saf-green);
    font-weight: 700;
}

/* ── Panels ── */
.saf-mt-panel {
    display: none;
}

.saf-mt-panel.active {
    display: block;
}

/* ── Table scroll wrapper (mobile) ── */
.saf-mt-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Table base ── */
.saf-mt-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
    font-size: 14px;
    line-height: 1.45;
    table-layout: fixed;
}

.saf-mt-table th,
.saf-mt-table td {
    padding: 12px 16px;
    text-align: center;
    vertical-align: middle;
}

.saf-mt-table th.saf-mt-benefit-col,
.saf-mt-table td.saf-mt-benefit-label {
    text-align: left;
    width: 34%;
}

/* ── Column header row ── */
.saf-mt-table thead th {
    vertical-align: bottom;
    padding: 22px 16px 16px;
    background: #fff;
    border: 1px solid var(--saf-border);
    border-bottom: none;
    font-weight: 600;
    color: var(--saf-text);
}

.saf-mt-table thead th.saf-mt-benefit-col {
    background: var(--saf-bg);
    border: none;
}

/* ── Badge ("Most popular") ── */
.saf-mt-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    background: var(--saf-green);
    color: #fff;
    border-radius: 20px;
    padding: 3px 10px;
    margin-bottom: 8px;
}

.saf-mt-tier-name {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: var(--saf-text);
    margin-bottom: 3px;
}

.saf-mt-tier-price {
    display: block;
    font-size: 12px;
    color: var(--saf-muted);
    font-weight: 400;
    margin-bottom: 14px;
}

/* ── Featured column ── */
.saf-mt-table thead th.saf-mt-featured {
    border-left: 2px solid var(--saf-green) !important;
    border-right: 2px solid var(--saf-green) !important;
    border-top: 3px solid var(--saf-green) !important;
    border-bottom: none;
    background: #fff;
}

.saf-mt-table td.saf-mt-featured {
    border-left: 2px solid var(--saf-green);
    border-right: 2px solid var(--saf-green);
    background: #fff;
}

.saf-mt-table tr.saf-mt-cta-row td.saf-mt-featured-last {
    border-bottom: 2px solid var(--saf-green);
}

/* ── Category header rows ── */
.saf-mt-cat-row td {
    background: var(--saf-cat-bg);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--saf-blue);
    padding: 9px 16px;
    text-align: left;
    border-top: 1px solid var(--saf-border);
    border-bottom: 1px solid var(--saf-border);
}

.saf-mt-cat-row td.saf-mt-featured {
    background: #edf7ee;
}

/* ── Benefit rows ── */
.saf-mt-benefit-row td {
    border-top: 1px solid #f0f3f8;
    background: #fff;
}

.saf-mt-benefit-row:hover td {
    background: var(--saf-blue-light);
}

.saf-mt-benefit-row:hover td.saf-mt-featured {
    background: var(--saf-green-light);
}

.saf-mt-label-text {
    display: block;
    font-size: 13px;
    color: var(--saf-text);
    font-weight: 500;
}

.saf-mt-label-note {
    display: block;
    font-size: 11px;
    color: var(--saf-muted);
    margin-top: 2px;
}

/* ── Cell icons ── */
.saf-mt-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--saf-green-light);
    color: var(--saf-green-dark);
    font-size: 12px;
    font-weight: 700;
}

.saf-mt-dash {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #ccc;
    font-size: 15px;
    line-height: 1;
}

.saf-mt-custom {
    font-size: 12px;
    color: var(--saf-muted);
}

/* ── CTA row ── */
.saf-mt-cta-row td {
    padding: 16px 14px;
    border-top: 1px solid var(--saf-border);
    background: #fff;
}

.saf-mt-cta-btn {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 5px;
    border: 1.5px solid var(--saf-border);
    color: var(--saf-blue);
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    background: #fff;
}

.saf-mt-cta-btn:hover {
    background: var(--saf-blue-light);
    border-color: var(--saf-blue);
    text-decoration: none;
    color: var(--saf-blue-dark);
}

.saf-mt-cta-featured {
    background: var(--saf-green);
    color: #fff !important;
    border-color: var(--saf-green);
}

.saf-mt-cta-featured:hover {
    background: var(--saf-green-dark);
    border-color: var(--saf-green-dark);
    color: #fff !important;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .saf-mt-tab {
        font-size: 10px;
        padding: 8px 12px;
        letter-spacing: .04em;
    }
}

@media (max-width: 640px) {
    .saf-mt-table th,
    .saf-mt-table td {
        padding: 9px 10px;
        font-size: 12px;
    }

    .saf-mt-tier-name {
        font-size: 14px;
    }

    .saf-mt-label-text {
        font-size: 12px;
    }

    .saf-mt-cta-btn {
        padding: 7px 10px;
        font-size: 11px;
    }

    .saf-mt-check,
    .saf-mt-dash {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
}
