/* OAR Patron Registration Form Styles */

.oar-form-wrap {
    background: #CC0000;
    border-radius: 6px;
    overflow: hidden;
    max-width: 820px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    color: #fff;
}

.oar-form-header {
    background: #AA0000;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.oar-form-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.oar-help-btn {
    background: transparent;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 6px 10px;
    text-decoration: none;
    cursor: pointer;
}

.oar-form-notice {
    background: #BB0000;
    padding: 12px 24px;
    font-size: 13px;
    line-height: 1.5;
    border-bottom: 1px solid #AA0000;
}

.oar-form-notice p { margin: 4px 0; }

.oar-form-errors {
    background: #7a0000;
    padding: 12px 24px;
    font-size: 13px;
    border-left: 4px solid #ff4444;
}

.oar-form-errors p { margin: 4px 0; }

/* Patron row */
.oar-patron-row {
    background: #CC0000;
    padding: 18px 24px;
    border-bottom: 2px solid #AA0000;
}

.oar-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.oar-row-label {
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffdddd;
}

.oar-remove-row {
    background: #AA0000;
    border: 1px solid #ff9999;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 0;
}

.oar-remove-row:hover { background: #880000; }

/* Field layouts */
.oar-field-group {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.oar-field-group label:first-child {
    min-width: 130px;
    font-size: 13px;
    font-weight: bold;
}

.oar-field-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.oar-field {
    flex: 1;
    min-width: 160px;
}

.oar-field label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 4px;
}

/* White input fields */
.oar-field input[type="text"],
.oar-field input[type="email"],
.oar-field input[type="tel"],
.oar-field-group input[type="text"],
.oar-field-group input[type="email"],
.oar-field-group input[type="tel"] {
    width: 100%;
    padding: 7px 10px;
    border: none;
    border-radius: 3px;
    background: #fff;
    color: #333;
    font-size: 13px;
    box-sizing: border-box;
}

.oar-field-group input[type="text"],
.oar-field-group input[type="email"],
.oar-field-group input[type="tel"] {
    flex: 1;
    min-width: 200px;
}

.oar-field input::placeholder,
.oar-field-group input::placeholder { color: #aaa; }

/* Radio buttons — tight spacing */
.oar-radio-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.oar-radio-label {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    white-space: nowrap;
}

.oar-radio-label input[type="radio"] {
    accent-color: #fff;
    width: 14px;
    height: 14px;
    margin: 0;
    flex-shrink: 0;
}

.req { color: #ffdd66; }

/* Fee select */
.oar-fee-select {
    width: 100%;
    padding: 7px 10px;
    border: none;
    border-radius: 3px;
    font-size: 13px;
    background: #fff;
    color: #003366;
    font-weight: 600;
}

/* Add Patron button — visible */
.oar-add-row-wrap {
    padding: 14px 24px;
    background: #BB0000;
}

.oar-add-btn {
    background: #ffffff !important;
    color: #CC0000 !important;
    border: 3px solid #ffffff !important;
    padding: 10px 24px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    font-size: 14px !important;
    cursor: pointer !important;
    letter-spacing: 0.5px;
    display: inline-block !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.oar-add-btn:hover {
    background: #ffe0e0 !important;
    border-color: #ffe0e0 !important;
    color: #AA0000 !important;
}

/* Card logos */
.oar-card-logos {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.oar-card-logos img {
    height: 36px;
    border-radius: 4px;
    background: #fff;
    padding: 3px;
}

/* Footer bar */
.oar-form-footer {
    background: #AA0000;
    padding: 14px 24px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    border-top: 2px solid #880000;
}

.oar-footer-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.oar-footer-field label {
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

.oar-footer-field input {
    background: #fff;
    color: #333;
    border: none;
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 3px;
    width: 110px;
    text-align: center;
}

/* Card notice */
.oar-card-notice {
    background: #AA0000;
    padding: 16px 24px;
    font-size: 12px;
    text-align: center;
    color: #fff;
    border-top: 1px solid #880000;
}

/* T&Cs checkbox */
.oar-tc-wrap {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 12px 16px;
    margin: 0 24px 0;
}

.oar-tc-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.oar-tc-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #fff;
}

/* T&Cs link — bright white, clearly readable */
.oar-tc-label a,
.oar-tc-label a:visited,
.oar-tc-label a:link {
    color: #fff !important;
    text-decoration: underline;
    font-weight: bold;
}

.oar-tc-label a:hover {
    color: #ffe066 !important;
}

/* Submit */
.oar-submit-wrap {
    padding: 16px 24px;
    background: #AA0000;
    text-align: center;
}

.oar-submit-btn {
    background: #ffffff !important;
    color: #CC0000 !important;
    border: 3px solid #ffffff !important;
    padding: 14px 36px !important;
    font-size: 15px !important;
    font-weight: bold !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    letter-spacing: 0.5px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.oar-submit-btn:hover {
    background: #ffe0e0 !important;
    border-color: #ffe0e0 !important;
    color: #AA0000 !important;
}

/* Confirmation table */
.oar-confirm-table {
    width: calc(100% - 48px);
    border-collapse: collapse;
    font-size: 13px;
    margin: 16px 24px;
}

.oar-confirm-table th {
    background: #AA0000;
    color: #fff;
    padding: 8px 10px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
}

.oar-confirm-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 13px;
}

.oar-confirm-table tbody tr:nth-child(even) td {
    background: rgba(0,0,0,0.1);
}

.oar-total-row td {
    background: #880000 !important;
    font-size: 14px;
}

/* Confirm actions */
.oar-confirm-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px 24px;
    flex-wrap: wrap;
}

.oar-back-btn {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.oar-back-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Title row — override min-width so Mr/Mrs/Ms sit tight together */
.oar-title-group label:first-child {
    min-width: 50px !important;
}
.oar-title-group .oar-radio-group {
    gap: 6px;
}

/* ─── MOBILE RESPONSIVE ─────────────────────────────────────────────────────
   Breakpoints:
   ≤ 600px  = phone portrait
   601–820px = tablet / phone landscape (already mostly fine)
───────────────────────────────────────────────────────────────────────────── */

@media ( max-width: 600px ) {

    /* Wrapper — remove border-radius, use full width */
    .oar-form-wrap {
        border-radius: 0;
        max-width: 100%;
        margin: 0;
    }

    /* Header — stack title and help button */
    .oar-form-header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .oar-form-header h2 { font-size: 17px; }

    .oar-help-btn { align-self: flex-end; }

    /* Notice / errors */
    .oar-form-notice,
    .oar-form-errors {
        padding: 10px 16px;
        font-size: 12px;
    }

    /* Patron row */
    .oar-patron-row {
        padding: 14px 16px;
    }

    /* Side-by-side fields stack vertically */
    .oar-field-row {
        flex-direction: column;
        gap: 0;
    }

    .oar-field {
        min-width: 0;
        width: 100%;
    }

    /* Label + input groups — stack label above input on small screens */
    .oar-field-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .oar-field-group label:first-child {
        min-width: 0;
        width: 100%;
    }

    .oar-field-group input[type="text"],
    .oar-field-group input[type="email"],
    .oar-field-group input[type="tel"] {
        min-width: 0;
        width: 100%;
    }

    /* Radio buttons — wrap if needed */
    .oar-radio-group {
        gap: 6px 12px;
    }

    .oar-radio-label {
        font-size: 14px;   /* larger tap target on mobile */
    }

    .oar-radio-label input[type="radio"] {
        width: 18px;
        height: 18px;
    }

    /* Fee select — full width */
    .oar-fee-select {
        font-size: 15px;
        padding: 10px 12px;
    }

    /* Add patron button — full width */
    .oar-add-row-wrap {
        padding: 12px 16px;
    }

    .oar-add-btn {
        width: 100% !important;
        text-align: center !important;
        padding: 13px 16px !important;
        font-size: 15px !important;
        box-sizing: border-box !important;
    }

    /* Summary footer — stack fields */
    .oar-form-footer {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
        align-items: stretch;
    }

    .oar-footer-field {
        justify-content: space-between;
    }

    .oar-footer-field input {
        width: auto;
        flex: 1;
        max-width: 180px;
        font-size: 14px;
    }

    /* Card notice */
    .oar-card-notice {
        padding: 14px 16px;
        font-size: 12px;
    }

    /* T&Cs */
    .oar-tc-wrap {
        margin: 0 16px;
        padding: 12px;
    }

    .oar-tc-label {
        font-size: 13px;
        align-items: flex-start;
    }

    .oar-tc-label input[type="checkbox"] {
        margin-top: 2px;
        flex-shrink: 0;
    }

    /* Submit button — full width */
    .oar-submit-wrap {
        padding: 14px 16px;
    }

    .oar-submit-btn {
        max-width: 100% !important;
        width: 100% !important;
        padding: 16px !important;
        font-size: 16px !important;
    }

    /* Confirmation table — scrollable on small screens */
    .oar-confirm-table {
        width: calc(100% - 32px);
        margin: 12px 16px;
        font-size: 12px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .oar-confirm-table th,
    .oar-confirm-table td {
        padding: 7px 8px;
        white-space: nowrap;
    }

    /* Confirm actions — stack */
    .oar-confirm-actions {
        flex-direction: column;
        padding: 14px 16px;
        gap: 10px;
    }

    .oar-back-btn {
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .oar-confirm-actions .oar-submit-btn {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Title radio group — Mr/Mrs/Ms on one line */
    .oar-title-group .oar-radio-group {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 12px;
    }
}

/* Tablet: 601–820px — minor tweaks only */
@media ( min-width: 601px ) and ( max-width: 820px ) {
    .oar-form-wrap {
        max-width: 100%;
        border-radius: 4px;
        margin: 0 8px;
    }

    .oar-field-group label:first-child {
        min-width: 110px;
    }

    .oar-confirm-table {
        font-size: 12px;
    }
}
