/* Raro.Help stage-1 prototype (ticket 07). */

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1a1a1a;
    color: #1a1a1a;
}

#map {
    position: absolute;
    inset: 0;
}

/* Block address — hidden until a fix arrives. */
#address-bar {
    position: absolute;
    top: max(env(safe-area-inset-top, 0px) + 12px, 12px);
    left: 12px;
    right: 12px;
    padding: 12px 16px;
    box-sizing: border-box;
    background: rgba(26, 26, 26, 0.92);
    color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    z-index: 10;
    pointer-events: none;
    text-align: center;
}

#address-bar[hidden] { display: none; }

#address-code {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
}

#address-hint {
    font-size: 13px;
    color: #c7ccd4;
    margin-top: 2px;
}

/* Whether the fixes are actually reaching the server. Empty until a
   Share starts, so it takes no room on the card before then. */
#share-status {
    font-size: 13px;
    color: #9aa2ad;
    margin-top: 4px;
}

#share-status.ok { color: #8fd18f; }
#share-status.warn { color: #ffcc66; }

#share-status:empty { display: none; }

/* The one action on the page. */
#share-btn {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: max(env(safe-area-inset-bottom, 0px) + 16px, 16px);
    min-height: 64px;
    border: none;
    border-radius: 14px;
    background: #c62828;
    color: #ffffff;
    font-size: 21px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}

#share-btn svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
    flex: 0 0 auto;
}

#share-btn.locating { background: #8d5b00; }
#share-btn.sharing { background: #1976d2; }

/* The Caller's own position. */
.user-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1976d2;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.4);
    box-sizing: content-box;
}

#toast {
    position: fixed;
    left: 50%;
    bottom: max(env(safe-area-inset-bottom, 0px) + 96px, 96px);
    transform: translateX(-50%);
    background: rgba(26, 26, 26, 0.92);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 9999px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 20;
    opacity: 0;
    transition: opacity 250ms ease;
    pointer-events: none;
}

#toast.visible { opacity: 1; }
