/* ================================================================
   Retreat Booking – Frontend Styles
   ================================================================ */

.rb-booking {
    max-width: 640px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
    position: relative;
}

/* Steps indicator */
.rb-steps {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}
.rb-step {
    flex: 1;
    padding: 10px 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #888;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s, color 0.2s;
}
.rb-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ccc;
    color: #fff;
    font-size: 11px;
    flex-shrink: 0;
}
.rb-step.active {
    color: #1a4a8a;
    background: #eef4ff;
    border-bottom: 2px solid #1a4a8a;
}
.rb-step.active span {
    background: #1a4a8a;
}
.rb-step.done {
    color: #1a7a3a;
    background: #f0faf3;
}
.rb-step.done span {
    background: #1a7a3a;
}

/* Panels */
.rb-panel {
    display: none;
}
.rb-panel.active {
    display: block;
}
.rb-panel h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 6px;
}
.rb-hint {
    color: #666;
    font-size: 14px;
    margin: 0 0 1.25rem;
}
.rb-notice {
    background: #fff8e0;
    border: 1px solid #f0d080;
    border-radius: 6px;
    padding: 14px 18px;
    font-size: 15px;
    color: #6b4f00;
}

/* Error banner */
.rb-error-banner {
    background: #fde8e8;
    border: 1px solid #f9a0a0;
    color: #8b0000;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 1rem;
    font-size: 14px;
}

/* Retreat options */
.rb-retreat-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.5rem;
}
.rb-retreat-radio-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    box-sizing: border-box;
    width: 100%;
}
.rb-retreat-radio-item:hover {
    border-color: #aac;
    background: #fafbff;
}
.rb-retreat-radio-item input[type="radio"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    margin-top: 1px;
    cursor: pointer;
    align-self: flex-start;
}
.rb-retreat-radio-item:has(input:checked) {
    border-color: #1a4a8a;
    background: #eef4ff;
}
.rb-retreat-radio-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rb-retreat-title {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    display: block;
}
.rb-retreat-meta {
    font-size: 12px;
    color: #888;
    display: block;
}
.rb-rooms-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}
.rb-retreat-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}
.rb-rooms-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.rb-room-chip {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    background: #e8f0fe;
    color: #1a4a8a;
    font-weight: 500;
}
.rb-room-chip.full {
    background: #f0f0f0;
    color: #999;
}

/* Form grid */
.rb-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 1.5rem;
}
.rb-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.rb-field-full {
    grid-column: 1 / -1;
}
.rb-field label {
    font-size: 13px;
    font-weight: 500;
    color: #444;
}
.rb-field label abbr {
    text-decoration: none;
    color: #c00;
    margin-left: 2px;
}
.rb-field input,
.rb-field select,
.rb-field textarea {
    padding: 9px 11px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}
.rb-field input:focus,
.rb-field select:focus,
.rb-field textarea:focus {
    border-color: #1a4a8a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,74,138,0.12);
}
.rb-field textarea {
    resize: vertical;
    font-family: inherit;
    line-height: 1.45;
}
.rb-field input.error {
    border-color: #c00;
}

/* Person rows (step 3) */
.rb-person-row {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.rb-person-row h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #444;
}
.rb-person-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.rb-person-room {
    grid-column: 1 / -1;
}
.rb-room-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.rb-room-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    box-sizing: border-box;
    width: 100%;
}
.rb-room-label:hover {
    border-color: #aac;
    background: #fafbff;
}
.rb-room-label input[type="radio"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}
.rb-room-label.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.rb-room-label-text {
    flex: 1;
    min-width: 0;
}
.rb-room-label-text strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}
.rb-room-label-text small {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    white-space: nowrap;
}
.rb-room-price {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 15px;
    color: #1a4a8a;
    margin-left: auto;
    padding-left: 10px;
    white-space: nowrap;
}
input[type="radio"]:checked + .rb-room-label,
.rb-room-label:has(input:checked) {
    border-color: #1a4a8a;
    background: #eef4ff;
}

/* Summary */
#rb-summary {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.rb-summary-header {
    background: #f5f7fa;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
}
.rb-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.rb-summary-row:last-child {
    border-bottom: none;
}
.rb-summary-label {
    color: #444;
}
.rb-summary-sub {
    font-size: 12px;
    color: #888;
}
.rb-summary-amount {
    font-weight: 600;
    color: #1a1a1a;
}
.rb-summary-total {
    background: #f5f7fa;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 16px;
}
.rb-summary-total .rb-summary-amount {
    color: #1a4a8a;
}

/* Stripe note */
.rb-stripe-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #888;
    margin-bottom: 1.25rem;
}

/* Buttons */
.rb-btn {
    padding: 11px 22px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.15s, transform 0.1s;
}
.rb-btn:active {
    transform: scale(0.98);
}
.rb-btn-primary {
    background: #1a4a8a;
    color: #fff;
    border-color: #1a4a8a;
    animation: rb-pulse 2s ease-in-out infinite;
}
.rb-btn-primary:hover {
    background: #153a6e;
    animation: none;
}
.rb-btn-primary:disabled {
    background: #9ab0cc;
    border-color: #9ab0cc;
    cursor: not-allowed;
    animation: none;
}
@keyframes rb-pulse {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(26,74,138,0.5); }
    50%  { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(26,74,138,0); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(26,74,138,0); }
}
.rb-btn-secondary {
    background: #fff;
    color: #444;
    border-color: #ccc;
}
.rb-btn-secondary:hover {
    background: #f5f5f5;
}
.rb-btn-pay {
    background: #635bff;
    color: #fff;
    border-color: #635bff;
    padding: 13px 28px;
    font-size: 16px;
}
.rb-btn-pay:hover {
    background: #4f49d8;
}
.rb-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Spinner */
#rb-spinner {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
}
.rb-spinner-inner {
    text-align: center;
    color: #444;
}
.rb-spin {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #1a4a8a;
    border-radius: 50%;
    animation: rb-spin 0.7s linear infinite;
    margin: 0 auto 12px;
}
@keyframes rb-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 520px) {
    .rb-form-grid,
    .rb-person-grid {
        grid-template-columns: 1fr;
    }
    .rb-steps {
        font-size: 10px;
    }
    .rb-step {
        flex-direction: column;
        gap: 3px;
        padding: 8px 4px;
    }
}
