/* =====================================================
   SIMPLE SMART SEARCH WIDGET - NO FREEZING
   ===================================================== */

.smart-search-widget {
    background: var(--background-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Widget Header */
.search-widget-header {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.widget-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.widget-title i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.widget-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Search Form */
.smart-search-form {
    position: relative;
    z-index: 2;
}

/* Form Fields */
.search-field {
    margin-bottom: 1.25rem;
}

.field-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Input Wrapper */
.input-wrapper-premium {
    position: relative;
    display: flex;
    align-items: center;
}

/* Guest Selector */
.guest-selector-wrapper {
    position: relative;
}

.guest-display {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--bg-light);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.guest-display:hover {
    border-color: var(--border-color);
    background: var(--background-color);
}

.guest-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-color);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-top: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    display: none;
    z-index: 100;
}

.guest-dropdown.active {
    display: block;
    animation: dropdownSlide 0.3s ease-out;
}

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

.guest-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.guest-category-info {
    flex: 1;
}

.guest-category-title {
    font-weight: 600;
    color: var(--text-color);
    display: block;
}

.guest-category-desc {
    font-size: 0.85rem;
    color: var(--text-light);
}

.guest-counter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.counter-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-light);
    background: var(--background-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.counter-btn:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

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

.counter-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: var(--text-color);
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--primary-color);
    z-index: 2;
    pointer-events: none;
}

.search-input-premium {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--bg-light);
    transition: all 0.3s ease;
    outline: none;
}

.search-input-premium:hover {
    border-color: var(--border-color);
    background: var(--background-color);
}

.search-input-premium:focus {
    border-color: var(--primary-color);
    background: var(--background-color);
    box-shadow: 0 0 0 4px var(--primary-shadow-light, rgba(25, 118, 210, 0.1));
}

/* Date and Guest Row */
.date-guest-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* =====================================================
   MOBILE OPTIMIZATION - Premium Platform Standard
   ===================================================== */

/* Mobile: 768px and below */
@media (max-width: 768px) {
    .smart-search-widget {
        padding: 1.5rem;
        border-radius: 16px;
        margin: 0 1rem;
        box-shadow: 
            0 12px 40px rgba(0, 0, 0, 0.12),
            0 0 0 1px rgba(0, 0, 0, 0.04);
    }

    .widget-title {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
    }

    .widget-subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* Mobile: Stack date and guest vertically */
    .date-guest-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .search-input-premium {
        font-size: 16px; /* iOS zoom prevention */
        padding: 1rem 1rem 1rem 3rem;
        height: 54px; /* Touch-friendly */
    }

    .search-submit-btn {
        padding: 1.125rem 2rem;
        font-size: 1rem;
        margin-top: 1.25rem;
        min-height: 54px; /* Touch-friendly */
    }

    /* Guest selector mobile optimization */
    .guest-display {
        font-size: 16px; /* iOS zoom prevention */
        min-height: 54px; /* Touch-friendly */
        padding: 1rem 1rem 1rem 3rem !important;
    }

    /* Popular searches mobile */
    .popular-searches {
        margin-top: 1.25rem;
    }

    .popular-tags {
        gap: 0.5rem;
    }

    .popular-tag {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
        min-height: 44px; /* Touch-friendly */
        display: flex;
        align-items: center;
    }
}

/* Small Mobile: 480px and below */
@media (max-width: 480px) {
    .smart-search-widget {
        padding: 1.25rem;
        margin: 0 0.75rem;
        border-radius: 12px;
    }

    .search-widget-header {
        margin-bottom: 1.25rem;
    }

    .widget-title {
        font-size: 1.2rem;
        gap: 0.5rem;
    }

    .widget-title i {
        font-size: 1.1rem;
    }

    .field-label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .search-field {
        margin-bottom: 1rem;
    }

    .search-input-premium {
        padding: 0.9rem 0.9rem 0.9rem 2.8rem;
        height: 50px;
    }

    .input-icon {
        left: 0.9rem !important;
        font-size: 0.9rem;
    }

    .search-submit-btn {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        min-height: 50px;
        letter-spacing: 0.02em;
    }

    /* Compact popular tags for small screens */
    .popular-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .popular-tag {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
        min-height: 40px;
        flex: 0 1 auto;
    }

    /* Widget features mobile stack */
    .widget-features {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .widget-feature {
        font-size: 0.85rem;
    }
}

/* Very Small Mobile: 360px and below */
@media (max-width: 360px) {
    .smart-search-widget {
        padding: 1rem;
        margin: 0 0.5rem;
    }

    .widget-title {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    .widget-subtitle {
        font-size: 0.85rem;
        text-align: center;
    }

    .search-input-premium {
        font-size: 15px;
        height: 48px;
        padding: 0.85rem 0.85rem 0.85rem 2.6rem;
    }

    .input-icon {
        left: 0.85rem !important;
        font-size: 0.85rem;
    }

    .search-submit-btn {
        font-size: 0.9rem;
        padding: 0.95rem 1.25rem;
        min-height: 48px;
    }

    /* Minimal popular tags */
    .popular-label {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .popular-tag {
        font-size: 0.75rem;
        padding: 0.45rem 0.7rem;
        min-height: 38px;
    }
}

/* Search Button - Premium Style */
.search-submit-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--primary-shadow, rgba(194, 142, 14, 0.3));
}

.search-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.search-submit-btn:hover::before {
    left: 100%;
}

.search-submit-btn:hover::after {
    width: 500px;
    height: 500px;
}

.search-submit-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px var(--primary-shadow-hover, rgba(194, 142, 14, 0.4));
}

.search-submit-btn:active {
    transform: translateY(-1px) scale(1);
    box-shadow: 0 4px 20px var(--primary-shadow, rgba(194, 142, 14, 0.3));
}

.search-submit-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.search-submit-btn:hover i {
    transform: translateX(4px);
}

/* Popular Searches */
.popular-searches {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.popular-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    display: block;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.popular-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.popular-tag:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Input Focus State - Replaces JavaScript inline styles */
.input-wrapper-premium.input-focused {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px var(--primary-shadow) !important;
}

/* Search Result Highlight - Replaces JavaScript inline styles */
.search-result-highlighted {
    box-shadow: 0 0 0 3px var(--primary-color) !important;
    outline: 2px solid var(--primary-color) !important;
    outline-offset: 2px !important;
    transform: translateY(-2px) !important;
}

/* Widget Features */
.widget-features {
    display: flex;
    justify-content: space-around;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.widget-feature {
    text-align: center;
}

.widget-feature i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.widget-feature-text {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* RESPONSIVE DESIGN - TÜM MOBİL CİHAZLAR İÇİN */
/* TABLET (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .smart-search-widget {
        padding: 1.75rem;
        border-radius: 18px;
    }
    
    .widget-title {
        font-size: 1.4rem;
    }
    
    .date-guest-row {
        gap: 1.25rem;
    }
}

/* MOBILE HERO SEARCH - CLEAN GETYOURGUIDE STYLE */
@media (max-width: 768px) {
    .smart-search-widget {
        background: transparent;
        border-radius: 0;
        padding: 0;
        margin: 0;
        width: 100%;
        box-shadow: none;
    }
    
    /* HIDE EVERYTHING EXCEPT SEARCH */
    .search-widget-header,
    .date-guest-row,
    .popular-searches,
    .widget-features {
        display: none !important;
    }
    
    /* AIRBNB/BOOKING.COM STYLE SEARCH */
    .smart-search-form {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 16px;
        padding: 4px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        display: flex;
        align-items: center;
        position: relative;
        box-shadow: 
            0 6px 20px rgba(0, 0, 0, 0.08),
            0 1px 3px rgba(0, 0, 0, 0.06);
        overflow: hidden;
        backdrop-filter: blur(8px);
        transition: all 0.2s ease;
    }
    
    .smart-search-form:hover {
        background: var(--background-color);
        box-shadow: 
            0 8px 25px rgba(0, 0, 0, 0.12),
            0 3px 8px rgba(0, 0, 0, 0.08);
        border-color: rgba(0, 0, 0, 0.12);
    }
    
    .smart-search-form:focus-within {
        background: var(--background-color);
        border-color: var(--error-color);
        box-shadow: 
            0 0 0 2px rgba(255, 90, 95, 0.2),
            0 8px 25px rgba(0, 0, 0, 0.15);
    }
    
    /* ONLY DESTINATION FIELD */
    .search-field:not(:first-child) {
        display: none;
    }
    
    .search-field {
        margin-bottom: 0;
        flex: 1;
        min-width: 0;
        position: relative;
    }
    
    /* HIDE LABEL */
    .field-label {
        display: none;
    }
    
    /* CLEAN MODERN INPUT */
    .search-input-premium {
        background: transparent;
        border: none;
        padding: 12px 50px 12px 16px;
        font-size: 16px;
        min-height: 48px;
        border-radius: 12px;
        width: 100%;
        color: var(--text-dark);
        font-weight: 400;
        transition: all 0.2s ease;
    }
    
    .search-input-premium::placeholder {
        color: var(--text-light);
        font-weight: 400;
        font-size: 16px;
    }
    
    .search-input-premium:focus {
        outline: none;
        color: var(--text-dark);
    }
    
    /* CLEAN SEARCH ICON */
    .input-icon {
        display: none; /* Hide search icon for cleaner look */
    }
    
    .input-wrapper-premium {
        position: relative;
        display: flex;
        align-items: center;
        flex: 1;
        width: 100%;
    }
    
    /* BRAND SEARCH BUTTON - WCAG Compliant */
    .search-submit-btn {
        position: absolute;
        right: 6px;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;  /* WCAG minimum touch target */
        height: 44px;  /* WCAG minimum touch target */
        min-width: 44px;
        min-height: 44px;
        border-radius: 50%;
        padding: 0;
        margin: 0;
        background: var(--primary-dark);  /* Better contrast */
        border: 2px solid var(--primary-dark);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px var(--primary-shadow);
        transition: all 0.2s ease;
        z-index: 3;
        cursor: pointer;
        color: var(--white);
    }
    
    .search-submit-btn i {
        font-size: 16px;
        color: white;
        margin: 0;
    }
    
    .search-submit-btn .btn-text {
        display: none;
    }
    
    .search-submit-btn:hover {
        background: var(--primary-dark);
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 4px 12px var(--primary-shadow-hover);
    }
    
    .search-submit-btn:active {
        transform: translateY(-50%) scale(0.95);
    }
}

/* KÜÇÜK MOBİL (480px ve altı) */
@media (max-width: 480px) {
    .smart-search-widget {
        padding: 1.25rem;
        border-radius: 14px;
        margin: 0 0.75rem; /* Daha az yan margin */
    }
    
    .widget-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .widget-subtitle {
        font-size: 0.85rem;
    }
    
    /* FORM FIELDS DAHA KOMPAKT */
    .search-field {
        margin-bottom: 1rem;
    }
    
    .field-label {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    /* INPUT FIELDS KÜÇÜK MOBİL */
    .search-input-premium,
    .guest-display {
        padding: 0.875rem 0.875rem 0.875rem 2.25rem;
        font-size: 0.95rem;
        min-height: 46px;
    }
    
    .input-icon {
        left: 0.625rem;
        font-size: 0.9rem;
    }
    
    /* GUEST DROPDOWN KÜÇÜK MOBİL */
    .guest-dropdown {
        padding: 1rem;
        margin-top: 0.375rem;
    }
    
    .guest-category {
        padding: 0.875rem 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .guest-category-info {
        width: 100%;
        text-align: left;
    }
    
    .guest-category-title {
        font-size: 0.95rem;
    }
    
    .guest-category-desc {
        font-size: 0.8rem;
    }
    
    .guest-counter {
        width: 100%;
        justify-content: center;
    }
    
    /* COUNTER BUTTONS KÜÇÜK MOBİL */
    .counter-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .counter-value {
        min-width: 36px;
        font-size: 1rem;
    }
    
    /* SEARCH BUTTON KÜÇÜK MOBİL */
    .search-submit-btn {
        padding: 1rem;
        font-size: 0.95rem;
        min-height: 48px;
        margin-top: 1rem;
    }
    
    /* POPULAR SECTION KÜÇÜK MOBİL */
    .popular-searches {
        margin-top: 1.25rem;
        padding-top: 1.25rem;
    }
    
    .popular-label {
        font-size: 0.8rem;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .popular-tags {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .popular-tag {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
        min-width: 120px;
        text-align: center;
        justify-content: center;
    }
    
    /* WIDGET FEATURES KÜÇÜK MOBİL */
    .widget-features {
        gap: 1rem;
        margin-top: 1.25rem;
        padding-top: 1.25rem;
    }
    
    .widget-feature {
        padding: 0.75rem 0;
    }
    
    .widget-feature i {
        font-size: 1.2rem;
        margin-bottom: 0.375rem;
    }
    
    .widget-feature-text {
        font-size: 0.8rem;
    }
}

/* ÇOK KÜÇÜK EKRANLAR (360px ve altı) */
@media (max-width: 360px) {
    .smart-search-widget {
        padding: 1rem;
        border-radius: 12px;
        margin: 0 0.5rem;
    }
    
    .widget-title {
        font-size: 1.1rem;
    }
    
    .search-input-premium,
    .guest-display {
        padding: 0.75rem 0.75rem 0.75rem 2rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .input-icon {
        left: 0.5rem;
        font-size: 0.85rem;
    }
    
    .counter-btn {
        width: 34px;
        height: 34px;
    }
    
    .search-submit-btn {
        padding: 0.875rem;
        font-size: 0.9rem;
        min-height: 46px;
    }
    
    .popular-tag {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
}

/* LANDSCAPE ORİENTASYON (Yatay tutma) */
@media (max-height: 500px) and (orientation: landscape) {
    .smart-search-widget {
        padding: 1rem;
    }
    
    .widget-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .search-field {
        margin-bottom: 0.75rem;
    }
    
    .popular-searches,
    .widget-features {
        display: none; /* Gizle - yer tasarrufu */
    }
    
    .search-submit-btn {
        margin-top: 0.75rem;
        padding: 0.875rem;
    }
}