/* Road Trip Manager — front public */

.rtm-app {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    max-width: 720px;
    margin: 0 auto;
    color: #1d2327;
}

.rtm-app--live {
    max-width: 960px;
}

.rtm-live-tracking {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 6px;
}

.rtm-live-tracking-title {
    margin: 0 0 6px;
    font-size: 1rem;
    color: #1f6581;
}

.rtm-live-tracking-lead {
    margin: 0 0 12px;
    font-size: 0.88rem;
    color: #50575e;
}

.rtm-live-tracking select {
    width: 100%;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.rtm-live-tracking [data-rtm-tracking-active] .rtm-status-bar {
    margin-top: 0;
}

.rtm-title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    color: #1f6581;
}

.rtm-lead {
    margin: 0 0 16px;
    color: #50575e;
}

.rtm-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.rtm-form input[type="password"],
.rtm-form select {
    width: 100%;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.rtm-form p {
    margin: 0 0 14px;
}

.rtm-btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}

.rtm-btn--primary {
    background: #1f6581;
    color: #fff;
}

.rtm-btn--primary:hover {
    background: #174d63;
    color: #fff;
}

.rtm-btn--ghost {
    background: transparent;
    color: #50575e;
    border: 1px solid #c3c4c7;
    margin-top: 12px;
}

.rtm-msg--error {
    color: #b32d2e;
    font-size: 0.9rem;
}

.rtm-error {
    color: #b32d2e;
    padding: 12px;
    border: 1px solid #f0b4b4;
    background: #fcf0f0;
    border-radius: 4px;
}

.rtm-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f6f7f7;
    border-radius: 4px;
    font-size: 0.9rem;
}

.rtm-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dba617;
    flex-shrink: 0;
}

.rtm-status-dot--ok {
    background: #00a32a;
}

.rtm-status-dot--err {
    background: #d63638;
}

.rtm-car-label {
    font-weight: 600;
    margin: 0 0 8px;
}

.rtm-map {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #dcdcde;
    margin-bottom: 12px;
    z-index: 0;
}

.rtm-hint {
    font-size: 0.85rem;
    color: #50575e;
    margin: 0 0 8px;
}

.rtm-coords {
    font-family: monospace;
    font-size: 0.8rem;
    color: #8c8f94;
    margin: 0 0 8px;
}

.rtm-live-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.rtm-live-updated {
    font-size: 0.85rem;
    color: #50575e;
}

.rtm-legend {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.rtm-legend li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.rtm-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.rtm-legend-dot--active {
    animation: rtm-marker-pulse 1.4s ease-in-out infinite;
}

.rtm-legend-item--offline {
    color: #8c8f94;
}

.rtm-legend-item--offline .rtm-legend-dot {
    opacity: 0.35;
}

.rtm-legend-item--stale {
    color: #646970;
}

.rtm-legend-item--stale .rtm-legend-dot {
    opacity: 0.6;
}

.rtm-marker-icon span,
.rtm-gmap-marker span {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.rtm-marker-icon--active span,
.rtm-gmap-marker.rtm-marker-blink span {
    animation: rtm-marker-pulse 1.4s ease-in-out infinite;
}

.rtm-gmap-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    margin-left: -12px;
    margin-top: -12px;
    cursor: pointer;
    z-index: 1;
}

@keyframes rtm-marker-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(31, 101, 129, 0.55);
    }
    50% {
        transform: scale(1.18);
        opacity: 0.88;
        box-shadow: 0 0 0 10px rgba(31, 101, 129, 0);
    }
}

.rtm-admin-note {
    background: #edfaef;
    border-left: 3px solid #00a32a;
    padding: 8px 12px;
    font-size: 0.9rem;
}
