/* Consolidated and updated styles */
.service-tabs-container {
    margin-top: -35px;
    padding: 0 40px;
    position: relative;
}

.service-tabs-swiper {
    padding: 10px 0;
    overflow: hidden;
}

.swiper-slide {
    width: auto !important;
}

.tab-btn {
    width: 90px;
    height: 80px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    padding: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.tab-btn:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    z-index: 10;
}

.tab-btn.active {
    background-color: #5C263F;
    color: #fff !important;
    border-color: #5C263F;
}

.tab-btn.active span,
.tab-btn.active .small,
.tab-btn.active .fw-heavy {
    color: #fff !important;
}

.tab-btn.active img {
    filter: invert(1);
}

.tab-icon {
    height: 24px;
    width: auto;
    margin-bottom: 8px;
}

.swiper-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: none;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
}

.swiper-button:hover {
    background: #f5f5f5;
}

.service-tabs-prev {
    left: 0;
}

.service-tabs-next {
    right: 0;
}

.card-container {
    overflow: hidden;
}

.input-item {
    position: relative;
    width: 100%;
}

.input-item .form-label {
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
    color: #555;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    /* Position below the input */
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    padding: 12px;
    width: 100%;
    /* Full width of parent */
    max-width: 400px;
    /* Increased width for large screens */
    box-sizing: border-box;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 8px 12px;
    gap: 8px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    min-height: 36px;
    /* Ensure enough height for spinner */
}

.spinner-border,
.spinner {
    flex-shrink: 0;
}

.search-box i {
    font-size: 20px;
    color: #6c757d;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 1rem;
    color: #333;
}

.search-box input::placeholder {
    color: #aaa;
    font-size: 0.9rem;
}

.search-box input:focus::placeholder {
    opacity: 0.5;
}

.location-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 10px;
    display: flex;
    align-items: center;
}

.location-btn:hover {
    color: #2563eb;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    padding: 8px 12px;
}

.error-message a {
    color: #2563eb;
    text-decoration: underline;
    margin-left: 5px;
}


.suggestions-list {
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    max-height: 240px;
    overflow-y: auto;
    padding: 4px 0;
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
}

.suggestion-item:hover {
    background-color: #f1f1f1;
}

.location-display {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 0.3s;
}

.location-display:hover {
    border-color: #bbb;
}

.swap-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 0 8px 20px 8px;
}

.swap-btn {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5c263f;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.swap-btn:hover {
    background-color: #5c263f;
    color: white;
}

.border-line {
    width: 1px;
    height: 20px;
    background-color: #ccc;
}

.date-display {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 0.3s;
    width: 100%;
    /* Ensure full width */
}

.date-display:hover {
    border-color: #bbb;
}

.date-display h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #333;
}

.date-display p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.datepicker-popup {
    position: absolute;
    background: white;
    border-radius: 8px;
    z-index: 3000;
    margin-top: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    /* Full width for datepicker */
    max-width: 400px;
    /* Match autocomplete-list width */
    box-sizing: border-box;
}

.swap-icon {
    font-size: 20px;
    color: #5C263F;
}

@media (min-width: 768px) {
    .autocomplete-list {
        max-width: 450px;
        /* Increased width for large screens */
    }

    .datepicker-popup {
        max-width: 450px;
        /* Match autocomplete-list width for consistency */
    }
}

@media (max-width: 767.98px) {
    .car-search-form .index-search {
        padding: 1rem;
    }

    .input-field,
    .date-field {
        padding: 0.5rem 0;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .search-btn {
        padding-top: 1rem;
    }

    .swap-locations {
        padding: 0.5rem 0;
        order: 1;
    }

    .location-fields {
        flex-direction: column;
    }

    .input-item {
        width: 100% !important;
        /* Override w-50 for date input */
    }

    .date-display {
        width: 100% !important;
        /* Full width on mobile */
    }

    .autocomplete-list {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        max-width: 100% !important;
        /* Ensure no overflow on mobile */
    }

    .search-box {
        width: 100% !important;
    }
}

@media (max-width: 576px) {
    .service-tabs-container {
        padding: 0 20px;
        /* Reduced padding for smaller screens */
    }

    .tab-btn {
        width: 80px;
        height: 70px;
    }

    .tab-icon {
        height: 20px;
    }

    .autocomplete-list {
        padding: 8px;
        /* Slightly less padding for small screens */
    }

    .search-box {
        padding: 6px 10px;
    }
}

.location-group-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
}

.location-field {
    flex: 1 1 30%;
    min-width: 250px;
    max-width: 100%;
}

.date-field {
    flex: 1 1 200px;
    min-width: 200px;
}

.tab-btn {
  width: 110px;
  min-height: 90px;
  background-color: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.75rem;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
}

.tab-btn span {
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: normal;
  word-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

