/* ── GATE Maps UI ── */

/* Direction button */
.gate-directions-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 50px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #c084fc;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
    margin-top: 12px;
}
.gate-directions-btn:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: rgba(168, 85, 247, 0.5);
}
.gate-directions-btn svg {
    flex-shrink: 0;
    color: #a855f7;
}

/* Travel time widget */
.gate-travel-widget {
    margin-top: 14px;
}
.gate-travel-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.gate-travel-trigger:hover {
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.3);
    color: #c084fc;
}
.gate-travel-result {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
}
.gate-travel-result .travel-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}
.gate-travel-result .travel-duration {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e9d5ff;
}
.gate-travel-result .travel-distance {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
}
.gate-travel-error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: rgba(252, 165, 165, 0.9);
    font-size: 0.82rem;
}

/* Spinning loader */
@keyframes gate-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.gate-travel-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-top-color: #a855f7;
    border-radius: 50%;
    animation: gate-spin 0.7s linear infinite;
    flex-shrink: 0;
}

/* Admin location picker */
.gate-location-picker {
    margin-top: 12px;
}
#locationMap {
    height: 260px;
    border-radius: 12px;
    overflow: hidden;
    display: none;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.gate-map-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 6px;
    display: none;
}

/* Override Google Places autocomplete dropdown to match dark theme */
.pac-container {
    background: #1a1a2e;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    margin-top: 4px;
    overflow: hidden;
    font-family: inherit;
}
.pac-item {
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    font-size: 0.875rem;
}
.pac-item:first-child { border-top: none; }
.pac-item:hover,
.pac-item-selected {
    background: rgba(168, 85, 247, 0.15);
}
.pac-item-query {
    color: #e9d5ff;
    font-weight: 600;
}
.pac-matched { color: #c084fc; }
.pac-icon { display: none; }
.hdpi .pac-icon { display: none; }
.pac-logo::after { display: none; }
