/* checkouts/checkout3.css — inline one-page checkout block (SportStars).
 *
 * Ported from AGS checkout3.css with the multi-program camp-cart rules dropped
 * (checkboxes, tabs, selected-total) and the brand accent switched to this
 * repo's checkout orange (#ff9900, the same colorPrimary camp-register.js and
 * league-register.js hand to Stripe Elements).
 *
 * EVERY rule is scoped under .ss-checkout3. That is load-bearing: this block is
 * embedded in live landing pages that load Bootstrap, and the AGS original
 * styles bare .form-control / .btn-primary / .form-group / .checkout-container,
 * which would repaint half of the host page. */

.ss-checkout3 .checkout-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Muli', sans-serif;
    text-align: left;
}

/* TEST MODE banner — deliberately loud; the session flag is sticky, so a visitor
   must never be unable to tell they are on test keys. */
.ss-checkout3 .ss3-test-banner {
    background: #ff6d00;
    color: #fff;
    padding: 10px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    border-radius: 6px;
    font-family: 'Muli', sans-serif;
    font-size: 14px;
}

.ss-checkout3 .checkout-section {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ss-checkout3 .checkout-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 24px;
    text-transform: uppercase;
    color: #161829;
    margin-bottom: 30px;
    text-align: center;
}

.ss-checkout3 .form-group {
    margin-bottom: 20px;
}

.ss-checkout3 .form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #161829;
    font-size: 14px;
}

.ss-checkout3 .required-asterisk {
    color: #dc3545;
    font-weight: bold;
}

.ss-checkout3 .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-family: 'Muli', sans-serif;
    box-sizing: border-box;
    background-color: #fff;
    color: #161829;
    transition: all 0.3s ease;
}

.ss-checkout3 select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding: 12px 35px 12px 15px;
    cursor: pointer;
    min-height: 46px;
}

.ss-checkout3 select.form-control option[value=""] {
    color: #999;
}

.ss-checkout3 .form-control:hover {
    border-color: #ff9900;
}

.ss-checkout3 .form-control:focus {
    outline: none;
    border-color: #ff9900;
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.15);
}

/* Read-only fields for auto-recognized members */
.ss-checkout3 .form-control.field-readonly {
    background-color: #f5f5f5;
    color: #666;
    cursor: not-allowed;
    border-color: #ddd;
}

.ss-checkout3 .form-control.field-readonly:focus {
    outline: none;
    box-shadow: none;
    border-color: #ddd;
}

/* Child selection buttons */
.ss-checkout3 .child-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
}

.ss-checkout3 .child-select-btn {
    flex: 0 1 calc(33.333% - 7px);
    min-width: 100px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Muli', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.ss-checkout3 .child-select-btn:hover {
    background: #fff;
    border-color: #ff9900;
    color: #b36b00;
}

.ss-checkout3 .child-select-btn.selected {
    background: #ff9900;
    border-color: #ff9900;
    color: #fff;
}

.ss-checkout3 .child-select-btn.child-add-new-btn {
    background: #fff;
    border-style: dashed;
    color: #666;
}

.ss-checkout3 .child-select-btn.child-add-new-btn:hover {
    border-color: #28a745;
    color: #28a745;
}

.ss-checkout3 .child-select-btn.child-add-new-btn.selected {
    background: #28a745;
    border-color: #28a745;
    border-style: solid;
    color: #fff;
}

@media (max-width: 480px) {
    .ss-checkout3 .child-select-btn {
        flex: 0 1 calc(50% - 5px);
    }
}

/* Add-child form (logged-in members) */
.ss-checkout3 .add-child-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ss-checkout3 .add-child-form .form-control {
    flex: 1;
    min-width: 120px;
}

.ss-checkout3 .add-child-dob {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.ss-checkout3 .add-child-dob .form-control {
    flex: 1 1 0;
    min-width: 0;
}

.ss-checkout3 .btn-add-child {
    margin-top: 10px;
    padding: 12px 24px;
    background: #28a745;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-family: 'Muli', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ss-checkout3 .btn-add-child:hover {
    background: #218838;
}

.ss-checkout3 .btn-add-child:disabled {
    background: #ccc;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .ss-checkout3 .add-child-dob {
        flex-direction: column;
    }
    .ss-checkout3 .btn-add-child {
        width: 100%;
    }
}

/* Status + error messaging */
.ss-checkout3 .status-message {
    margin-top: 5px;
    font-size: 12px;
    min-height: 16px;
}

.ss-checkout3 .status-message.success {
    color: #28a745;
}

.ss-checkout3 .status-message.error {
    color: #dc3545;
}

/* Step-1 notice: a payment-setup failure hands the customer back here, so it has
   to read as more than the 12px field hints. */
.ss-checkout3 #checkout-notice {
    font-size: 14px;
    margin-top: 14px;
}

.ss-checkout3 .error-messages {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
}

.ss-checkout3 .btn-primary {
    background: #ff9900;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 14px 30px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: transform 0.1s ease, background 0.2s ease;
}

.ss-checkout3 .btn-primary:hover {
    background: #e68a00;
}

.ss-checkout3 .btn-primary:focus {
    outline: none;
    box-shadow: none;
}

.ss-checkout3 .btn-primary:active {
    outline: none;
    box-shadow: none;
    transform: scale(0.97);
}

.ss-checkout3 .btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Price note + terms (server-rendered copy, per selected program) */
.ss-checkout3 .ss3-price-note {
    margin-top: 8px;
    font-size: 14px;
    color: #161829;
}

.ss-checkout3 .ss3-empty {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

.ss-checkout3 .ss3-terms {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.ss-checkout3 .ss3-terms ul {
    margin: 0;
    padding-left: 18px;
}

.ss-checkout3 .ss3-terms li {
    margin-bottom: 8px;
}

.ss-checkout3 .ss3-payment-terms {
    margin: 30px 0 0;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.ss-checkout3 .ss3-payment-terms h4 {
    font-size: 16px;
    font-weight: 700;
    color: #161829;
    margin-bottom: 10px;
}

.ss-checkout3 .ss3-secure-note {
    font-size: 12px;
    color: #777;
    margin-top: 12px;
}

/* Payment section */
.ss-checkout3 #payment-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.ss-checkout3 #payment-summary h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #161829;
}

.ss-checkout3 #payment-summary p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.ss-checkout3 .ss3-summary-program {
    font-weight: 600;
    color: #161829;
}

.ss-checkout3 #payment-element {
    margin: 16px 0;
}

.ss-checkout3 #payment-loading {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
}

/* Express Checkout (Apple Pay / Google Pay) row — sits above #payment-element.
   Carries no margin of its own because Stripe renders nothing inside it when the
   browser has no wallet; the divider below supplies the spacing when it does. */
.ss-checkout3 #express-checkout-element {
    margin: 0;
}

/* "OR PAY WITH CARD" separator. Inline style="display:none" in checkout3.php
   keeps it hidden until checkout3.js confirms a wallet is actually available. */
.ss-checkout3 .wallet-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.ss-checkout3 .wallet-divider-line {
    flex: 1;
    height: 1px;
    background: #ddd;
}

.ss-checkout3 .wallet-divider-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #666;
}

@media (max-width: 767px) {
    .ss-checkout3 .checkout-container {
        margin: 20px 10px;
        padding: 0;
    }
    .ss-checkout3 .checkout-section {
        padding: 20px;
    }
    .ss-checkout3 .checkout-section h2 {
        font-size: 20px;
    }
}
