/* ═══════════════════════════════════════════════════════════════════
   UWKKO Enrollment Form — Styles
   United World Kyokushin Karate Organization
   Branding: Red (#CC0000), Black (#1A1A1A), White (#FFFFFF)
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Wrapper ────────────────────────────────────────────────────── */
.uwkko-form-wrapper {
    max-width: 720px;
    margin: 30px auto;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ─── Header ─────────────────────────────────────────────────────── */
.uwkko-header {
    background: linear-gradient(135deg, #CC0000, #990000);
    padding: 28px 30px 20px;
    color: #fff;
}

.uwkko-logo-bar {
    text-align: center;
    margin-bottom: 20px;
}

.uwkko-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 3px;
    margin: 0;
    text-transform: uppercase;
}

.uwkko-subtitle {
    font-size: 13px;
    opacity: 0.85;
    margin: 4px 0 0;
    letter-spacing: 1px;
}

/* ─── Progress Bar ───────────────────────────────────────────────── */
.uwkko-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.uwkko-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.uwkko-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.uwkko-step-dot.active .uwkko-dot {
    background: #fff;
    color: #CC0000;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.3);
}

.uwkko-step-dot.completed .uwkko-dot {
    background: #fff;
    color: #27ae60;
}

.uwkko-step-label {
    font-size: 10px;
    margin-top: 6px;
    opacity: 0.7;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.uwkko-step-dot.active .uwkko-step-label {
    opacity: 1;
    font-weight: 600;
}

.uwkko-step-line {
    width: 40px;
    height: 2px;
    background: rgba(255,255,255,0.25);
    margin: 0 4px;
    margin-bottom: 22px;
    transition: background 0.3s;
}

.uwkko-step-line.completed {
    background: #fff;
}

/* ─── Body ───────────────────────────────────────────────────────── */
.uwkko-body {
    padding: 30px;
}

.uwkko-step-title {
    font-size: 20px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

/* ─── Form Fields ────────────────────────────────────────────────── */
.uwkko-row {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.uwkko-row-full .uwkko-field {
    flex: 1 1 100%;
}

.uwkko-field {
    flex: 1;
    margin-bottom: 12px;
}

.uwkko-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.uwkko-req {
    color: #CC0000;
}

.uwkko-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
    box-sizing: border-box;
}

.uwkko-input:focus {
    border-color: #CC0000;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
    outline: none;
    background: #fff;
}

textarea.uwkko-input {
    resize: vertical;
    min-height: 70px;
}

/* ─── Section Cards ──────────────────────────────────────────────── */
.uwkko-section-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.uwkko-section-label {
    font-size: 16px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 16px;
}

.uwkko-section-label small {
    font-weight: 400;
    color: #888;
    font-size: 12px;
}

.uwkko-icon {
    margin-right: 6px;
}

/* ─── Membership Plans Grid ──────────────────────────────────────── */
.uwkko-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.uwkko-plan-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    text-align: center;
}

.uwkko-plan-card:hover {
    border-color: #CC0000;
    box-shadow: 0 2px 12px rgba(204, 0, 0, 0.1);
}

.uwkko-plan-card.selected {
    border-color: #CC0000;
    background: linear-gradient(135deg, #fff5f5, #fff);
    box-shadow: 0 2px 16px rgba(204, 0, 0, 0.15);
}

.uwkko-plan-card input[type="radio"] {
    display: none;
}

.uwkko-plan-price {
    font-size: 24px;
    font-weight: 800;
    color: #CC0000;
    margin-bottom: 8px;
}

.uwkko-plan-price small {
    font-size: 13px;
    font-weight: 400;
    color: #888;
}

.uwkko-plan-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.uwkko-plan-info p {
    font-size: 12px;
    color: #777;
    margin: 4px 0 0;
}

.uwkko-plan-age {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
}

/* ─── Minor Alert ────────────────────────────────────────────────── */
.uwkko-minor-alert {
    background: #fff3e0;
    border: 2px solid #ff9800;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #e65100;
    line-height: 1.5;
}

/* ─── Signature Pad ──────────────────────────────────────────────── */
.uwkko-sig-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.uwkko-sig-consent {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 16px;
    padding: 14px 18px;
    background: #f5f5f5;
    border-radius: 8px;
    border-left: 4px solid #CC0000;
}

.uwkko-sig-container {
    margin: 12px 0;
}

.uwkko-sig-pad {
    border: 2px dashed #c4cdd5;
    border-radius: 10px;
    background: #fafbfc;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s;
}

.uwkko-sig-pad:hover { border-color: #CC0000; }

.uwkko-sig-pad canvas {
    display: block;
    width: 100%;
    height: 180px;
    cursor: crosshair;
    touch-action: none;
}

.uwkko-sig-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #aaa;
    font-size: 15px;
    pointer-events: none;
    text-align: center;
    transition: opacity 0.3s;
}

.uwkko-sig-pad.has-signature .uwkko-sig-placeholder { opacity: 0; }

.uwkko-sig-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.uwkko-btn-clear-sig {
    padding: 6px 16px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.uwkko-btn-clear-sig:hover {
    background: #f5f5f5;
    border-color: #999;
}

.uwkko-sig-preview {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    margin: 8px 16px 16px;
}

/* ─── Review ─────────────────────────────────────────────────────── */
.uwkko-review {
    margin-bottom: 20px;
}

.uwkko-review-section {
    margin-bottom: 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.uwkko-review-section h4 {
    background: #f5f5f5;
    padding: 10px 16px;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #555;
    border-bottom: 1px solid #eee;
}

.uwkko-review-highlight h4 {
    background: linear-gradient(135deg, #CC0000, #990000);
    color: #fff;
}

.uwkko-review-row {
    display: flex;
    padding: 8px 16px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}

.uwkko-review-row:last-child {
    border-bottom: none;
}

.uwkko-review-label {
    width: 140px;
    color: #888;
    flex-shrink: 0;
}

.uwkko-review-value {
    font-weight: 500;
    color: #333;
}

/* ─── Indemnity ──────────────────────────────────────────────────── */
.uwkko-indemnity {
    background: #fff9e6;
    border: 2px solid #f0d860;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 16px;
}

.uwkko-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

.uwkko-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #CC0000;
}

/* ─── Navigation ─────────────────────────────────────────────────── */
.uwkko-nav {
    display: flex;
    justify-content: space-between;
    padding: 0 30px 30px;
}

.uwkko-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.uwkko-btn i {
    font-style: normal;
}

.uwkko-btn-back {
    background: #f0f0f0;
    color: #555;
}

.uwkko-btn-back:hover {
    background: #e0e0e0;
}

.uwkko-btn-next {
    background: #CC0000;
    color: #fff;
}

.uwkko-btn-next:hover {
    background: #990000;
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.3);
}

.uwkko-btn-submit {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: #fff;
    padding: 14px 32px;
    font-size: 16px;
}

.uwkko-btn-submit:hover {
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.3);
    transform: translateY(-1px);
}

.uwkko-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ─── Error ──────────────────────────────────────────────────────── */
.uwkko-error {
    background: #fdecea;
    color: #b71c1c;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    animation: uwkkoShake 0.4s ease;
}

@keyframes uwkkoShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ─── Success ────────────────────────────────────────────────────── */
.uwkko-success {
    text-align: center;
    padding: 50px 30px;
}

.uwkko-success-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.uwkko-success h2 {
    font-size: 28px;
    font-weight: 800;
    color: #27ae60;
    margin: 0 0 8px;
}

.uwkko-success p {
    color: #666;
    font-size: 15px;
    max-width: 480px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

.uwkko-member-card {
    display: inline-block;
    background: linear-gradient(135deg, #CC0000, #990000);
    color: #fff;
    border-radius: 12px;
    padding: 20px 40px;
    margin: 16px 0;
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.25);
}

.uwkko-member-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.uwkko-member-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 3px;
}

.uwkko-success-detail {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.uwkko-success-note {
    font-size: 13px !important;
    color: #888 !important;
    margin-top: 24px !important;
}

/* ─── Spinner ────────────────────────────────────────────────────── */
.uwkko-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: uwkkoSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes uwkkoSpin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════
   Affiliation wizard (v1.4.0) — mobile-first: bigger inputs & buttons,
   dropdown-heavy, document tiles with preview, fee summary
   ═══════════════════════════════════════════════════════════════════ */
.uwkko-step-count {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    color: rgba(255,255,255,.9);
}
.uwkko-step-desc { color: #666; font-size: 14px; line-height: 1.6; margin: -12px 0 18px; }
.uwkko-section-title { font-size: 16px; font-weight: 700; color: #1A1A1A; margin: 22px 0 12px; padding-top: 14px; border-top: 1px solid #f0f0f0; }
.uwkko-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.uwkko-wide { grid-column: 1 / -1; }
.uwkko-form-group { margin-bottom: 4px; }
.uwkko-form-group label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
.uwkko-form-wrapper .uwkko-input,
.uwkko-form-wrapper select.uwkko-input {
    min-height: 48px;
    font-size: 16px; /* prevents iOS zoom */
    padding: 12px 14px;
    -webkit-appearance: none;
    appearance: none;
}
.uwkko-form-wrapper select.uwkko-input {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23666' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
.uwkko-hint { display: block; font-size: 12px; color: #888; margin-top: 4px; line-height: 1.5; }
.uwkko-hint-inline { font-weight: 400; color: #999; }
.uwkko-inline { display: flex; gap: 8px; align-items: stretch; }
.uwkko-inline .uwkko-input { flex: 1; }
.uwkko-btn-mini { padding: 8px 12px; font-size: 13px; border-radius: 8px; background: #f0f0f0; color: #333; border: 1px solid #ddd; white-space: nowrap; }
.uwkko-btn-mini:hover { background: #e6e6e6; }
.uwkko-btn-danger { color: #b71c1c; }

/* Type cards */
.uwkko-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.uwkko-type-card { display: block; border: 2px solid #e0e0e0; border-radius: 12px; padding: 16px; cursor: pointer; background: #fff; transition: all .2s; position: relative; }
.uwkko-type-card input { position: absolute; opacity: 0; pointer-events: none; }
.uwkko-type-card:hover { border-color: #CC0000; }
.uwkko-type-card.selected { border-color: #CC0000; background: linear-gradient(135deg, #fff5f5, #fff); box-shadow: 0 2px 16px rgba(204,0,0,.15); }
.uwkko-type-card.selected::after { content: '✓'; position: absolute; top: 10px; right: 12px; width: 24px; height: 24px; border-radius: 50%; background: #CC0000; color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.uwkko-type-name { font-size: 15px; font-weight: 700; color: #1A1A1A; padding-right: 26px; }
.uwkko-type-desc { font-size: 12px; color: #777; margin: 6px 0 10px; line-height: 1.5; }
.uwkko-type-fee { font-size: 18px; font-weight: 800; color: #CC0000; }
.uwkko-type-fee small { font-size: 12px; font-weight: 400; color: #888; }

/* Checkboxes */
.uwkko-check-row { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.uwkko-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: #444; min-height: 40px; }
.uwkko-check input { width: 22px; height: 22px; accent-color: #CC0000; flex-shrink: 0; }

/* Documents */
.uwkko-doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.uwkko-doc-tile { border: 2px dashed #d0d0d0; border-radius: 12px; padding: 12px; background: #fafafa; text-align: center; transition: border-color .2s; }
.uwkko-doc-tile.has-file { border-style: solid; border-color: #27ae60; background: #f4fbf6; }
.uwkko-doc-label { font-size: 13px; font-weight: 700; color: #333; margin-bottom: 8px; }
.uwkko-doc-label small { font-weight: 400; color: #999; }
.uwkko-doc-drop { display: flex; align-items: center; justify-content: center; min-height: 92px; border-radius: 10px; background: #fff; border: 1px solid #eee; cursor: pointer; color: #666; font-size: 14px; font-weight: 600; }
.uwkko-doc-drop input { display: none; }
.uwkko-doc-drop:hover { border-color: #CC0000; color: #CC0000; }
.uwkko-doc-preview { height: 110px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 10px; background: #fff; border: 1px solid #e6e6e6; }
.uwkko-doc-preview img { max-width: 100%; max-height: 110px; object-fit: contain; }
.uwkko-pdf-ico { font-size: 44px; }
.uwkko-doc-meta { font-size: 11px; color: #777; margin: 6px 0; word-break: break-all; }
.uwkko-doc-actions { display: flex; gap: 6px; justify-content: center; }
.uwkko-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 99999; align-items: center; justify-content: center; padding: 16px; }
.uwkko-lightbox-inner { position: relative; width: 100%; max-width: 900px; height: 90vh; background: #fff; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.uwkko-lightbox-inner img { max-width: 100%; max-height: 100%; object-fit: contain; }
.uwkko-lightbox-inner iframe { width: 100%; height: 100%; border: 0; }
.uwkko-lightbox-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #CC0000; color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; z-index: 2; }

/* Fees */
.uwkko-fees { background: #f9f9f9; border: 1px solid #eee; border-radius: 12px; padding: 16px 18px; margin: 16px 0; }
.uwkko-fees h4 { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: 1px; }
.uwkko-fee-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; font-size: 14px; color: #444; }
.uwkko-fee-row small { color: #999; }
.uwkko-fee-total { border-bottom: 0; font-weight: 800; color: #CC0000; font-size: 17px; padding-top: 12px; }
.uwkko-pay-btn { display: block; text-align: center; margin: 14px 0 6px; background: linear-gradient(135deg, #00C853, #009624); color: #fff !important; text-decoration: none; font-weight: 700; padding: 15px 20px; border-radius: 10px; font-size: 16px; }
.uwkko-bank { background: #fff; border: 1px solid #e6e6e6; border-radius: 8px; padding: 12px 14px; font-family: Consolas, monospace; font-size: 13px; white-space: pre-wrap; margin: 6px 0; color: #333; }

/* Declaration */
.uwkko-declaration { margin-top: 12px; }
.uwkko-sig-label { display: block; font-size: 13px; font-weight: 600; color: #555; margin: 14px 0 6px; }
.uwkko-loading { text-align: center; padding: 40px 0; color: #777; font-size: 15px; }
.uwkko-spinner-dark { border-color: rgba(0,0,0,.15); border-top-color: #CC0000; }
.uwkko-form-wrapper .uwkko-btn { min-height: 48px; }
.uwkko-form-wrapper .uwkko-btn-mini { min-height: 36px; }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .uwkko-grid, .uwkko-type-grid { grid-template-columns: 1fr; }
    /* One document per row on phones — two columns squashes the tiles and
       wraps the labels vertically (Sensei's screenshot, 2026-08-20). */
    .uwkko-doc-grid { grid-template-columns: 1fr; }
    .uwkko-doc-drop { min-height: 72px; }
    .uwkko-form-wrapper .uwkko-btn { padding: 14px 22px; font-size: 16px; min-height: 52px; }
    .uwkko-form-wrapper .uwkko-btn-mini { padding: 10px 12px; font-size: 13px; min-height: 40px; }
    .uwkko-step-count { font-size: 12px; }
    .uwkko-inline { flex-direction: column; }
    .uwkko-lightbox-inner { height: 80vh; }

    .uwkko-form-wrapper {
        margin: 10px;
        border-radius: 8px;
    }

    .uwkko-header {
        padding: 20px 16px 16px;
    }

    .uwkko-title {
        font-size: 20px;
        letter-spacing: 2px;
    }

    .uwkko-body {
        padding: 20px 16px;
    }

    .uwkko-row {
        flex-direction: column;
        gap: 0;
    }

    .uwkko-nav {
        padding: 0 16px 20px;
    }

    .uwkko-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .uwkko-step-label {
        display: none;
    }

    .uwkko-plans-grid {
        grid-template-columns: 1fr;
    }


    .uwkko-review-row {
        flex-direction: column;
        gap: 2px;
    }

    .uwkko-review-label {
        width: auto;
        font-size: 12px;
    }

    .uwkko-member-number {
        font-size: 24px;
    }
}
