/* Index v3 - performance + mobile stability overrides */

html,
body {
    width: 100%;
    overflow-x: hidden;
}

/* Keep tap interactions snappy on mobile */
body {
    -webkit-tap-highlight-color: transparent;
}

/* Hero polish (keeps existing structure/images) */
.background-image {
    position: relative;
    background:
        radial-gradient(900px circle at 15% 20%, rgba(0, 138, 255, 0.28), transparent 55%),
        radial-gradient(900px circle at 85% 10%, rgba(244, 148, 36, 0.18), transparent 55%),
        linear-gradient(180deg, #0b1020 0%, #0b1020 100%);
}

.background-image > .overlay {
    position: relative;
    background: rgba(11, 16, 32, 0.55);
}

.background-image .input-group {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
}

.background-image .form-control {
    color: #fff;
}

.background-image .form-control::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

/* Navbar buttons (keep text visible on mobile) */
@media (max-width: 768px) {
    .btn-sm {
        padding: 0.35rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* Chat button styling */
.btn-chat {
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-chat:hover {
    background-color: #218838;
    border-color: #1e7e34;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-chat i {
    margin-right: 5px;
}

/* Carrier logo row */
.client {
    width: 180px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client img {
    filter: brightness(0) invert(1);
    object-fit: cover;
    max-width: 120%;
    max-height: 100%;
}

@media (max-width: 600px) {
    .client:nth-child(1) {
        order: 2;
    }

    .client:nth-child(2) {
        order: 1;
    }
}

.client:last-child img {
    max-height: 134%;
    margin-top: -10px;
}

/* Prevent the hero Google badge from forcing horizontal scroll */
@media (max-width: 420px) {
    .google-reviews-inline {
        flex-wrap: wrap !important;
        row-gap: 8px;
    }
}

/* Map container */
.shadow-3d {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
    border-radius: 10px;
    overflow: hidden;
}

#map {
    height: 400px;
    border-radius: 10px;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    width: 100%;
    image-rendering: -webkit-optimize-contrast;
}

@media (max-width: 768px) {
    #map {
        height: 320px;
    }

    #street-view {
        height: 320px !important;
    }
}

/* Autocomplete hint overlay (desktop-first) */
#autocomplete-hint {
    position: absolute;
    display: flex;
    align-items: center;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.5);
    z-index: 1;
    max-width: calc(100% - 16px);
}

#autocomplete-hint .hint-rest {
    color: rgba(255, 255, 255, 0.25);
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

#autocomplete-hint .hint-kbd {
    margin-left: 6px;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 10px;
    background: rgba(0, 138, 255, 0.4);
    color: rgba(255, 255, 255, 0.95);
    flex-shrink: 0;
    white-space: nowrap;
}

@media (hover: none), (pointer: coarse) {
    #autocomplete-hint .hint-kbd {
        display: none;
    }
}

#address {
    position: relative;
    z-index: 2;
    background-color: transparent !important;
}

/* Dark theme Google Places dropdown + prevent overflow */
.pac-container {
    z-index: 99999 !important;
    background-color: #1a1f2e !important;
    border: 1px solid rgba(0, 138, 255, 0.45) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
}

.pac-container::after {
    display: none !important;
}

.pac-logo::after {
    display: none !important;
}

.pac-item {
    padding: 10px 14px !important;
    cursor: pointer !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    background-color: transparent !important;
    color: #fff !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.pac-item:first-child {
    border-top: none !important;
}

/* Limit to 3 results */
.pac-item:nth-child(n+4) {
    display: none !important;
}

.pac-item:hover,
.pac-item-selected {
    background-color: rgba(0, 138, 255, 0.2) !important;
}

.pac-item-query {
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.pac-item span {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 12px !important;
}

/* Abbreviate address - hide "USA" suffix */
.pac-item span:last-child::after {
    content: '';
}

.pac-matched {
    color: #f49424 !important;
    font-weight: 700 !important;
}

.pac-icon {
    margin-top: 3px !important;
    filter: invert(1) brightness(0.85) !important;
}

/* Remove mobile zoom hack by scaling key typography instead */
@media (max-width: 1024px) {
    h1.display-4 {
        font-size: 2.4rem;
        line-height: 1.15;
    }

    h4 {
        font-size: 1.15rem !important;
    }
}
