/* ============================================================================
   polygon-search.css  —  draw-area controls on the customer map
   Sits on top of #standalone-map-wrapper, which is position:relative already
   (the existing #map-fullscreen-btn depends on that).
   ========================================================================== */

.poly-toolbar {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 6;
    display: flex;
    gap: 8px;
    font-family: 'Inter', Roboto, Arial, sans-serif;
}

.poly-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid #1a7a7a;
    border-radius: 22px;
    background: #ffffff;
    color: #1a7a7a;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.poly-btn:hover {
    background: #1a7a7a;
    color: #ffffff;
}

.poly-btn:active {
    transform: translateY(1px);
}

.poly-btn svg {
    flex: 0 0 auto;
}

/* Active drawing state — turns the draw button into a visible "Cancel" */
.poly-btn-draw.is-drawing {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
}

.poly-btn-draw.is-drawing:hover {
    background: #991b1b;
    border-color: #991b1b;
}

.poly-btn-clear {
    border-color: #cbd5e1;
    color: #475569;
    font-weight: 600;
}

.poly-btn-clear:hover {
    background: #475569;
    border-color: #475569;
    color: #ffffff;
}

.poly-btn[hidden] {
    display: none;
}

/* Drag instruction shown only while drawing */
.poly-hint {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    font-family: 'Inter', Roboto, Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.poly-hint[hidden] {
    display: none;
}

/* Small screens — stack the buttons and shrink the hint */
@media (max-width: 640px) {
    .poly-toolbar {
        top: 10px;
        left: 10px;
        flex-direction: column;
        align-items: flex-start;
    }

    .poly-btn {
        padding: 7px 12px;
        font-size: 12px;
    }

    .poly-hint {
        top: auto;
        bottom: 16px;
        font-size: 11px;
        padding: 7px 12px;
        white-space: normal;
        max-width: 82vw;
        text-align: center;
    }
}