/**
 * Request2Book Public Stylesheet (WCAG AA Compliant)
 */
.r2b-form-wrapper,
.r2b-wrapper {
    max-width: 680px;
    margin: 32px auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    font-family: inherit;
    color: #1e293b;
    line-height: 1.5;
}

.r2b-form-title {
    margin-top: 0;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

.r2b-form-subtitle, .r2b-subtext {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 24px;
}

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

.r2b-form-row {
    display: flex;
    gap: 16px;
}

.r2b-col {
    flex: 1;
}

.r2b-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #334155;
}

.r2b-input,
.r2b-textarea,
.r2b-file-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #1e293b;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.r2b-input:focus,
.r2b-textarea:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.r2b-required {
    color: #dc2626;
    font-weight: 700;
    margin-left: 2px;
}

.r2b-input.r2b-input-error,
.r2b-textarea.r2b-input-error,
.r2b-select.r2b-input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.r2b-field-error {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
    line-height: 1.3;
    animation: r2bErrorSlideIn 0.2s ease-out;
}

@keyframes r2bErrorSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.r2b-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 24px;
    color: #991b1b;
}

.r2b-alert-error .r2b-alert-title {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 700;
    color: #b91c1c;
}

.r2b-alert-error ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.5;
}

.r2b-alert-error li {
    margin-bottom: 2px;
}

.r2b-hint {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.r2b-checkbox-group {
    margin-top: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
}

.r2b-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
}

.r2b-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
}

/* Buttons */
.r2b-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
}

.r2b-btn-primary {
    background-color: #2563eb;
    color: #ffffff !important;
}

.r2b-btn-primary:hover, .r2b-btn-primary:focus {
    background-color: #1d4ed8;
}

.r2b-btn-success {
    background-color: #16a34a;
    color: #ffffff !important;
}

.r2b-btn-success:hover, .r2b-btn-success:focus {
    background-color: #15803d;
}

.r2b-btn-outline-danger {
    background: transparent;
    border-color: #dc2626;
    color: #dc2626 !important;
}

.r2b-btn-outline-danger:hover, .r2b-btn-outline-danger:focus {
    background: #fee2e2;
}

.r2b-btn-outline {
    background: transparent;
    border-color: #cbd5e1;
    color: #475569;
}

.r2b-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.r2b-buttons-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* Callouts & Cards */
.r2b-notice-callout {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 24px;
    font-size: 14px;
    color: #1e40af;
}

.r2b-review-grid {
    display: grid;
    gap: 20px;
}

.r2b-card-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
}

.r2b-card-section h3 {
    margin-top: 0;
    font-size: 16px;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.r2b-list-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.r2b-list-details li {
    padding: 6px 0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.r2b-price {
    font-weight: 700;
    color: #15803d;
}

.r2b-provider-msg, .r2b-terms-box {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
}

.r2b-success-icon {
    font-size: 48px;
    color: #16a34a;
    text-align: center;
    margin-bottom: 12px;
}

.r2b-confirmed-card {
    text-align: center;
}

.r2b-booking-summary {
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
}

.r2b-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.r2b-summary-row:last-child {
    border-bottom: none;
}

/* Badges */
.r2b-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.r2b-status-new { background: #dbeafe; color: #1e40af; }
.r2b-status-under_review { background: #e0e7ff; color: #3730a3; }
.r2b-status-awaiting_customer { background: #fef3c7; color: #92400e; }
.r2b-status-confirmed { background: #dcfce7; color: #166534; }
.r2b-status-completed { background: #f1f5f9; color: #334155; }
.r2b-status-declined, .r2b-status-rejected { background: #fee2e2; color: #991b1b; }

@media (max-width: 600px) {
    .r2b-form-row {
        flex-direction: column;
        gap: 0;
    }
    .r2b-buttons-row {
        flex-direction: column;
    }
    .r2b-btn {
        width: 100%;
    }
}

/* Luxury Guest Portal Enhancements */
.r2b-ref-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: all;
}
.r2b-ref-pill:hover {
    background: #ffffff;
    border-color: #2563eb;
    color: #2563eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}
.r2b-dossier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.r2b-info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.r2b-info-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
}
.r2b-info-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 6px;
}
.r2b-info-val {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
}
.r2b-spotlight-card {
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.15);
    position: relative;
}
.r2b-quote-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.r2b-quote-table th {
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 16px;
    text-align: left;
}
.r2b-quote-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #1e293b;
}
.r2b-messenger-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    margin-top: 32px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.r2b-thread-stream {
    max-height: 320px;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.r2b-msg-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    max-width: 80%;
}
.r2b-msg-row.r2b-msg-customer {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.r2b-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.r2b-msg-avatar.provider-avatar {
    background: #e0e7ff;
    color: #4338ca;
}
.r2b-msg-avatar.customer-avatar {
    background: #dbeafe;
    color: #1d4ed8;
}
.r2b-msg-bubble {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.r2b-msg-row.r2b-msg-provider .r2b-msg-bubble {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 2px;
}
.r2b-msg-row.r2b-msg-customer .r2b-msg-bubble {
    background: #2563eb;
    color: #ffffff;
    border-bottom-right-radius: 2px;
}
.r2b-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin: 28px 0 36px 0;
    padding: 0 10px;
}
.r2b-stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
}
.r2b-step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}
.r2b-step-bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 4px #ffffff;
}
.r2b-step-item.is-completed .r2b-step-bubble {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}
.r2b-step-item.is-active .r2b-step-bubble {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 0 0 4px #ffffff, 0 0 0 7px rgba(37, 99, 235, 0.25);
}
.r2b-step-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-top: 8px;
    line-height: 1.3;
    max-width: 100px;
}
.r2b-step-item.is-active .r2b-step-title {
    color: #0f172a;
    font-weight: 700;
}
.r2b-step-item.is-completed .r2b-step-title {
    color: #334155;
}
@media (max-width: 640px) {
    .r2b-stepper { display: none !important; }
}
