/* CWA Pilot Registration — public styles */
.cwa-reg-wrap {
    max-width: 520px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.cwa-reg-box {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 36px 40px;
}

.cwa-reg-header {
    text-align: center;
    margin-bottom: 28px;
}
.cwa-reg-logo {
    font-size: 40px;
    margin-bottom: 10px;
}
.cwa-reg-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a3a4c;
    margin: 0 0 6px;
}
.cwa-reg-header p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Fields */
.cwa-field {
    margin-bottom: 16px;
}
.cwa-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.cwa-field label span { color: #e53e3e; }
.cwa-field input[type="text"],
.cwa-field input[type="email"],
.cwa-field input[type="tel"],
.cwa-field input[type="password"],
.cwa-field textarea,
.cwa-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
    box-sizing: border-box;
}
.cwa-field input:focus,
.cwa-field textarea:focus {
    outline: none;
    border-color: #1a3a4c;
    box-shadow: 0 0 0 3px rgba(26,58,76,.1);
}
.cwa-field textarea { resize: vertical; }
.cwa-hint {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
    display: block;
}

.cwa-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.cwa-checkbox-field label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}
.cwa-checkbox-field input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: #1a3a4c;
}

/* Buttons */
.cwa-btn {
    display: inline-block;
    padding: 11px 22px;
    background: #1a3a4c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.cwa-btn:hover { background: #14303f; color: #fff; }
.cwa-btn-full { width: 100%; text-align: center; margin-top: 8px; }
.cwa-btn[disabled] { opacity: .6; cursor: not-allowed; }

/* Message */
.cwa-reg-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 18px;
    line-height: 1.5;
}
.cwa-reg-message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}
.cwa-reg-message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* Status states */
.cwa-approved, .cwa-pending {
    text-align: center;
    padding: 48px 32px;
}
.cwa-reg-icon {
    font-size: 48px;
    margin-bottom: 14px;
}
.cwa-approved h2 { color: #15803d; }
.cwa-pending h2  { color: #92400e; }
.cwa-approved p, .cwa-pending p {
    font-size: 14px;
    color: #555;
    margin: 6px 0 20px;
}

/* Login link */
.cwa-reg-login {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-top: 18px;
    margin-bottom: 0;
}
.cwa-reg-login a { color: #1a3a4c; font-weight: 600; }

@media (max-width: 480px) {
    .cwa-reg-box { padding: 24px 18px; }
    .cwa-field-row { grid-template-columns: 1fr; }
}

/* Policy links inside checkbox labels */
.cwa-checkbox-field a {
    color: #1a3a4c;
    text-decoration: underline;
    font-weight: 600;
}
.cwa-checkbox-field a:hover {
    color: #0f2233;
}

/* ── Inline policy blocks ───────────────────────────────────────────────── */
.cwa-policy-block {
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 14px;
    overflow: hidden;
    background: #fff;
}

.cwa-policy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 16px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    background: #f8fafc;
    transition: background .15s;
}
.cwa-policy-header:hover { background: #f1f5f9; }
.cwa-policy-header:active { background: #e8f0f8; }

.cwa-policy-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a3a4c;
}

.cwa-policy-toggle {
    font-size: 12px;
    font-weight: 600;
    color: #1a3a4c;
    background: #dbeafe;
    border-radius: 20px;
    padding: 3px 10px;
    flex-shrink: 0;
    margin-left: 10px;
}

.cwa-policy-body {
    padding: 14px 16px;
    font-size: 13px;
    color: #374151;
    line-height: 1.7;
    border-top: 1px solid #e2e8f0;
}
.cwa-policy-body p  { margin: 0 0 10px; }
.cwa-policy-body ul { padding-left: 18px; margin: 0 0 10px; }
.cwa-policy-body li { margin-bottom: 6px; }

/* Checkbox sits inside the policy block, below the content */
.cwa-policy-block .cwa-checkbox-field {
    margin: 0;
    padding: 12px 16px;
    background: #f0fdf4;
    border-top: 1px solid #e2e8f0;
}
.cwa-policy-block .cwa-checkbox-field label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #15803d;
    cursor: pointer;
    line-height: 1.5;
}
.cwa-policy-block .cwa-checkbox-field input[type=checkbox] {
    width: 18px;
    height: 18px;
    accent-color: #1a3a4c;
    flex-shrink: 0;
    margin-top: 1px;
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Responsive + Uncode compatibility
   Shared base for all public CWA forms (register, booking, passenger).
   Scoped to .cwa-reg-wrap so it never leaks into the theme.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Predictable box model regardless of Uncode/WPBakery globals. */
.cwa-reg-wrap, .cwa-reg-wrap * { box-sizing: border-box; }

/* The form is fluid: full width up to its max, centred, with safe gutters that
   sit comfortably inside an Uncode row/column (.row-container / .uncell). */
.cwa-reg-wrap {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Defend control styling against Uncode/WooCommerce input + button themes.
   Uncode commonly forces its own border-radius, background, height and
   line-height on inputs and .btn elements; re-assert ours within our scope. */
.cwa-reg-wrap input[type="text"],
.cwa-reg-wrap input[type="email"],
.cwa-reg-wrap input[type="tel"],
.cwa-reg-wrap input[type="password"],
.cwa-reg-wrap input[type="number"],
.cwa-reg-wrap input[type="date"],
.cwa-reg-wrap textarea,
.cwa-reg-wrap select {
    width: 100%;
    max-width: 100%;
    line-height: 1.4;
    height: auto;
    background-color: #fff;
    -webkit-appearance: none;
    appearance: none;
}
.cwa-reg-wrap .cwa-btn {
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    text-transform: none;
}

/* Prevent iOS Safari from zooming the viewport when a field is focused:
   any control under ~16px triggers auto-zoom on focus. */
@media (max-width: 600px) {
    .cwa-reg-wrap input[type="text"],
    .cwa-reg-wrap input[type="email"],
    .cwa-reg-wrap input[type="tel"],
    .cwa-reg-wrap input[type="password"],
    .cwa-reg-wrap input[type="number"],
    .cwa-reg-wrap input[type="date"],
    .cwa-reg-wrap textarea,
    .cwa-reg-wrap select {
        font-size: 16px;
    }
}

/* Tighten outer spacing on small screens. */
@media (max-width: 480px) {
    .cwa-reg-wrap { margin-top: 20px; margin-bottom: 20px; padding: 0 12px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   2.5.0 updates — book-a-ride + apply-to-be-a-pilot forms
   (full width, single dropdown arrow, brand buttons, brand logo image)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Full width: the booking + pilot-registration forms fill 100% of their
   container instead of being capped at the default 520px. The passenger
   registration form is intentionally left at the default width. */
.cwa-booking-wrap,
.cwa-pilot-reg-wrap {
    max-width: none;
}
.cwa-booking-wrap .cwa-reg-box,
.cwa-pilot-reg-wrap .cwa-reg-box {
    max-width: none;
}

/* Single dropdown arrow on <select> controls.
   Some themes (Uncode/WPBakery) add their own arrow on top of the native one,
   which can show several stacked chevrons. Force the native UI off and paint
   exactly one chevron ourselves. !important defends against theme overrides. */
.cwa-reg-wrap select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23475569' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    padding-right: 36px;
}
/* Hide any theme-injected chevron pseudo-element on our select wrappers. */
.cwa-reg-wrap select::-ms-expand { display: none; }

/* Brand buttons on the booking + pilot-registration forms:
   green (#a6c626) with black text. Hover simply keeps the green — no outline. */
.cwa-booking-wrap .cwa-btn,
.cwa-pilot-reg-wrap .cwa-btn {
    background: #a6c626;
    color: #000;
    border: none;
}
.cwa-booking-wrap .cwa-btn:hover,
.cwa-booking-wrap .cwa-btn:focus-visible,
.cwa-pilot-reg-wrap .cwa-btn:hover,
.cwa-pilot-reg-wrap .cwa-btn:focus-visible {
    background: #a6c626;
    color: #000;
    box-shadow: none;
}

/* Form typography: 16px text in the requested system-font stack. Applies to the
   booking + pilot-registration forms. */
.cwa-booking-wrap,
.cwa-pilot-reg-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
.cwa-booking-wrap .cwa-field label,
.cwa-pilot-reg-wrap .cwa-field label,
.cwa-booking-wrap .cwa-field input,
.cwa-booking-wrap .cwa-field select,
.cwa-booking-wrap .cwa-field textarea,
.cwa-pilot-reg-wrap .cwa-field input,
.cwa-pilot-reg-wrap .cwa-field select,
.cwa-pilot-reg-wrap .cwa-field textarea,
.cwa-booking-wrap .cwa-hint,
.cwa-pilot-reg-wrap .cwa-hint,
.cwa-booking-wrap .cwa-reg-header p,
.cwa-pilot-reg-wrap .cwa-reg-header p,
.cwa-booking-wrap .cwa-btn,
.cwa-pilot-reg-wrap .cwa-btn {
    font-size: 16px;
}

/* Brand logo image used in form/accept-page headers (replaces the 🚲 emoji). */
.cwa-reg-logo .cwa-logo-img {
    display: block;
    height: 56px;
    width: auto;
    margin: 0 auto;
}
