/* Full Screen Search Modal */
.fullscreen-search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: all 0.3s ease;
}

.fullscreen-search-modal.active {
    opacity: 1;
}

.search-modal-content {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.fullscreen-search-modal.active .search-modal-content {
    transform: scale(1);
}

.search-header {
    background: #f8f9fa;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.search-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.close-search {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-search:hover {
    background: #e9ecef;
    color: #495057;
}

.search-container {
    padding: 30px;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.fullscreen-search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    background: white;
    color: #495057;
}

.fullscreen-search-input::placeholder {
    color: #adb5bd;
}

.fullscreen-search-input:focus {
    border-color: #6c757d;
    background: white;
    box-shadow: 0 0 0 2px rgba(108, 117, 125, 0.1);
}

.search-submit-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #000000;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.search-submit-btn:hover {
    background: #5a6268;
    color: white;
}

.search-results {
    max-height: 50vh;
    overflow-y: auto;
}

.spinner-container {
    padding: 40px;
    text-align: center;
}

.spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.25em;
    border-color: #6c757d;
    border-right-color: transparent;
}

.search-results-wrapper {
    width: 100%;
}

.results-count {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

/* Search Categories */
.search-categories-container {
    width: 100%;
}

.search-category-header {
    background: #f8f9fa;
    padding: 8px 12px;
    margin: 15px 0 8px 0;
    border-radius: 4px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    border-left: 3px solid #6c757d;
}

.search-category-header:first-child {
    margin-top: 0;
}

.search-results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 15px;
}

.search-box-result {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.search-box-result:hover {
    background: #f8f9fa;
    border-color: #6c757d;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Type-specific styling */
.search-tour {
    border-left: 3px solid #28a745;
}

.search-hotel {
    border-left: 3px solid #007bff;
}

.search-villa {
    border-left: 3px solid #fd7e14;
}

.search-supplier {
    border-left: 3px solid #6f42c1;
}

.search-page {
    border-left: 3px solid #17a2b8;
}

.search-location {
    border-left: 3px solid #dc3545;
}

.search-image-container {
    flex-shrink: 0;
    width: 60px;
    height: 45px;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
}

.search-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-content {
    flex: 1;
    padding: 0;
}

.search-title {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #495057;
}

.search-title a {
    color: #495057;
    text-decoration: none;
    transition: color 0.2s ease;
}

.search-title a:hover {
    color: #6c757d;
}

.search-excerpt {
    margin: 4px 0;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

.search-location {
    display: block;
    font-size: 11px;
    color: #adb5bd;
    margin-top: 4px;
}

.no-results, .error {
    text-align: center;
    padding: 30px;
    font-size: 16px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
}

.error {
    color: #dc3545;
    background: #f8d7da;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .search-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .search-header {
        padding: 15px 20px;
    }

    .search-header h2 {
        font-size: 16px;
    }

    .search-container {
        padding: 20px;
    }

    .fullscreen-search-input {
        padding: 12px 45px 12px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .search-modal-content {
        width: 98%;
        border-radius: 8px;
    }

    .search-header h2 {
        font-size: 15px;
    }

    .search-container {
        padding: 16px;
    }

    .fullscreen-search-input {
        padding: 10px 40px 10px 14px;
        font-size: 14px;
    }

    .search-submit-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* Simple Scrollbar */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.search-results-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.search-results-header h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

.search-category-section {
    margin-bottom: 30px;
}

.search-category-title {
    background: #f8f9fa;
    padding: 10px 15px;
    margin: 0 0 15px 0;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    border-left: 4px solid #6c757d;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.search-result-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
    display: flex;
    gap: 15px;
}

.search-result-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.search-tour { border-left: 4px solid #28a745; }
.search-hotel { border-left: 4px solid #007bff; }
.search-villa { border-left: 4px solid #fd7e14; }
.search-supplier { border-left: 4px solid #6f42c1; }
.search-page { border-left: 4px solid #17a2b8; }
.search-location { border-left: 4px solid #dc3545; }

.search-result-image {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.search-result-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.search-result-title a:hover {
    color: #007bff;
}

.search-result-excerpt {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.search-result-location {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 5px;
}

.search-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

@media (max-width: 768px) {
    .search-results-grid {
        grid-template-columns: 1fr;
    }
    
    .search-result-item {
        padding: 12px;
        gap: 12px;
    }
    
    .search-result-image {
        width: 60px;
        height: 45px;
    }
}

    .search-query {
        color: #666;
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .search-form-container {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        padding: 25px;
        border-radius: 12px;
        border: 1px solid #e9ecef;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        margin-bottom: 30px;
        transition: all 0.3s ease;
    }
    
    .search-form-container:hover {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
    }
    
    .search-form .input-group {
        max-width: 100%;
        width: 100%;
        position: relative;
        transition: all 0.3s ease;
    }
    
    .search-form .input-group.focused {
        transform: scale(1.01);
    }
    
    .search-form .form-control {
        border: 2px solid #ddd;
        border-right: none;
        padding: 15px 20px;
        font-size: 16px;
        border-radius: 8px 0 0 8px;
        transition: all 0.3s ease;
        background: white;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .search-form .form-control:focus {
        border-color: #28a745;
        box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
        outline: none;
    }
    
    .search-form .btn {
        padding: 1px 25px;
        font-size: 16px;
        font-weight: 600;
        border: 2px solid #28a745;
        border-left: none;
        background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        color: white;
        border-radius: 0 8px 8px 0;
        transition: all 0.3s ease;
        box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
    }
    
    .search-form .btn:hover {
        background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    }
    
    .search-form .btn:active {
        transform: translateY(0);
    }
    
    .search-hints {
        text-align: center;
        margin-top: 12px;
    }
    
    .search-hints small {
        color: #6c757d;
        font-size: 13px;
        font-style: italic;
    }
    
    .search-hints i {
        color: #ffc107;
        margin-right: 5px;
    }
    
    .search-results-enhanced {
        margin-top: 30px;
    }
    
    .search-results-header h3 {
        margin-bottom: 25px;
        color: #28a745;
        font-size: 18px;
        font-weight: 600;
        padding-bottom: 8px;
        border-bottom: 2px solid #28a745;
        display: inline-block;
    }
    
    .search-category-section {
        margin-bottom: 35px;
    }
    
    .search-category-title {
        background: #f8f9fa;
        padding: 12px 18px;
        margin: 0 0 15px 0;
        border-radius: 6px;
        font-size: 16px;
        font-weight: 600;
        color: #495057;
        border-left: 4px solid #6c757d;
    }
    
    .search-results-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-result-item {
        background: white;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 18px;
        transition: all 0.2s ease;
    }
    
    .search-result-item:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
    }
    
    .search-tour { border-left: 4px solid #28a745; }
    .search-hotel { border-left: 4px solid #007bff; }
    .search-villa { border-left: 4px solid #fd7e14; }
    .search-supplier { border-left: 4px solid #6f42c1; }
    .search-page { border-left: 4px solid #17a2b8; }
    .search-location { border-left: 4px solid #dc3545; }
    
    .search-result-content {
        width: 100%;
    }
    
    .search-result-title {
        margin: 0 0 10px 0;
        font-size: 18px;
        font-weight: 600;
    }
    
    .search-result-title a {
        color: #333;
        text-decoration: none;
        transition: color 0.2s ease;
    }
    
    .search-result-title a:hover {
        color: #007bff;
    }
    
    .search-result-excerpt {
        margin: 8px 0;
        font-size: 14px;
        color: #666;
        line-height: 1.5;
    }
    
    .search-result-location {
        font-size: 12px;
        color: #999;
        display: block;
        margin-top: 8px;
    }
    
    @media (max-width: 768px) {
        .search-form-container {
            padding: 20px;
            margin-bottom: 25px;
        }
        
        .search-form .form-control {
            padding: 12px 16px;
            font-size: 15px;
        }
        
        .search-form .btn {
            padding: 12px 20px;
            font-size: 15px;
        }
        
        .search-result-item {
            padding: 15px;
        }
        
        .search-result-title {
            font-size: 16px;
        }
    }
