/* 
   BOOKING SPACES - PREMIUM GOLF DESIGN
   Version: 1.2.0 (High-End Aesthetics)
*/

:root {
    --primary: #065f46;
    --primary-hover: #047857;
    --primary-soft: #ecfdf5;
    --accent: #10b981;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-body: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
}

/* 1. LAYOUT & TEMPLATE */
.booking-space-layout {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 20px 0;
}

.booking-space-info {
    flex: 1;
    min-width: 320px;
}

.booking-space-sidebar {
    min-width: 500px;
}

.sticky-sidebar {
    position: sticky;
    top: 30px;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.booking-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.booking-gallery img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.booking-gallery img:hover {
    transform: scale(1.05);
}

.booking-content {
    margin-top: 40px;
    line-height: 1.8;
    color: var(--text-main);
    font-size: 1.05rem;
}

/* 2. FORM CONTAINER */
.booking-form-container {
    box-sizing: border-box;
    background: #ffffff;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    width: 100%;
    margin: 20px 0;
    box-shadow: var(--shadow-lg);
}

.booking-form-container h3 {
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.025em;
}

/* 3. FORM ELEMENTS */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background: var(--bg-body);
    color: var(--text-main);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(6, 95, 70, 0.1);
}

/* 4. NOTICES */
.booking-notice {
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    display: none;
    border: 1px solid transparent;
}

.booking-notice.error {
    background: #fff1f2;
    color: #9f1239;
    border-color: #fecdd3;
}

.booking-notice.success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

/* 5. TARIFF CARDS */
.tariff-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.tariff-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 18px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tariff-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tariff-card.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-lg);
}

.tariff-card .tariff-label {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-main);
}

.tariff-card .tariff-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

.tariff-card.selected .tariff-label,
.tariff-card.selected .tariff-price {
    color: #ffffff;
}

/* 6. EQUIPMENT ITEMS */
.equip-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.equip-item:hover {
    border-color: var(--primary-light);
    background: var(--bg-body);
}

.equip-item:has(.equip-checkbox:checked) {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.equip-checkbox {
    width: 22px !important;
    height: 22px !important;
    accent-color: var(--primary);
    cursor: pointer;
}

.equip-title {
    flex-grow: 1;
    font-weight: 600;
    color: var(--text-main);
}

.equip-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.equip-qty {
    width: 70px !important;
    padding: 8px !important;
    border-radius: 10px !important;
    border: 2px solid var(--border-color) !important;
    text-align: center;
    font-weight: 700 !important;
}

/* 7. PRICE SUMMARY (RECEIPT STYLE) */
#price-preview {
    background: var(--bg-body);
    border-radius: 20px;
    padding: 25px;
    margin: 30px 0;
    border: 2px dashed var(--border-color);
}

#price-preview .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

#price-preview .total-row {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#price-preview .total-row span {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
}

#price-preview .total-row strong {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 900;
}

/* 8. BUTTONS */
.button-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    padding: 18px 30px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 800;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 95, 70, 0.3);
}

.button-primary:active {
    transform: translateY(0);
}

.button-secondary {
    background: #ffffff !important;
    color: var(--primary) !important;
    padding: 14px 25px;
    border: 2px solid var(--primary) !important;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 1;
    visibility: visible;
}

.button-secondary:hover {
    background: var(--primary-soft) !important;
    color: var(--primary-hover) !important;
}

/* 9. FLATPICKR PREMIUM */
.flatpickr-day.flatpickr-disabled {
    background: #fff1f2 !important;
    color: #f43f5e !important;
    opacity: 0.5;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: var(--shadow-md);
}

.flatpickr-day.selected-range {
    background: var(--primary-soft) !important;
    color: var(--primary) !important;
}

/* 10. STATUS TAGS */
.status-confirmed {
    background: #dcfce7;
    color: #166534;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.status-pending {
    background: #fef9c3;
    color: #854d0e;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* 11. MULTI-STEP FORM STYLES */
.booking-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 10px;
}

.booking-stepper::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: var(--border-color);
    z-index: 1;
}

.step-dot {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step-dot.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 0 5px var(--primary-soft);
}

.step-dot.completed {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.step-dot::after {
    content: attr(data-title);
    position: absolute;
    top: 50px;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.step-dot.active::after {
    color: var(--primary);
}

.booking-step {
    display: none;
    animation: fadeInStep 0.4s ease forwards;
}

.booking-step.active {
    display: block;
}

@keyframes fadeInStep {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.step-actions button {
    flex: 1;
    min-width: 0;
}

/* Recap list for step 4 */
.booking-recap-list {
    background: var(--bg-body);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
}

.recap-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.recap-item:last-child {
    border-bottom: none;
}

.recap-label {
    font-weight: 600;
    color: var(--text-muted);
}

.recap-value {
    font-weight: 700;
    color: var(--text-main);
    text-align: right;
}

/* 12. SPINNER & LOADING */
.booking-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#availability-loader {
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-body);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* 13. NOTICES & UTILS */
.booking-notice {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: none;
    font-weight: 600;
}

.booking-notice.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
}

.booking-notice.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #dcfce7;
}

.flatpickr-day.selected-range {
    background: var(--primary) !important;
    color: #fff !important;
}