/**
 * Odmor.me Custom Search - Final Styles v1.0.4
 * Fixed for real HTML structure
 */

/* ========================================
   LOCATION AUTOCOMPLETE STYLES
   ======================================== */
.location-field {
    position: relative;
}

.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 2px;
}

.location-suggestions::-webkit-scrollbar {
    width: 8px;
}

.location-suggestions::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.location-suggestions::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.location-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

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

.location-suggestion-item:hover {
    background: #f9fafb;
}

.location-suggestion-item .location-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.location-suggestion-item .location-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.location-suggestion-loading,
.location-suggestion-empty {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

/* Animation for dropdown */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.location-suggestions {
    animation: slideDown 0.2s ease-out;
}

/* ========================================
   GUESTS DROPDOWN - FIXED STRUCTURE
   ======================================== */
.guests-field {
    position: relative;
}

.guests-field .search-input[readonly] {
    cursor: pointer;
    user-select: none;
}

.guests-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    padding: 16px;
    z-index: 100;
    display: none;
    animation: slideDown 0.2s ease-out;
}

.guest-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    border-bottom: 1px solid #f3f4f6;
}

.guest-row:last-child {
    border-bottom: none;
}

.guest-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
}

.guest-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.guest-controls input[type="number"] {
    width: 50px;
    height: 40px;
    text-align: center;
    border: none;
    font-weight: 700;
    font-size: 18px;
    color: #1f2937;
    background: #f1f5f9;
    border-radius: 8px;
    -moz-appearance: textfield;
}

.guest-controls input[type="number"]::-webkit-outer-spin-button,
.guest-controls input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.guest-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    padding: 0;
}

.guest-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
}

.guest-btn:active {
    transform: scale(0.95);
}

/* ========================================
   FILTERS ROW - Category + Additional in one line
   ======================================== */
.odmor-filters-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .odmor-filters-row {
        flex-wrap: nowrap;
    }
}

/* ========================================
   CATEGORY FILTERS - MODERN PILL STYLE
   ======================================== */
.odmor-category-filters-bottom {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin: -8px;
    flex-wrap: wrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.odmor-category-filters-bottom .category-filter-item {
    flex: 0 0 auto;
    margin: 0;
}

.odmor-category-filters-bottom input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.odmor-category-filters-bottom .category-filter-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 600;
    color: #5a6778;
    white-space: nowrap;
    min-width: fit-content;
    box-shadow:
        4px 4px 10px rgba(0, 0, 0, 0.08),
        -2px -2px 8px rgba(255, 255, 255, 0.9),
        inset 0 0 0 transparent;
    position: relative;
    overflow: hidden;
}

.odmor-category-filters-bottom .category-filter-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50px;
    z-index: 0;
}

.odmor-category-filters-bottom .category-filter-label span {
    position: relative;
    z-index: 1;
}

.odmor-category-filters-bottom .category-filter-label:hover {
    transform: translateY(-2px);
    box-shadow:
        6px 6px 15px rgba(0, 0, 0, 0.12),
        -3px -3px 10px rgba(255, 255, 255, 1);
    color: #374151;
}

.odmor-category-filters-bottom .category-filter-label:active {
    transform: translateY(0);
    box-shadow:
        2px 2px 5px rgba(0, 0, 0, 0.1),
        -1px -1px 3px rgba(255, 255, 255, 0.8),
        inset 2px 2px 5px rgba(0, 0, 0, 0.05);
}

.odmor-category-filters-bottom input[type="radio"]:checked + .category-filter-label {
    background: linear-gradient(135deg, #003c7a 0%, #0066cc 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow:
        0 4px 15px rgba(0, 60, 122, 0.35),
        0 2px 6px rgba(0, 102, 204, 0.25);
    transform: translateY(-1px);
}

.odmor-category-filters-bottom input[type="radio"]:checked + .category-filter-label::before {
    opacity: 0;
}

.odmor-category-filters-bottom .category-filter-label .check-icon {
    display: none;
}

/* ========================================
   SEARCH FORM
   ======================================== */
.odmor-search-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.odmor-search-form {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

.search-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

/* ========================================
   SEARCH FIELDS
   ======================================== */
.search-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.search-field label svg {
    color: #667eea;
}

.search-field input,
.search-field select {
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
    color: #1f2937;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-field input[readonly] {
    cursor: pointer;
}

/* ========================================
   SUBMIT BUTTON
   ======================================== */
.search-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #003c7a 0%, #098ce9 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 60, 122, 0.4);
}

.search-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(9, 140, 233, 0.5);
}

.search-submit-btn:active {
    transform: translateY(0);
}

/* ========================================
   LOADING
   ======================================== */
.odmor-search-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

/* ========================================
   MULTI-FORM LAYOUTS
   ======================================== */
.tours-grid {
    grid-template-columns: 2fr 2fr 1.2fr 1.2fr 1.2fr 1.5fr;
}

/* Fix for number inputs on desktop */
.tours-grid .number-field,
.cars-grid .number-field {
    min-width: 100px;
}

.tours-grid .number-input-wrapper,
.cars-grid .number-input-wrapper {
    min-width: 90px;
}

.cars-grid {
    grid-template-columns: 2fr 1.5fr 1fr 1.5fr 1fr 1fr 1.5fr;
}

.odmor-search-form {
    display: none;
}

.odmor-search-form.active {
    display: block;
}

/* Number input wrapper (for tours/cars) */
.number-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.number-input-wrapper input,
.number-input-wrapper input[type="number"],
.odmor-search-form .number-input-wrapper input {
    border: none !important;
    text-align: center;
    flex: 1;
    min-width: 40px;
    width: auto;
    padding: 14px 8px;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    background: transparent !important;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
    opacity: 1 !important;
}

/* Hide spinner buttons on number inputs */
.number-input-wrapper input[type="number"]::-webkit-outer-spin-button,
.number-input-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.number-input-wrapper input:focus {
    outline: none;
}

.number-btn {
    background: #f3f4f6;
    border: none;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
}

.number-btn:hover {
    background: #e5e7eb;
}

.number-btn:active {
    background: #d1d5db;
}

/* Checkbox field */
.checkbox-field {
    display: flex;
    align-items: center;
}

.checkbox-field label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px;
    user-select: none;
    font-size: 14px;
    font-weight: 500;
}

.checkbox-field input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Time select */
.time-field select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    font-size: 15px;
    color: #1f2937;
    transition: all 0.3s ease;
}

.time-field select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1200px) {
    .tours-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-form-grid,
    .tours-grid,
    .cars-grid {
        grid-template-columns: 1fr;
    }
    
    .number-btn {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    /* Mobile adjustments */
    .odmor-category-filters-bottom {
        gap: 10px;
        margin: -8px;
        margin-top: 15px;
        padding: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .odmor-category-filters-bottom .category-filter-label {
        font-size: 13px;
        padding: 11px 20px;
        box-shadow:
            4px 4px 10px rgba(0, 0, 0, 0.08),
            -2px -2px 8px rgba(255, 255, 255, 0.9);
    }
    
    .location-suggestions {
        max-height: 250px;
    }
    
    .location-suggestion-item {
        padding: 14px;
    }
    
    .guests-dropdown {
        max-height: 300px;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .odmor-search-wrapper {
        padding: 10px;
    }
    
    .odmor-search-form {
        padding: 20px 15px;
    }
    
    .search-form-grid {
        gap: 15px;
    }
    
    .odmor-category-filters-bottom {
        gap: 8px;
        padding: 6px;
        margin: -6px;
    }

    .odmor-category-filters-bottom .category-filter-label {
        font-size: 12px;
        padding: 10px 16px;
        box-shadow:
            3px 3px 8px rgba(0, 0, 0, 0.08),
            -2px -2px 6px rgba(255, 255, 255, 0.9);
    }
}

/* ========================================
   ADDITIONAL FILTERS (FEATURES)
   ======================================== */
.odmor-additional-filters-wrapper {
    display: none; /* Shown only for accommodation types */
    flex-shrink: 0;
}

.odmor-additional-filters-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #5a6778;
    white-space: nowrap;
    box-shadow:
        4px 4px 10px rgba(0, 0, 0, 0.08),
        -2px -2px 8px rgba(255, 255, 255, 0.9);
}

.odmor-additional-filters-link:hover {
    transform: translateY(-2px);
    box-shadow:
        6px 6px 15px rgba(0, 0, 0, 0.12),
        -3px -3px 10px rgba(255, 255, 255, 1);
    color: #374151;
}

.odmor-additional-filters-link .filter-icon {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.odmor-additional-filters-link .filter-text {
    user-select: none;
}

/* Features dropdown */
.odmor-features-dropdown {
    margin-top: 12px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
}

.features-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.features-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.features-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.features-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.features-content {
    padding: 20px;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px;
}

/* Features grid wrapper for checkboxes */
.features-grid {
    display: contents;
}

.feature-item {
    display: flex;
    align-items: center;
}

.feature-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.feature-item label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100% !important;
    user-select: none;
    justify-content: center;
}

.feature-item label:hover {
    border-color: #667eea;
    background: #f9fafb;
}

.feature-item input[type="checkbox"]:checked + label {
    background: #eff6ff;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.feature-item .feature-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.feature-item .feature-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    flex: 1;
}

.feature-item input[type="checkbox"]:checked + label .feature-label {
    color: #1f2937;
    font-weight: 600;
}

.features-footer {
    padding: 16px 20px;
    background: #f9fafb;
    border-top: 2px solid #e5e7eb;
}

.features-apply-btn {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #003c7a 0%, #098ce9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.features-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 140, 233, 0.4);
}

.features-apply-btn:active {
    transform: translateY(0);
}

/* Responsive adjustments for features */
@media (max-width: 768px) {
    .features-content {
        padding: 16px;
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .feature-item label {
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .odmor-additional-filters-link {
        font-size: 13px;
        padding: 8px 14px;
    }
    
    .features-header h4 {
        font-size: 14px;
    }
    
    .features-content {
        padding: 12px;
        gap: 10px;
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .feature-item label {
        padding: 10px 12px;
        gap: 10px;
        flex-direction: column !important;
        font-size: 11px;
    }
    
    .feature-item .feature-icon {
        font-size: 18px;
    }
    
    .feature-item .feature-label {
        font-size: 12px;
    }
}

/* Price Range Slider Styles */
.price-range-section {
    width: 100%;
    padding: 16px 0;
    border-top: 1px solid #e9ecef;
    margin-top: 12px;
    grid-column: 1 / -1 !important; /* Zauzima sve kolone */
}

.price-range-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.price-range-header .feature-icon {
    font-size: 20px;
}

.price-range-header .feature-label {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.price-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.price-input-field {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
    background: white;
    transition: border-color 0.2s ease;
}

.price-input-field:focus {
    outline: none;
    border-color: #003c7a;
}

.price-input-field::placeholder {
    color: #9ca3af;
}

.price-currency {
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
}

.price-to {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .price-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .price-separator {
        display: none;
    }
    
    .price-input-group {
        width: 100%;
    }
}