/* Modern Booking Form Styles */
#tbp-form-wrapper,
#tbp-form-wrapper.tbp-modern {
    background: #fff;
    padding: 12px 24px 24px 24px;
    border-radius: 18px;
    color: #22223b;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    /*max-width: 460px;*/
    margin: 32px auto;
    box-shadow: 0 8px 32px rgba(34,34,59,0.10), 0 1.5px 6px rgba(34,34,59,0.06);
    border: none;
    width: 100%;
    max-width: 460px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.tbp-form-title {
    /*margin: 0 0 20px 0;*/
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: #22223b;
    letter-spacing: 0.01em;
}

#tbp-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    min-height: auto;
    flex-shrink: 0;
}

.tbp-field {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0;
}

.tbp-icon-field {
    flex-direction: row;
    align-items: center;
    background: #f7f7fa;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(34,34,59,0.03);
    padding: 0 10px;
    margin-bottom: 0;
    border: 1.5px solid #f0f0f5;
    min-height: 64px;
    position: relative;
    gap: 12px;
}

.tbp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    color: #8B8B8B;
    opacity: 0.85;
}

/* Location button styling */
.tbp-location-btn {
    background: transparent !important;
    border: none !important;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 8px;
    min-width: 36px;
    height: 36px;
    outline: none;
}



.tbp-location-btn:active {
    transform: scale(0.95);
    background: rgba(63, 25, 130, 0.12);
}

.tbp-location-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.tbp-location-btn.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.tbp-input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tbp-input-group label {
    font-size: 0.98rem;
    font-weight: 500;
    color: #8B8B8B;
    margin-top: 5px;
    letter-spacing: 0.01em;
}

.tbp-icon-field input,
.tbp-icon-field select {
    background: transparent;
    border: none !important;
    outline: none;
    font-size: 1.08rem;
    color: #22223b;
    padding: 0rem 0rem !important;
    margin: 0;
    height: 40px;
    font-family: inherit;
    box-shadow: none;
    border-radius: 0;
    width: 100%;
    text-align: left;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.tbp-icon-field input::placeholder {
    color: #bdbdbd;
    opacity: 1;
    font-size: 1.02rem;
}

.tbp-icon-field select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    font-size: 1.08rem;
    color: #22223b;
    padding-right: 24px;
}

.tbp-icon-field select:focus {
    outline: none;
}

.tbp-icon-field input:focus,
.tbp-icon-field select:focus {
    background: #f0f0f5;
}

.tbp-submit {
    margin-top: 10px;
    width: 100%;
    align-self: stretch;
}

.tbp-gradient-btn {
    width: 100%;
    background: linear-gradient(90deg, #21084b 0%, #3F1982 100%);
    color: #fff !important;
    padding: 16px 0 !important;
    border: none !important;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.18rem;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(255,95,109,0.08);
    transition: background 0.2s, transform 0.1s;
}
.tbp-gradient-btn:hover {
    background: linear-gradient(90deg, #3F1982 0%, #6B34C9 100%);
    transform: translateY(-1px) scale(1.01);
}
.tbp-gradient-btn:active {
    transform: scale(0.99);
}

.tbp-note {
    font-size: 0.98rem;
    margin-top: 18px;
    color: #bdbdbd;
    text-align: center;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.hidden {
    display: none !important;
}


/* Flatpickr customization */
.flatpickr-calendar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 24px -3px rgba(34,34,59,0.10);
}
.flatpickr-day.selected {
    background: #ff5f6d;
    border-color: #ff5f6d;
}
.flatpickr-day.selected:hover {
    background: #ff9966;
}

/* Google Places Autocomplete styling */
.pac-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 24px -3px rgba(34,34,59,0.10);
    font-family: inherit;
}
.pac-item {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f5;
    cursor: pointer;
}
.pac-item:hover {
    background: #f7f7fa;
}
.pac-item-selected {
    background: #ff5f6d;
    color: white;
}

/* Responsive design */
@media (max-width: 600px) {
    #tbp-form-wrapper,
    #tbp-form-wrapper.tbp-modern {
        padding: 12px 8px 16px 8px;
        max-width: 100%;
        margin: 16px auto;
        border-radius: 12px;
    }
    
    #tbp-form {
        width: 100%;
        gap: 16px;
    }
    
    .tbp-form-title {
        font-size: 1.3rem;
        margin-bottom: 16px;
    }
    
    .tbp-icon-field {
        min-height: 72px;
        padding: 0 12px;
        border-radius: 10px;
    }
    
    .tbp-icon {
        min-width: 28px;
    }
    
    .tbp-input-group label {
        font-size: 0.9rem;
        margin-top: 4px;
    }
    
    .tbp-icon-field input,
    .tbp-icon-field select {
        font-size: 16px; /* Prevents zoom on iOS */
        height: 44px;
        padding: 0;
    }
    
    .tbp-gradient-btn {
        padding: 16px 0;
        font-size: 1.1rem;
        border-radius: 8px;
        min-height: 52px;
    }
    
    /* Mobile validation error styling */
    .time-error-message {
        font-size: 13px !important;
        padding: 12px 16px !important;
        margin: 12px 0 !important;
        border-radius: 8px !important;
        box-shadow: 0 3px 6px rgba(231, 76, 60, 0.15) !important;
        line-height: 1.4 !important;
    }
    
    /* Mobile input validation styling */
    .tbp-icon-field input[style*="border-color: #e74c3c"] {
        border: 2px solid #e74c3c !important;
        background: rgba(231, 76, 60, 0.05) !important;
        box-shadow: 0 0 0 1px rgba(231, 76, 60, 0.2) !important;
    }
    
    /* iPhone/iOS specific fixes for date and time inputs */
    .tbp-icon-field input[type="date"],
    .tbp-icon-field input[type="time"] {
        text-align: left !important;
        -webkit-text-align: left !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        background: transparent !important;
        color: #22223b !important;
        font-size: 16px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        width: 100% !important;
        height: 40px !important;
        line-height: 40px !important;
        vertical-align: middle !important;
        direction: ltr !important;
        text-align-last: left !important;
        -webkit-text-align-last: left !important;
    }
    
    /* Remove default iOS styling for date/time inputs */
    .tbp-icon-field input[type="date"]::-webkit-datetime-edit,
    .tbp-icon-field input[type="time"]::-webkit-datetime-edit {
        text-align: left !important;
        -webkit-text-align: left !important;
        color: #22223b !important;
        background: transparent !important;
    }
    
    .tbp-icon-field input[type="date"]::-webkit-datetime-edit-fields-wrapper,
    .tbp-icon-field input[type="time"]::-webkit-datetime-edit-fields-wrapper {
        text-align: left !important;
        -webkit-text-align: left !important;
    }
    
    .tbp-icon-field input[type="date"]::-webkit-datetime-edit-text,
    .tbp-icon-field input[type="time"]::-webkit-datetime-edit-text {
        text-align: left !important;
        -webkit-text-align: left !important;
    }
    
    .tbp-icon-field input[type="date"]::-webkit-datetime-edit-month-field,
    .tbp-icon-field input[type="date"]::-webkit-datetime-edit-day-field,
    .tbp-icon-field input[type="date"]::-webkit-datetime-edit-year-field,
    .tbp-icon-field input[type="time"]::-webkit-datetime-edit-hour-field,
    .tbp-icon-field input[type="time"]::-webkit-datetime-edit-minute-field {
        text-align: left !important;
        -webkit-text-align: left !important;
    }
    
    /* Additional iOS Safari specific fixes */
    .tbp-icon-field input[type="date"]::-webkit-inner-spin-button,
    .tbp-icon-field input[type="time"]::-webkit-inner-spin-button {
        display: none !important;
    }
    
    .tbp-icon-field input[type="date"]::-webkit-calendar-picker-indicator,
    .tbp-icon-field input[type="time"]::-webkit-calendar-picker-indicator {
        display: none !important;
    }
    
    /* Force left alignment for all date/time input elements */
    .tbp-icon-field input[type="date"] *,
    .tbp-icon-field input[type="time"] * {
        text-align: left !important;
        -webkit-text-align: left !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    #tbp-form-wrapper,
    #tbp-form-wrapper.tbp-modern {
        padding: 10px 6px 14px 6px;
        margin: 12px auto;
    }
    
    #tbp-form {
        gap: 14px;
    }
    
    .tbp-form-title {
        font-size: 1.2rem;
        margin-bottom: 14px;
    }
    
    .tbp-icon-field {
        min-height: 68px;
        padding: 0 10px;
    }
    
    .tbp-icon {
        min-width: 24px;
    }
    
    .tbp-input-group label {
        font-size: 0.85rem;
    }
    
    .tbp-icon-field input,
    .tbp-icon-field select {
        font-size: 15px;
        height: 40px;
    }
    
    .tbp-gradient-btn {
        padding: 14px 0;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .time-error-message {
        font-size: 12px !important;
        padding: 10px 14px !important;
        margin: 10px 0 !important;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 900px) and (orientation: landscape) {
    #tbp-form-wrapper,
    #tbp-form-wrapper.tbp-modern {
        max-width: 500px;
        margin: 8px auto;
    }
    
    #tbp-form {
        gap: 12px;
    }
    
    .tbp-icon-field {
        min-height: 60px;
    }
    
    .tbp-form-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    #tbp-form-wrapper,
    #tbp-form-wrapper.tbp-modern {
        padding: 8px 4px 12px 4px;
        margin: 8px auto;
    }
    
    #tbp-form {
        gap: 12px;
    }
    
    .tbp-icon-field {
        min-height: 64px;
        padding: 0 8px;
    }
    
    .tbp-icon {
        min-width: 20px;
    }
    
    .tbp-input-group label {
        font-size: 0.8rem;
    }
    
    .tbp-icon-field input,
    .tbp-icon-field select {
        font-size: 14px;
        height: 36px;
    }
    
    .tbp-gradient-btn {
        padding: 12px 0;
        font-size: 0.95rem;
        min-height: 44px;
    }
    
    .time-error-message {
        font-size: 11px !important;
        padding: 8px 12px !important;
        margin: 8px 0 !important;
    }
}

/* Additional mobile optimizations for flatpickr */
@media (max-width: 600px) {
    .flatpickr-calendar {
        font-size: 16px;
        width: 100% !important;
        max-width: 320px;
    }
    
    .flatpickr-time {
        font-size: 16px;
    }
    
    .flatpickr-time input {
        font-size: 16px !important;
    }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 600px) {
    .tbp-icon-field {
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .tbp-icon-field:active {
        transform: scale(0.98);
        background: #f0f0f5;
    }
    
    .tbp-gradient-btn {
        cursor: pointer;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    
    .tbp-gradient-btn:active {
        transform: scale(0.98);
    }
    
    /* Improve touch targets */
    .tbp-icon-field input,
    .tbp-icon-field select {
        min-height: 44px;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Better focus states for mobile */
    .tbp-icon-field input:focus,
    .tbp-icon-field select:focus {
        outline: none;
        background: #f0f0f5;
        border-color: #3F1982;
    }
    
    /* Mobile location button styling */
    .tbp-location-btn {
        min-width: 44px;
        height: 44px;
        padding: 10px;
        margin-left: 6px;
        -webkit-tap-highlight-color: transparent;
    }
    
    .tbp-location-btn:active {
        transform: scale(0.9);
        background: rgba(63, 25, 130, 0.12);
    }
    
    .tbp-location-btn.loading {
        animation: pulse 1s infinite;
    }
}

/* iOS Safari specific fixes for date/time inputs */
@supports (-webkit-touch-callout: none) {
    .tbp-icon-field input[type="date"],
    .tbp-icon-field input[type="time"] {
        text-align: left !important;
        -webkit-text-align: left !important;
        text-align-last: left !important;
        -webkit-text-align-last: left !important;
        direction: ltr !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        background: transparent !important;
        color: #22223b !important;
        font-size: 16px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        width: 100% !important;
        height: 40px !important;
        line-height: 40px !important;
        vertical-align: middle !important;
    }
    
    .tbp-icon-field input[type="date"]::-webkit-datetime-edit,
    .tbp-icon-field input[type="time"]::-webkit-datetime-edit {
        text-align: left !important;
        -webkit-text-align: left !important;
        color: #22223b !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .tbp-icon-field input[type="date"]::-webkit-datetime-edit-fields-wrapper,
    .tbp-icon-field input[type="time"]::-webkit-datetime-edit-fields-wrapper {
        text-align: left !important;
        -webkit-text-align: left !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .tbp-icon-field input[type="date"]::-webkit-datetime-edit-text,
    .tbp-icon-field input[type="time"]::-webkit-datetime-edit-text {
        text-align: left !important;
        -webkit-text-align: left !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .tbp-icon-field input[type="date"]::-webkit-datetime-edit-month-field,
    .tbp-icon-field input[type="date"]::-webkit-datetime-edit-day-field,
    .tbp-icon-field input[type="date"]::-webkit-datetime-edit-year-field,
    .tbp-icon-field input[type="time"]::-webkit-datetime-edit-hour-field,
    .tbp-icon-field input[type="time"]::-webkit-datetime-edit-minute-field {
        text-align: left !important;
        -webkit-text-align: left !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* Hide placeholder when input has value */
.tbp-icon-field input[data-has-value="1"]::placeholder {
    color: transparent !important;
}

/* Date picker styling */
.tbp-date-field {
    position: relative;
}

.tbp-date-field input[type="text"] {
    cursor: pointer;
    background: transparent;
    border: none !important;
    outline: none;
    font-size: 1.08rem;
    color: #22223b;
    padding: 0 !important;
    margin: 0;
    height: 40px;
    font-family: inherit;
    box-shadow: none;
    border-radius: 0;
    width: 100%;
    text-align: left;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.tbp-date-field input[type="text"]:focus {
    background: #f0f0f5;
}

.tbp-date-field input[type="text"]::placeholder {
    color: #bdbdbd;
    opacity: 1;
    font-size: 1.02rem;
}

/* Mobile date picker optimizations */
@media (max-width: 767px) {
    .tbp-date-field input[type="text"] {
        font-size: 16px; /* Prevents zoom on iOS */
        height: 44px;
    }
}

/* Hover effects for desktop date picker */
@media (min-width: 768px) {
    .tbp-date-field input[type="text"]:hover {
        background-color: #f0f0f5;
        transition: background-color 0.2s ease;
    }
    
    .tbp-date-field input[type="text"]:focus {
        background-color: #f0f0f5;
        transition: background-color 0.2s ease;
    }
}

/* Time picker styling */
.tbp-time-field {
    position: relative;
}

.tbp-time-mobile {
    display: block;
}

.tbp-time-desktop {
    display: none;
}

.tbp-time-dropdowns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tbp-time-hour,
.tbp-time-minute {
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.08rem;
    color: #22223b;
    padding: 0;
    margin: 0;
    height: 40px;
    font-family: inherit;
    box-shadow: none;
    border-radius: 0;
   min-width: 30px !important;
    text-align: center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238B8B8B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 24px;
}

.tbp-time-hour:focus,
.tbp-time-minute:focus {
    background-color: #f0f0f5;
}

.tbp-time-divider {
    color: #8B8B8B;
    font-size: 1.08rem;
    font-weight: 500;
    user-select: none;
}

.tbp-time-hint {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    font-size: 0.8rem;
    color: #8B8B8B;
    text-align: center;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

/* Desktop styles */
@media (min-width: 768px) {
    .tbp-time-mobile {
        display: none;
    }
    
    .tbp-time-desktop {
        display: block;
    }
    
    .tbp-time-field {
  
    }
}

/* Mobile styles */
@media (max-width: 767px) {
    .tbp-time-desktop {
        display: none;
    }
    
    .tbp-time-mobile {
        display: block;
    }
    
    .tbp-time-hint {
        position: static;
        margin-top: 8px;
        font-size: 0.75rem;
        color: #8B8B8B;
        text-align: center;
    }
    
    /* Ensure mobile time input is properly styled */
    .tbp-time-mobile input[type="time"] {
        width: 100%;
        height: 40px;
        font-size: 16px;
        text-align: left;
        padding: 0;
        margin: 0;
        border: none;
        outline: none;
        background: transparent;
        color: #22223b;
    }
}

/* Hover effects for desktop time picker */
@media (min-width: 768px) {
    .tbp-time-hour:hover,
    .tbp-time-minute:hover {
        background-color: #f0f0f5;
        transition: background-color 0.2s ease;
    }
    
    .tbp-time-dropdowns {
        gap: 12px;
    }
    
    .tbp-time-hour,
    .tbp-time-minute {
        min-width: 60px;
        font-size: 1.1rem;
    }
    
    .tbp-time-divider {
        font-size: 1.1rem;
        font-weight: 600;
    }
}

/* Time validation error styling */
.time-error-message {
    color: #e74c3c !important;
    font-size: 12px !important;
    margin: 10px 0 !important;
    font-weight: 500 !important;
    padding: 8px 12px !important;
    background: rgba(231, 76, 60, 0.1) !important;
    border-radius: 6px !important;
    border-left: 3px solid #e74c3c !important;
    animation: fadeIn 0.3s ease-in-out !important;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.1) !important;
    z-index: 1000 !important;
    position: relative !important;
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

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

/* Add visual feedback for invalid time input */
.tbp-icon-field input[type="time"]:invalid {
    border-color: #e74c3c !important;
    /*background: rgba(231, 76, 60, 0.05) !important;*/
}
