/* --- Coach Mark Styles --- */
#coach-mark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s linear;
}

#coach-mark-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

#coach-mark-bubble {
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    font-size: 14px;
    line-height: 1.5;
    z-index: 10001;
    font-family: inherit;
}

#coach-mark-bubble::after {
    /* Pointer */
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

#coach-mark-bubble.pos-top::after {
    top: 100%;
    left: calc(50% + var(--arrow-offset, 0px));
    transform: translateX(-50%);
    border-width: 10px 10px 0 10px;
    border-color: #333 transparent transparent transparent;
}

#coach-mark-bubble.pos-bottom::after {
    bottom: 100%;
    left: calc(50% + var(--arrow-offset, 0px));
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-color: transparent transparent #333 transparent;
}

#coach-mark-bubble.pos-left::after {
    left: 100%;
    top: calc(50% + var(--arrow-offset, 0px));
    transform: translateY(-50%);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent #333;
}

#coach-mark-bubble.pos-right::after {
    right: 100%;
    top: calc(50% + var(--arrow-offset, 0px));
    transform: translateY(-50%);
    border-width: 10px 10px 10px 0;
    border-color: transparent #333 transparent transparent;
}

.coach-mark-nav {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coach-mark-nav>div {
    /* Container for skip/next buttons */
    display: flex;
    gap: 8px;
}

#coach-mark-counter {
    font-size: 12px;
    color: #ccc;
}

#coach-mark-skip,
#coach-mark-next {
    background: none;
    border: none;
    color: #fff;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: 5px;
    transition: background-color 0.2s;
    line-height: 1;
}

#coach-mark-skip {
    color: #aaa;
}

#coach-mark-next {
    background-color: #0078A8;
}

/* Style for the element being highlighted by a coach mark */
.coach-mark-highlight {
    position: relative;
    /* Ensure z-index is effective on statically positioned elements */
    z-index: 10002;
}

/* Special case for search-container if it's the highlight target */
#search-container.coach-mark-highlight {
    z-index: 10002;
}

/* Ensure bottom-right-controls parent is elevated but keeps position */
.bottom-right-controls.coach-mark-highlight {
    position: absolute;
    z-index: 10002;
}

.add-place-button.coach-mark-highlight {
    position: absolute !important;
    /* Ensure it doesn't lose its placement */
    bottom: 20px;
    left: 20px;
}

@media (max-width: 768px) {
    .add-place-button.coach-mark-highlight {
        bottom: calc(20px + env(safe-area-inset-bottom));
        left: calc(20px + env(safe-area-inset-left));
    }
}

@media (min-width: 1025px) {
    body.list-view-open .add-place-button.coach-mark-highlight {
        left: 380px !important;
    }
}

/* --- End Coach Mark Styles --- */