#btn-replay-tour {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 0.625rem;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border-radius: var(--radius-sm, 4px);
}

/* Al terminar o cerrar el recorrido (map-tour.js: endTour()), un par de segundos de pulso en
   el mismo color que el resaltado del propio tour -- para que quede claro dónde se relanza. */
@keyframes map-tour-replay-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 187, 0, 0.65); }
    50% { box-shadow: 0 0 0 5px rgba(255, 187, 0, 0.35); }
}

#btn-replay-tour.map-tour__replay-pulse {
    animation: map-tour-replay-pulse 1s ease-out 3;
}

.map-tour {
    position: fixed;
    inset: 0;
    z-index: var(--z-tooltip);
    pointer-events: none;
}

.map-tour__highlight {
    position: fixed;
    border-radius: var(--radius-md);
    box-shadow: 0 0 0 4000px rgba(28, 28, 28, 0.55), 0 0 0 3px var(--color-accent);
    transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
    pointer-events: none;
}

.map-tour__tooltip {
    position: fixed;
    width: min(320px, calc(100vw - 2 * var(--spacing-md)));
    background: var(--color-bg);
    color: var(--color-text);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--spacing-lg);
    pointer-events: auto;
    transition: top 0.2s ease, left 0.2s ease;
}

.map-tour__close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: none;
    border: 0;
    padding: var(--spacing-xs);
    cursor: pointer;
    line-height: 0;
}

.map-tour__close .icon {
    width: 14px;
    height: 14px;
}

.map-tour__step-count {
    margin: 0 0 var(--spacing-xs);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.map-tour__title {
    margin: 0 0 var(--spacing-sm);
    font-size: 1.05rem;
    color: var(--color-primary);
    padding-right: var(--spacing-lg);
}

.map-tour__text {
    margin: 0 0 var(--spacing-md);
    font-size: 0.9rem;
    line-height: 1.4;
}

.map-tour__actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}

.map-tour__btn {
    appearance: none;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    cursor: pointer;
}

.map-tour__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.map-tour__btn--primary {
    background: var(--color-primary-btn);
    border-color: var(--color-primary-btn);
    color: var(--color-text-inverse);
}

.map-tour__btn--primary:hover:not(:disabled) {
    background: var(--color-primary-btn-hover);
}
