/* ============================================================================
   Add Place V2 - Custom Styles
   Only for things impractical in Tailwind utility classes
   ============================================================================ */

/* Step transitions */
.wizard-step {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Hide X/close button on POI label InfoWindow (#4) */
.gm-ui-hover-effect {
    display: none !important;
}

/* Google Places Autocomplete dropdown overrides */
.pac-container {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    margin-top: 4px;
    font-family: inherit;
    z-index: 10000;
}

.pac-item {
    padding: 10px 14px;
    border-top: 1px solid #f3f4f6;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

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

.pac-item:hover,
.pac-item-selected {
    background-color: #f0fdf4;
}

.pac-icon {
    display: none;
}

.pac-item-query {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}

/* Success screen confetti */
.confetti-bg {
    position: relative;
    overflow: hidden;
}

.confetti-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 20%, #F4BD43 1px, transparent 1px),
        radial-gradient(circle at 80% 30%, #304C44 1.5px, transparent 1.5px),
        radial-gradient(circle at 30% 70%, #F4BD43 1px, transparent 1px),
        radial-gradient(circle at 70% 80%, #304C44 1px, transparent 1px),
        radial-gradient(circle at 50% 10%, #0C974E 1.5px, transparent 1.5px),
        radial-gradient(circle at 90% 60%, #F4BD43 1px, transparent 1px),
        radial-gradient(circle at 15% 50%, #304C44 1px, transparent 1px),
        radial-gradient(circle at 60% 40%, #0C974E 1px, transparent 1px);
    opacity: 0.3;
    pointer-events: none;
}

/* Chip button focus ring */
.chip-btn:focus-visible {
    outline: 2px solid #304C44;
    outline-offset: 2px;
}

/* Range slider (Low Clearance) */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
}

/* Fill the left side of the track with yellow */
input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #F4BD43 var(--slider-pct, 55.6%), #e5e7eb var(--slider-pct, 55.6%));
}

input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
}

input[type="range"]::-moz-range-progress {
    height: 8px;
    border-radius: 4px;
    background: #F4BD43;
}

/* Hide native thumb — we render a custom .rh-custom-thumb div instead,
   positioned by the same JS that positions the tooltip. This guarantees
   alignment without relying on browser-specific thumb sizing. */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Custom thumb — visual indicator, positioned by JS. */
.rh-custom-thumb {
    position: absolute;
    top: 50%;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #F4BD43;
    border: 3px solid #304C44;
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

/* Diamond road sign tooltip above slider */
.rh-sign-tooltip {
    position: absolute;
    top: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    transform: translateX(-50%);
}

.rh-sign-tooltip .rh-sign-diamond {
    width: 52px;
    height: 52px;
    transform: rotate(45deg);
    background: #F4BD43;
    border: 3px solid #1B1B1B;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Arrow on top of diamond */
.rh-sign-tooltip .rh-arrow-up {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 10px solid #1B1B1B;
}

/* Arrow on bottom of diamond */
.rh-sign-tooltip .rh-arrow-down {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid #1B1B1B;
}

.rh-sign-tooltip .rh-sign-text {
    transform: rotate(-45deg);
    font-size: 16px;
    font-weight: 800;
    color: #1B1B1B;
    line-height: 1;
    white-space: nowrap;
}

/* Slider scale labels should align to the slider's actual value positions,
   not be distributed by flex item widths. */
.rh-slider-scale {
    position: relative;
    height: 24px;
}

.rh-slider-scale-label {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}

.rh-slider-scale-label-start {
    transform: none;
}

.rh-slider-scale-label-end {
    transform: translateX(-100%);
}
