/**
 * Booking Flow CSS - Smooth Scroll Amazon-style
 * @package     Bornholm.Property
 * @since       0.2.36
 */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Booking Flow Container */
.booking-flow-container {
    width: 100%;
    background: #f9fafb;
    padding: 0;
    margin: 3rem 0;
}

/* Hide progress bar initially until booking starts */
.booking-progress-bar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease;
    display: none; /* Hidden until booking flow starts */
}

.booking-progress-bar.active {
    display: block;
}

.booking-progress-bar.is-sticky {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.step-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 3px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.step-dot::after {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
}

.progress-step.active .step-dot {
    background: #16a34a;
    border-color: #16a34a;
    transform: scale(1.1);
}

.progress-step.active .step-dot::after {
    background: white;
}

.progress-step.completed .step-dot {
    background: #16a34a;
    border-color: #16a34a;
}

.progress-step.completed .step-dot::after {
    content: '✓';
    background: transparent;
    color: white;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    width: auto;
    height: auto;
}

.step-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.progress-step.active .step-label {
    color: #16a34a;
    font-weight: 600;
}

.progress-step.completed .step-label {
    color: #16a34a;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 0.5rem;
    position: relative;
    top: -20px;
    min-width: 40px;
    transition: background-color 0.3s ease;
}

.progress-step.completed + .progress-line {
    background: #16a34a;
}

/* Booking Step Sections */
.booking-step-section {
    min-height: 60vh;
    padding: 3rem 0;
    scroll-margin-top: 100px;
}

.step-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .step-container {
        grid-template-columns: 2fr 1fr;
    }
}

.step-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.step-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.step-description {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 2rem 0;
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1rem 0;
}

/* Guests Selector */
.guests-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.guest-btn,
.extra-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: white;
    color: #111827;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guest-btn:hover:not(:disabled),
.extra-btn:hover:not(:disabled) {
    border-color: #16a34a;
    color: #16a34a;
    transform: scale(1.05);
}

.guest-btn:disabled,
.extra-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.guest-input,
.extra-input {
    width: 60px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    border: none;
    background: transparent;
}

.guests-label,
.extra-unit-label {
    font-size: 1rem;
    color: #6b7280;
}

/* Extras */
.extra-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.extra-info {
    flex: 1;
}

.extra-info label {
    font-weight: 600;
    color: #111827;
    display: block;
    margin-bottom: 0.25rem;
}

.extra-price-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.extra-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.extra-mandatory {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
}

.included-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #16a34a;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.extra-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: #16a34a;
}

/* Form Fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row .form-group.three-quarters {
        grid-column: span 1;
    }
    
    .form-row .form-group.quarter {
        grid-column: span 1;
    }
}

@media (min-width: 768px) {
    .form-row .form-group.three-quarters {
        grid-column: span 3;
    }
    
    .form-row .form-group.quarter {
        grid-column: span 1;
    }
    
    .form-row:has(.three-quarters) {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .form-row:has(.third) {
        grid-template-columns: repeat(3, 1fr);
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group label.required::after {
    content: ' *';
    color: #dc2626;
}

.form-control {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* Payment Section */
.payment-method-section {
    margin-bottom: 2rem;
}

.payment-box {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-box:hover {
    border-color: #16a34a;
}

.payment-box.selected {
    border-color: #16a34a;
    background: #f0fdf4;
}

.payment-box svg {
    flex-shrink: 0;
    color: #16a34a;
}

.payment-box strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #111827;
}

.payment-box p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* GDPR Section */
.gdpr-section {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.gdpr-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.gdpr-info {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1rem 0;
}

.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
}

.checkbox-label.required {
    font-weight: 500;
}

/* Final Summary */
.booking-summary-final {
    background: white;
    border-radius: 8px;
    padding: 0;
}

.summary-section {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

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

.summary-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #111827;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.summary-label {
    color: #6b7280;
    font-size: 0.875rem;
}

.summary-value {
    color: #111827;
    font-weight: 500;
}

.summary-row.summary-total {
    border-top: 2px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.summary-row.summary-total .summary-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.summary-row.summary-total .summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #16a34a;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: space-between;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: #16a34a;
    color: white;
}

.btn-primary:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(22, 163, 74, 0.2);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-success {
    background: #16a34a;
    color: white;
    font-size: 1.125rem;
    padding: 1rem 2rem;
}

.btn-success:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(22, 163, 74, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-next {
    margin-left: auto;
}

/* Price Widget Sticky (sidebar) */
.step-sidebar {
    position: relative;
}

.price-widget-sticky {
    position: sticky;
    top: 120px;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.price-widget-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #111827;
}

/* Stay Summary in Price Widget */
.stay-summary {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.stay-dates {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.stay-dates svg {
    color: #9ca3af;
}

.stay-info {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Price Breakdown */
.price-breakdown {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

.price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.price-line .label {
    color: #6b7280;
}

.price-line .amount {
    font-weight: 600;
    color: #111827;
}

.price-line.total {
    border-top: 2px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.price-line.total .label {
    font-weight: 600;
    color: #111827;
}

.price-line.total .amount {
    font-size: 1.25rem;
    color: #16a34a;
}

/* Deposit Info */
.deposit-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.deposit-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.deposit-line .label {
    color: #6b7280;
}

.deposit-line .amount {
    font-weight: 600;
    color: #111827;
}

.deposit-line.balance .amount {
    color: #16a34a;
}

/* Responsive */
@media (max-width: 640px) {
    .progress-steps {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 1rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .step-dot {
        width: 32px;
        height: 32px;
    }
    
    .progress-line {
        min-width: 20px;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .btn-next {
        margin-left: 0;
    }
}
