/* WooCommerce Booking Search Bar - Mobile Optimized Version */

/* Container & Wrapper */

.booking-field-hint {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    text-align: center;
}

/* Alert Banner Styles - UPDATED WITH HIGHER Z-INDEX */
.booking-alert-banner {
    position: fixed;
    top: 100px; /* Adjust this if your header is taller/shorter */
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999 !important; /* Much higher z-index to go above header */
    max-width: 600px;
    width: 90%;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.booking-alert-content {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(255, 82, 82, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    top: 35vh;
}

.booking-alert-icon {
    width: 32px;
    height: 32px;
    stroke-width: 2.5;
    flex-shrink: 0;
}

.booking-alert-text {
    flex: 1;
}

.booking-alert-text h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.booking-alert-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.95;
}

.booking-whatsapp-button {
    background: #25d366!important;
    color: #ffffff!important;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.booking-whatsapp-button svg {
    width: 20px;
    height: 20px;
}

.booking-whatsapp-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.booking-alert-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.booking-alert-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.booking-search-container {
    width: 100%;
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 24px;
}

.booking-search-wrapper {
    border-radius: 12px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 20px 40px -10px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    padding: 16px 24px;
    position: relative;
    overflow: hidden;
}

/* Subtle background decoration */
.booking-search-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(248, 152, 49, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.booking-search-wrapper > * {
    position: relative;
    z-index: 1;
}

/* Title & Subtitle */
.booking-search-title {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    text-align: left;
    letter-spacing: -0.02em;
}

.booking-search-subtitle {
    color: #ffffff;
    font-size: 18px;
    margin: 0 0 40px 0;
    text-align: left;
    font-weight: 400;
}

/* Form Layout */
.booking-search-form {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.booking-search-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 24px;
}

/* Field Styling */
.booking-field {
    display: flex;
    flex-direction: column;
}

.booking-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Input Wrapper */
.booking-input-wrapper {
    position: relative;
}

.booking-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9CA3AF;
    stroke-width: 2;
    transition: color 0.2s;
    z-index: 1;
}

/* Input Fields */
.booking-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    background: #fff;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.booking-input::placeholder {
    color: #9CA3AF;
    font-weight: 400;
}

.booking-input:hover {
    border-color: #D1D5DB;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.booking-input:focus {
    border-color: #2d94c5;
    box-shadow: 
        0 0 0 4px rgba(45, 148, 197, 0.1),
        0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.booking-input:focus + .booking-icon,
.booking-input-wrapper:hover .booking-icon {
    color: #2d94c5;
}

/* Remove number input spinners */
.booking-input[type="number"] {
    -moz-appearance: textfield;
}

.booking-input[type="number"]::-webkit-inner-spin-button,
.booking-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Date input styling */
.booking-input[type="date"] {
    cursor: pointer;
}

.booking-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.booking-input[type="date"]:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

/* Field Hints */
.booking-field-hint {
    display: block;
    font-size: 11px;
    color: #6B7280;
    margin-top: 6px;
    font-weight: 400;
    font-style: italic;
}

/* Suggestions Dropdown */
.booking-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    margin-top: 0;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 100;
    display: none;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.booking-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s;
    border-bottom: 1px solid #F3F4F6;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: linear-gradient(to right, #edf9ff, #ffffff);
    padding-left: 20px;
}

.suggestion-item:active {
    background: #FEF3C7;
}

.suggestion-icon {
    width: 18px;
    height: 18px;
    color: #2d94c5;
    margin-right: 12px;
    flex-shrink: 0;
    stroke-width: 2;
}

/* Search Button */
.booking-button-field {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.booking-search-button {
    width: 100%;
    background: linear-gradient(135deg, #2d94c5 0%, #2d94c5 100%);
    border: none !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 16px;
    padding: 16px 32px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 6px -1px rgba(45, 148, 197, 0.3),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.booking-search-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.booking-search-button:hover::before {
    left: 100%;
}

.booking-search-button:hover {
    background: linear-gradient(135deg, #2680ad 0%, #2680ad 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 20px -5px rgba(45, 148, 197, 0.4),
        0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

.booking-search-button:active {
    transform: translateY(0);
    box-shadow: 
        0 4px 6px -1px rgba(45, 148, 197, 0.3),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.booking-search-button svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
    vertical-align: middle;
}

/* Features */
.booking-features {
    font-size: 18px;
    color: #ffffff;
    margin: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.booking-features::before {
    content: '';
    flex: 0 0 60px;
    height: 1px;
    background: linear-gradient(to right, transparent, #E5E7EB, transparent);
}

.booking-features::after {
    content: '';
    flex: 0 0 60px;
    height: 1px;
    background: linear-gradient(to right, transparent, #E5E7EB, transparent);
}

/* ========================================
   MOBILE OPTIMIZATIONS - TABLET
   ======================================== */
@media (max-width: 1200px) {
    .booking-search-container {
        max-width: 1000px;
    }
    
    .booking-search-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .booking-button-field {
        grid-column: span 3;
    }
}

@media (max-width: 900px) {
    .booking-search-wrapper {
        padding: 32px 24px;
    }
    
    .booking-search-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .booking-button-field {
        grid-column: span 2;
    }
    
    .booking-search-title {
        font-size: 28px;
    }
}

/* ========================================
   MOBILE OPTIMIZATIONS - PHONES
   ======================================== */
@media (max-width: 640px) {
    .booking-search-container {
        margin: 20px auto;
        padding: 0 16px;
    }
    
    .booking-search-wrapper {
        padding: 24px 20px;
        border-radius: 16px;
    }
    
    .booking-search-title {
        font-size: 24px;
        margin-bottom: 6px;
    }
    
    .booking-search-subtitle {
        font-size: 14px;
        margin-bottom: 28px;
    }
    
    .booking-search-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 20px;
    }
    
    .booking-button-field {
        grid-column: span 1;
        margin-top: 8px;
    }
    
    .booking-field label {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .booking-input {
        padding: 13px 16px 13px 44px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        border-radius: 10px;
    }
    
    .booking-icon {
        left: 14px;
        width: 18px;
        height: 18px;
    }
    
    .booking-search-button {
        padding: 15px 24px;
        font-size: 15px;
        border-radius: 10px;
    }
    
    .booking-search-button svg {
        width: 20px;
        height: 20px;
    }
    
    .booking-features {
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
        margin-top: 4px;
    }
    
    .booking-features::before,
    .booking-features::after {
        display: none;
    }
    
    .booking-field-hint {
        font-size: 10px;
        margin-top: 4px;
    }
    
    /* Suggestions on mobile */
    .booking-suggestions {
        max-height: 240px;
        border-radius: 10px;
    }
    
    .suggestion-item {
        padding: 12px 14px;
    }
    
    .suggestion-item:hover {
        padding-left: 14px; /* Remove shift on mobile */
    }
    
    .suggestion-icon {
        width: 16px;
        height: 16px;
        margin-right: 10px;
    }
       .booking-alert-banner {
        top: 80px; /* Less space on mobile */
        width: 95%;
    }
    
    .booking-alert-content {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }
    
    .booking-alert-icon {
        width: 28px;
        height: 28px;
    }
    
    .booking-alert-text h3 {
        font-size: 16px;
    }
    
    .booking-alert-text p {
        font-size: 13px;
    }
    
    .booking-whatsapp-button {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   MOBILE OPTIMIZATIONS - SMALL PHONES
   ======================================== */
@media (max-width: 480px) {
    .booking-search-container {
        margin: 16px auto;
        padding: 0 12px;
    }
    
    .booking-search-wrapper {
        padding: 20px 16px;
    }
    
    .booking-search-title {
        font-size: 22px;
    }
    
    .booking-search-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }
    
    .booking-search-grid {
        gap: 14px;
    }
    
    .booking-input {
        padding: 12px 14px 12px 42px;
        font-size: 16px;
    }
    
    .booking-icon {
        left: 12px;
    }
    
    .booking-search-button {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .booking-field label {
        font-size: 11px;
    }
}

/* ========================================
   EXTRA SMALL DEVICES
   ======================================== */
@media (max-width: 360px) {
    .booking-search-container {
        padding: 0 10px;
    }
    
    .booking-search-wrapper {
        padding: 16px 12px;
    }
    
    .booking-search-title {
        font-size: 20px;
    }
    
    .booking-search-subtitle {
        font-size: 12px;
    }
    
    .booking-input {
        padding: 11px 12px 11px 38px;
        font-size: 15px;
    }
    
    .booking-icon {
        left: 10px;
        width: 16px;
        height: 16px;
    }
    
    .booking-search-button {
        padding: 13px 18px;
        font-size: 13px;
    }
}

/* ========================================
   TOUCH DEVICE OPTIMIZATIONS
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .booking-input {
        min-height: 48px;
    }
    
    .booking-search-button {
        min-height: 50px;
    }
    
    /* Remove hover effects on touch devices */
    .booking-input:hover {
        border-color: #E5E7EB;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }
    
    .suggestion-item:hover {
        background: white;
        padding-left: 16px;
    }
    
    /* Active states for better feedback */
    .booking-input:active {
        border-color: #2d94c5;
    }
    
    .suggestion-item:active {
        background: #F3F4F6;
    }
}

/* ========================================
   LANDSCAPE MODE ON MOBILE
   ======================================== */
@media (max-width: 900px) and (orientation: landscape) {
    .booking-search-container {
        margin: 12px auto;
    }
    
    .booking-search-wrapper {
        padding: 16px 20px;
    }
    
    .booking-search-title {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .booking-search-subtitle {
        font-size: 12px;
        margin-bottom: 16px;
    }
    
    .booking-search-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .booking-field label {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .booking-input {
        padding: 10px 14px 10px 38px;
        font-size: 14px;
    }
    
    .booking-search-button {
        padding: 11px 20px;
        font-size: 13px;
    }
    
    .booking-features {
        font-size: 11px;
        margin-top: 8px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .booking-search-button::before {
        display: none;
    }
}

/* Focus styles for keyboard navigation */
.booking-input:focus-visible {
    outline: 3px solid #2d94c5;
    outline-offset: 2px;
}

.booking-search-button:focus-visible {
    outline: 3px solid #2d94c5;
    outline-offset: 4px;
}

.suggestion-item:focus {
    outline: 2px solid #2d94c5;
    outline-offset: -2px;
}

/* Loading state */
.booking-search-button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.booking-search-button[disabled]:hover {
    transform: none !important;
    box-shadow: 
        0 4px 6px -1px rgba(45, 148, 197, 0.3),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Custom scrollbar for suggestions */
.booking-suggestions::-webkit-scrollbar {
    width: 8px;
}

.booking-suggestions::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 0 12px 12px 0;
}

.booking-suggestions::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}

.booking-suggestions::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .booking-search-wrapper {
        box-shadow: none;
        border: 1px solid #E5E7EB;
    }
    
    .booking-search-wrapper::before {
        display: none;
    }
    
    .booking-search-button,
    .booking-features {
        display: none;
    }
}

/* ========================================
   HIGH CONTRAST MODE
   ======================================== */
@media (prefers-contrast: high) {
    .booking-input {
        border-width: 3px;
    }
    
    .booking-search-button {
        border: 2px solid #000;
    }
    
    .suggestion-item {
        border-bottom: 2px solid #000;
    }
}


