/* WYCC Public Membership Form */

.wycc-pub-wrap {
    max-width: 680px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Notices ───────────────────────────────────────────────── */

.wycc-pub-notice {
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}
.wycc-pub-notice-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}
.wycc-pub-notice-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}
.wycc-pub-notice-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}
.wycc-pub-notice-error ul {
    margin: 8px 0 0 16px;
    padding: 0;
}
.wycc-pub-notice-error li {
    margin-bottom: 4px;
}
.wycc-pub-error {
    color: #991b1b;
}

/* ── Header ────────────────────────────────────────────────── */

.wycc-pub-heading {
    margin: 0 0 4px;
    font-size: 1.4em;
}
.wycc-pub-meta {
    color: #6b7280;
    margin: 0 0 20px;
    font-size: 0.95em;
}

/* ── Progress nav ──────────────────────────────────────────── */

.wycc-pub-progress {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.wycc-pub-progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 10px;
    font-size: 0.85em;
    color: #9ca3af;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    flex-shrink: 0;
}
.wycc-pub-progress-step.wycc-step-current,
.wycc-pub-progress-step.wycc-step-done {
    color: #111827;
    border-bottom-color: #2563eb;
}
.wycc-pub-progress-step.wycc-step-done {
    color: #6b7280;
    border-bottom-color: #93c5fd;
}
.wycc-pub-progress-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.8em;
    flex-shrink: 0;
}
.wycc-pub-progress-step.wycc-step-current .wycc-pub-progress-num {
    background: #2563eb;
    color: #fff;
}
.wycc-pub-progress-step.wycc-step-done .wycc-pub-progress-num {
    background: #93c5fd;
    color: #1e40af;
}
@media (max-width: 480px) {
    .wycc-pub-progress-label { display: none; }
    .wycc-pub-progress-step { padding: 8px 10px 10px; }
}

/* ── Steps ─────────────────────────────────────────────────── */

.wycc-pub-step { display: none; }
.wycc-pub-step.wycc-pub-step-active { display: block; }

.wycc-pub-step-title {
    font-size: 1.1em;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}
.wycc-pub-step-desc {
    color: #6b7280;
    margin: -8px 0 16px;
    font-size: 0.95em;
}

/* ── Payment step ──────────────────────────────────────────── */

.wycc-pub-order-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 24px;
}
.wycc-pub-order-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 1.05em;
    margin-bottom: 8px;
}
.wycc-pub-pay-instructions {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 0.95em;
}

/* ── Fields ────────────────────────────────────────────────── */

.wycc-pub-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.wycc-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.wycc-field-wrap label {
    font-weight: 600;
    font-size: 0.9em;
    color: #374151;
}
.wycc-field-wrap .required {
    color: #dc2626;
    margin-left: 1px;
}
.wycc-field-wrap input[type="text"],
.wycc-field-wrap input[type="number"],
.wycc-field-wrap input[type="date"],
.wycc-field-wrap input[type="email"],
.wycc-field-wrap select,
.wycc-field-wrap textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1em;
    font-family: inherit;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.wycc-field-wrap input:focus,
.wycc-field-wrap select:focus,
.wycc-field-wrap textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.wycc-field-wrap input[aria-invalid="true"],
.wycc-field-wrap select[aria-invalid="true"],
.wycc-field-wrap textarea[aria-invalid="true"] {
    border-color: #dc2626;
}
.wycc-field-wrap textarea {
    resize: vertical;
    min-height: 80px;
}
.wycc-field-wrap select[multiple] {
    height: auto;
}
.wycc-field-detail {
    font-size: 0.82em;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Toggle (boolean) */
.wycc-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    font-weight: normal;
}
.wycc-toggle input[type="checkbox"] {
    width: 0;
    height: 0;
    position: absolute;
    opacity: 0;
}
.wycc-toggle-slider {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    background: #d1d5db;
    border-radius: 11px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.wycc-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.wycc-toggle input:checked ~ .wycc-toggle-slider { background: #2563eb; }
.wycc-toggle input:checked ~ .wycc-toggle-slider::after { transform: translateX(18px); }

/* Consent */
.wycc-consent-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal;
}
.wycc-consent-checkbox {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px !important;
    height: 16px;
    cursor: pointer;
}
.wycc-consent-text {
    font-size: 0.9em;
    line-height: 1.5;
    color: #374151;
}

/* ── Step navigation buttons ───────────────────────────────── */

.wycc-pub-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.wycc-pub-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 4px;
    font-size: 0.95em;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
}
.wycc-pub-btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.wycc-pub-btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.wycc-pub-btn-secondary {
    background: #fff;
    color: #374151;
    border-color: #d1d5db;
}
.wycc-pub-btn-secondary:hover { background: #f9fafb; }
.wycc-pub-btn-outline {
    background: #fff;
    color: #2563eb;
    border-color: #93c5fd;
}
.wycc-pub-btn-outline:hover { background: #eff6ff; }
.wycc-pub-btn-outline:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Renewal: resend code ──────────────────────────────────── */

.wycc-renewal-resend {
    font-size: 0.9em;
    color: #6b7280;
    margin: 4px 0 20px;
}
.wycc-pub-btn-link {
    background: none;
    border: none;
    color: #2563eb;
    font-weight: 600;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}
.wycc-pub-btn-link:hover:not(:disabled) { text-decoration: underline; }
.wycc-pub-btn-link:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

/* ── Type selector ─────────────────────────────────────────── */

.wycc-type-selector { padding: 8px 0; }
.wycc-type-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}
.wycc-type-option {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.wycc-type-option:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}
.wycc-type-option input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #2563eb;
}
.wycc-type-option-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wycc-type-option-name { font-size: 1em; }
.wycc-type-option-desc { color: #6b7280; font-size: 0.9em; }
.wycc-type-option-meta { color: #6b7280; font-size: 0.85em; }
.wycc-type-selector-footer { text-align: right; }

/* ── Linked / family member blocks ─────────────────────────── */

.wycc-linked-block {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafafa;
}
.wycc-linked-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.wycc-linked-block-title {
    margin: 0;
    font-size: 1em;
    font-weight: 600;
}
.wycc-pub-btn-danger-link {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 0.85em;
    padding: 2px 6px;
}
.wycc-pub-btn-danger-link:hover { text-decoration: underline; }

.wycc-linked-block-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#wycc-add-linked-btn { margin-top: 4px; }
