/* ============================================
   Hurghada Today Core - Main Styles
   ============================================ */

/* ============================================
   Tour Master Fixes
   ============================================ */

/* Fix dropdown menus appearing behind other elements */
.tourmaster-tour-booking-bar-wrap,
.tourmaster-tour-booking-bar-inner {
    position: relative;
    z-index: 100;
}

.tourmaster-tour-booking-bar-wrap .tourmaster-combobox-wrap,
.tourmaster-tour-booking-bar-wrap select,
.tourmaster-tour-booking-bar-wrap .tourmaster-datepicker-wrap {
    position: relative;
    z-index: 110;
}

.tourmaster-tour-booking-bar-wrap .tourmaster-combobox-list,
.tourmaster-tour-booking-bar-wrap .tourmaster-datepicker-dropdown {
    position: absolute;
    z-index: 120;
}

/* ============================================
   WhatsApp Booking Tab Styles
   ============================================ */
.ht-whatsapp-booking-form {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    margin-top: 15px;
}

.ht-form-field {
    margin-bottom: 15px;
}

.ht-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.ht-form-field input, 
.ht-form-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.ht-form-row {
    display: flex;
    gap: 15px;
}

.ht-form-row .ht-form-field {
    flex: 1;
}

.ht-price-calculator {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-bottom: 15px;
}

.ht-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.ht-calc-row:last-child {
    margin-bottom: 0;
}

.ht-number-input {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.ht-number-input button {
    background: #eee;
    border: none;
    padding: 5px 12px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.ht-number-input button:hover {
    background: #ddd;
}

.ht-number-input input {
    width: 40px;
    text-align: center;
    border: none;
    padding: 5px;
    font-weight: bold;
    -moz-appearance: textfield;
    appearance: textfield;
}

.ht-number-input input::-webkit-outer-spin-button,
.ht-number-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.ht-total-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #4692e7;
    color: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 18px;
}

#ht-wa-submit-booking {
    width: 100%;
    background-color: #25d366 !important;
    border: none !important;
    color: white !important;
    padding: 15px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#ht-wa-submit-booking i {
    font-size: 20px;
}

/* Tab active state fix */
.tourmaster-booking-tab-content {
    display: none;
}
.tourmaster-booking-tab-content.tourmaster-active {
    display: block;
}


/* ============================================
   Preloader with Airplane Orbit
   ============================================ */
#ht-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 50%, #0d2137 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
}

.ht-loader-content {
    text-align: center;
}

.ht-orbit-container {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ht-loader-logo {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    animation: ht-pulse 2s ease-in-out infinite;
}

/* Orbit path - the airplane follows this circular path */
.ht-orbit-path {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: ht-orbit 2.5s linear infinite;
}

/* The airplane itself */
.ht-airplane {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1) drop-shadow(0 0 5px rgba(52, 152, 219, 0.8));
}

/* Orbit trail effect */
.ht-orbit-path::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin-top: -100px;
    margin-left: -100px;
    border: 2px solid rgba(52, 152, 219, 0.15);
    border-radius: 50%;
}

/* Glowing trail behind airplane */
.ht-orbit-path::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 6px;
    background: radial-gradient(ellipse, rgba(52, 152, 219, 0.6), transparent);
    border-radius: 50%;
    filter: blur(2px);
}

/* Animations */
@keyframes ht-orbit {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ============================================
   Modern Search Interface (Ultra-Premium)
   ============================================ */
.ht-modern-search-wrap {
    width: 100% !important;
    max-width: 850px !important;
    margin: 40px auto !important;
    position: relative !important;
    z-index: 9999 !important;
    font-family: 'Outfit', 'Inter', sans-serif !important;
}

.ht-modern-search-inner {
    position: relative !important;
    background: #fff !important;
    border: 2px solid #f39c12 !important; /* Premium Orange Border */
    border-radius: 60px !important;
    padding: 8px 15px !important;
    display: flex !important;
    align-items: center !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.4s ease !important;
}

.ht-modern-search-inner:focus-within {
    box-shadow: 0 20px 60px rgba(243, 156, 18, 0.15) !important;
    border-color: #e67e22 !important;
}

.ht-search-icon-wrap {
    padding: 0 15px !important;
    color: #f39c12 !important;
    font-size: 24px !important;
}

.ht-modern-search-input {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    color: #333 !important;
    font-size: 20px !important;
    padding: 12px 10px !important;
    outline: none !important;
    box-shadow: none !important;
    font-weight: 500 !important;
}

/* RTL Support */
[lang="ar"] .ht-modern-search-inner,
.rtl .ht-modern-search-inner {
    flex-direction: row-reverse !important;
}

[lang="ar"] .ht-search-thumb-wrap,
.rtl .ht-search-thumb-wrap {
    margin-right: 0 !important;
    margin-left: 25px !important;
}

[lang="ar"] .ht-search-info,
.rtl .ht-search-info {
    text-align: right !important;
}

[lang="ar"] .ht-item-price-wrap,
.rtl .ht-item-price-wrap {
    text-align: left !important;
}

[lang="ar"] .ht-view-all-link i,
.rtl .ht-view-all-link i {
    transform: rotate(180deg) !important;
}

.ht-search-clear-btn {
    width: 35px !important;
    height: 35px !important;
    background: #f5f5f5 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #888 !important;
    font-size: 14px !important;
    margin: 0 10px !important;
    transition: all 0.3s !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.ht-search-clear-btn.visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.ht-search-clear-btn:hover {
    background: #eee !important;
    color: #333 !important;
}

/* Results Dropdown Container */
.ht-ajax-search-results {
    position: absolute !important;
    top: calc(100% + 15px) !important;
    left: 0 !important;
    width: 100% !important;
    background: #fff !important;
    border-radius: 25px !important;
    box-shadow: 0 25px 80px rgba(0,0,0,0.18) !important;
    z-index: 10000 !important;
    overflow: hidden !important;
    display: none;
    animation: ht-slide-up 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

@keyframes ht-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Dropdown Header */
.ht-search-results-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px 30px 10px !important;
}

.ht-results-count {
    font-weight: 700 !important;
    color: #1a1a1a !important;
    font-size: 18px !important;
}

.ht-view-all-link {
    color: #f39c12 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Item Layout */
.ht-search-item {
    display: flex !important;
    padding: 25px 30px !important;
    border-bottom: 1px solid #f5f5f5 !important;
    transition: all 0.3s !important;
    text-decoration: none !important;
    color: inherit !important;
}

.ht-search-item:hover {
    background: #fafafa !important;
}

.ht-search-thumb-wrap {
    width: 250px !important;
    height: 160px !important;
    flex-shrink: 0 !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    margin-right: 25px !important;
}

.ht-search-thumb-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.ht-search-info {
    flex: 1 !important;
    position: relative !important;
}

.ht-item-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 5px !important;
}

.ht-search-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #0d2137 !important;
    display: block !important;
}

.ht-badge {
    background: #fff !important;
    border: 1px solid #f39c12 !important;
    color: #f39c12 !important;
    padding: 4px 12px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
}

.ht-search-location {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #888 !important;
    font-size: 13px !important;
    margin-bottom: 10px !important;
}

.ht-search-excerpt {
    color: #666 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
}

.ht-item-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.ht-item-rating {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    color: #f1c40f !important;
    font-size: 13px !important;
}

.ht-rating-count {
    color: #aaa !important;
    margin-left: 5px !important;
}

.ht-item-price-wrap {
    text-align: right !important;
}

.ht-price-label {
    display: block !important;
    font-size: 11px !important;
    color: #888 !important;
}

.ht-search-price {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #f39c12 !important;
}

.ht-price-suffix {
    display: block !important;
    font-size: 11px !important;
    color: #888 !important;
}

/* Footer Link */
.ht-search-results-footer {
    background: #f9f9f9 !important;
    padding: 15px 30px !important;
    text-align: center !important;
}

.ht-global-search-link {
    color: #333 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
}

.ht-global-search-link i {
    color: #888 !important;
}

/* Loading & No Results */
.ht-search-loading, .ht-search-no-results {
    padding: 40px !important;
    text-align: center !important;
}

.ht-spinner {
    width: 40px !important;
    height: 40px !important;
    border: 4px solid rgba(243, 156, 18, 0.1) !important;
    border-top: 4px solid #f39c12 !important;
    border-radius: 50% !important;
    display: inline-block !important;
    animation: ht-spin 0.8s linear infinite !important;
}

.ht-search-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
    text-decoration: none !important;
    color: inherit;
}

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

.ht-search-item:hover {
    background: #f7f9fc;
}

.ht-search-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 15px;
}

.ht-search-info {
    flex: 1;
}

.ht-search-title {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.3;
}

.ht-search-price {
    display: block;
    font-size: 12px;
    color: #4692e7;
    font-weight: 600;
    margin-top: 2px;
}

.ht-search-no-results {
    padding: 20px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

.ht-search-loading {
    padding: 20px;
    text-align: center;
}

.ht-spinner {
    width: 25px;
    height: 25px;
    border: 3px solid rgba(70, 146, 231, 0.2);
    border-top: 3px solid #4692e7;
    border-radius: 50%;
    display: inline-block;
    animation: ht-spin 0.8s linear infinite;
}

@keyframes ht-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ensure the parent container has relative positioning */
.tourmaster-tour-search-field {
    position: relative;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .ht-ajax-search-results {
        border-radius: 15px !important;
    }
    
    .ht-search-results-header {
        padding: 15px 20px 10px !important;
    }
    
    .ht-search-item {
        flex-direction: column !important;
        padding: 20px !important;
        align-items: flex-start !important;
    }
    
    .ht-search-thumb-wrap {
        width: 100% !important;
        height: 180px !important;
        margin-right: 0 !important;
        margin-bottom: 15px !important;
    }
    
    .ht-search-info {
        width: 100% !important;
    }
    
    .ht-search-title {
        font-size: 18px !important;
        word-break: break-word !important;
    }
    
    .ht-search-excerpt {
        font-size: 13px !important;
        line-height: 1.5 !important;
        margin-bottom: 15px !important;
    }
    
    .ht-item-footer {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
}

/* ============================================
   Multi-Package WhatsApp Modal Styles
   ============================================ */
.ht-wa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ht-wa-modal-overlay.active {
    opacity: 1;
}

.ht-wa-modal-box {
    background: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.ht-wa-modal-overlay.active .ht-wa-modal-box {
    transform: translateY(0);
}

.ht-wa-modal-header {
    background: linear-gradient(135deg, #075e54 0%, #128c7e 50%, #25d366 100%);
    color: #fff;
    padding: 24px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid #064e46;
}

.ht-wa-modal-header::before {
    content: '\f232';
    font-family: "FontAwesome";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4.5rem;
    color: #ffffff;
    opacity: 0.15;
    z-index: 0;
}

.ht-wa-modal-header::after {
    display: none;
}

.ht-wa-modal-header h3 {
    margin: 0 !important;
    color: #ffffff !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ht-wa-modal-close {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 1.5rem !important;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0 !important;
}

.ht-wa-modal-close:hover {
    opacity: 1;
}

.ht-wa-modal-body {
    padding: 20px;
}

/* Re-use existing form field styles for the modal */
.ht-wa-modal-body .ht-form-field {
    margin-bottom: 15px;
}

.ht-wa-modal-body .ht-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 0.875rem;
}

.ht-wa-modal-body .ht-form-field input,
.ht-wa-modal-body .ht-form-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: #f9fafb;
    transition: border-color 0.2s;
}

.ht-wa-modal-body .ht-form-field input:focus,
.ht-wa-modal-body .ht-form-field select:focus {
    outline: none;
    border-color: #4692e7;
    background-color: #fff;
}

.ht-wa-modal-body .ht-form-row {
    display: flex;
    gap: 15px;
}

.ht-wa-modal-body .ht-form-row .ht-form-field {
    flex: 1;
}

.ht-wa-modal-body .ht-number-input {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    height: 44px; /* match input height */
}

.ht-wa-modal-body .ht-number-input button {
    background: #f3f4f6;
    border: none;
    width: 40px;
    height: 100%;
    cursor: pointer;
    font-weight: bold;
    color: #374151;
    transition: background 0.2s;
}

.ht-wa-modal-body .ht-number-input button:hover {
    background: #e5e7eb;
}

.ht-wa-modal-body .ht-number-input input {
    flex: 1;
    text-align: center;
    border: none;
    height: 100%;
    border-radius: 0;
    padding: 0;
    background: #fff;
}

.ht-wa-modal-body .ht-total-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #111827;
}

.ht-wa-modal-body #ht-modal-total {
    color: #e74c3c !important;
    font-size: 1.25rem;
    font-weight: 700;
}

.ht-price-breakdown {
    text-align: center;
    color: #6b7280;
    margin-bottom: 15px;
    padding: 8px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 0.85rem;
}

.ht-wa-modal-body #ht-modal-submit {
    width: 100%;
    background-color: #25d366;
    border: none;
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ht-wa-modal-body #ht-modal-submit:hover {
    background-color: #20b858;
}

.ht-wa-modal-body #ht-modal-submit:active {
    transform: scale(0.98);
}
