/* Checkout3 Styles */
.checkout-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Muli', sans-serif;
}

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

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

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

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

/* Red asterisk for required fields */
.form-group label::after {
    content: '';
}

.required-asterisk {
    color: #FC030C;
    font-weight: bold;
}

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

.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;
}

.child-select-btn:hover {
    background: #fff;
    border-color: #FC030C;
    color: #FC030C;
}

.child-select-btn.selected {
    background: #FC030C;
    border-color: #FC030C;
    color: #fff;
}

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

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

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

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

/* Add Child Form */
.add-child-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

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

.btn-add-child {
    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;
}

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

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

@media (max-width: 480px) {
    .add-child-form {
        flex-direction: column;
    }
    .add-child-form .form-control,
    .btn-add-child {
        width: 100%;
    }
}

.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;
}

.form-control select,
select.form-control {
    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;
}

/* Gray placeholder for select */
select.form-control:invalid,
select.form-control option[value=""] {
    color: #999;
}

select.form-control option:not([value=""]) {
    color: #161829;
}

.form-control option {
    padding: 0;
    margin: 0;
    line-height: normal;
}

.form-control:hover {
    border-color: #FC030C;
}

.form-control:focus {
    outline: none;
    border-color: #FC030C;
    box-shadow: 0 0 0 3px rgba(252, 3, 12, 0.1);
}

.form-control option {
    padding: 10px;
    font-size: 15px;
}

/* Status messages (used for dynamic feedback) */
.status-message {
    margin-top: 5px;
    font-size: 12px;
}

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

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

.btn-link {
    background: none;
    border: none;
    color: #FC030C;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin-top: 10px;
}

.btn-link:hover {
    color: #d0021b;
}

.btn-primary {
    background: #FC030C;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 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;
}

.btn-primary:hover {
    background: #d0021b;
}

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

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

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

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

#payment-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

#payment-summary h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

#payment-summary p {
    margin: 5px 0;
    font-size: 14px;
}

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

#payment-form {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#link-authentication-element {
    margin-bottom: 20px;
    min-height: 50px;
}

#payment-loading {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Multi-program selection styles (checkbox mode for camps) */
.program-selection-list {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    background: #fff;
}

.program-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #161829;
    margin: 15px 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.program-section-title:first-child {
    margin-top: 0;
}

.program-checkbox-item {
    padding: 12px 15px;
    margin: 8px 0;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.program-checkbox-item:hover {
    border-color: #FC030C;
    background-color: #fff5f5;
}

.program-checkbox-item label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
    font-size: 14px;
    color: #161829;
    line-height: 1.4;
}

.program-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    cursor: pointer;
    accent-color: #FC030C;
    margin-top: 2px;
}

.program-checkbox-item.selected,
.program-checkbox-item:has(input:checked) {
    border-color: #FC030C;
    background-color: #fff0f0;
}

.program-checkbox-item .program-name {
    font-weight: 600;
}

.program-checkbox-item .program-date {
    color: #666;
    font-size: 13px;
}

.program-checkbox-item .program-price {
    color: #FC030C;
    font-weight: 700;
    margin-left: auto;
    white-space: nowrap;
}

.selected-total {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected-total .total-label {
    color: #161829;
}

.selected-total .total-amount {
    color: #FC030C;
    font-size: 20px;
}

.selected-count {
    font-size: 13px;
    color: #666;
    font-weight: normal;
    margin-left: 10px;
}

/* Program Tabs (for camps) */
.program-tabs {
    margin-top: 10px;
}

.program-tabs-nav {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 0;
}

.program-tab-btn {
    flex: 1;
    padding: 14px 20px;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-family: 'Muli', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 4px;
}

.program-tab-btn:last-child {
    margin-right: 0;
}

.program-tab-btn:hover {
    background: #fff;
    color: #161829;
}

.program-tab-btn.active {
    background: #fff;
    color: #FC030C;
    border-color: #FC030C;
    border-bottom-color: #fff;
    position: relative;
    z-index: 1;
    margin-bottom: -2px;
}

.program-tabs .program-selection-list {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
    border-color: #ddd;
}

.program-tab-content {
    display: none;
}

.program-tab-content.active {
    display: block;
}

/* Trust elements responsive */
@media (max-width: 767px) {
    .checkout-container {
        margin: 20px;
        padding: 10px;
    }
    
    .checkout-section {
        padding: 20px;
    }
    
    .checkout-section h2 {
        font-size: 20px;
    }
    
    /* Stack trust elements on mobile */
    #payment-form > div[style*="display: flex"] {
        flex-direction: column !important;
    }
    
    #payment-form > div[style*="display: flex"] > div {
        min-width: 100% !important;
        margin-bottom: 15px;
    }
}

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

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

/* Guest child buttons container */
#guest-child-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#guest-child-buttons .child-select-btn {
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 10px 16px;
    font-family: 'Muli', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

#guest-child-buttons .child-select-btn:hover {
    border-color: #FC030C;
    background: #fff;
}

#guest-child-buttons .child-select-btn.selected {
    border-color: #FC030C;
    background: #fff0f0;
    color: #FC030C;
}

#guest-child-buttons .child-add-new-btn {
    background: transparent;
    border: 2px dashed #FC030C;
    color: #FC030C;
}

#guest-child-buttons .child-add-new-btn:hover {
    background: #fff0f0;
}

#guest-child-buttons .child-add-new-btn.selected {
    background: #fff0f0;
    border-style: solid;
}
