/**
 * Adamiro Product Tour — reuses the theme's global tokens (--text-dark,
 * --text-light, --border-light, --teal, --card-bg) rather than declaring a
 * parallel palette. Auto-enqueued only on pages that use this block (block.json
 * "style" property, WP core per-block asset loading).
 */

.adamiro-product-tour {
    max-width: 1000px;
    margin: 0 auto;
}

/* Demo mode (mode:"demo" — the /demo/ hub walkthroughs) runs wider than a
   regular v1 tour, and its transcript stays narrow + left-aligned even when
   the surrounding page section centers text. */
.adamiro-product-tour.is-mode-demo {
    max-width: 2000px;
}

.adamiro-product-tour.is-mode-demo .adamiro-product-tour__transcript {
    max-width: 900px;
    text-align: left;
    margin: 0 auto;
}

.adamiro-product-tour__title {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.adamiro-product-tour__layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
}

@media (max-width: 782px) {
    .adamiro-product-tour__layout {
        grid-template-columns: 1fr;
    }
}

.adamiro-product-tour__rail {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (max-width: 782px) {
    .adamiro-product-tour__rail {
        display: none;
    }
}

.adamiro-product-tour__rail-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md, 4px);
    color: var(--text-light);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.adamiro-product-tour__rail-btn:hover {
    background: var(--card-bg);
}

.adamiro-product-tour__rail-item.is-active .adamiro-product-tour__rail-btn {
    background: var(--card-bg);
    border-color: var(--teal);
    color: var(--text-dark);
}

.adamiro-product-tour__rail-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    font-size: 11px;
    font-weight: 600;
}

.adamiro-product-tour__rail-item.is-active .adamiro-product-tour__rail-num {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

.adamiro-product-tour__frame {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-md, 4px);
    border: 1px solid var(--border-light);
    overflow: hidden;
    background: var(--card-bg);
}

.adamiro-product-tour__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.adamiro-product-tour__highlight {
    position: absolute;
    box-sizing: border-box;
    border: 2px solid var(--teal);
    border-radius: 3px;
    box-shadow: 0 0 0 9999px rgba(7, 4, 37, 0.45);
    pointer-events: none;
}

.adamiro-product-tour__caption {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-dark);
    min-height: 3.1em;
}

.adamiro-product-tour__controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.adamiro-product-tour__prev,
.adamiro-product-tour__next {
    padding: 8px 16px;
    border-radius: var(--radius-md, 4px);
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-dark);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.adamiro-product-tour__next {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

.adamiro-product-tour__prev:disabled,
.adamiro-product-tour__next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.adamiro-product-tour__counter {
    font-size: 12px;
    color: var(--text-light);
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

.adamiro-product-tour__transcript {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.adamiro-product-tour__transcript summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
}

.adamiro-product-tour__transcript ol {
    margin: 12px 0 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-light);
}

.adamiro-product-tour__transcript li {
    margin-bottom: 8px;
}

.adamiro-product-tour__transcript strong {
    color: var(--text-dark);
}

/* Demo mode additions (mode:"demo" — chapters, module badge, hand-off
   banner, narration script, memory chip). Absent in v1 tours. */

.adamiro-product-tour__chapter {
    margin: 14px 0 2px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-light);
}

.adamiro-product-tour__rail-item:first-child + .adamiro-product-tour__chapter,
.adamiro-product-tour__chapter:first-child {
    margin-top: 0;
}

.adamiro-product-tour__handoff {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    background: rgba(31, 138, 154, 0.06);
    font-size: 13px;
    font-style: italic;
    color: var(--text-dark);
}

.adamiro-product-tour__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(7, 4, 37, 0.72);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.adamiro-product-tour__script {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-light);
}

.adamiro-product-tour__memory {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md, 4px);
    border: 1px solid var(--border-light);
    background: var(--card-bg);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-light);
}

.adamiro-product-tour__memory--writes {
    border-color: rgba(31, 138, 154, 0.45);
}

.adamiro-product-tour__memory--none {
    opacity: 0.85;
}

.adamiro-product-tour__memory-icon {
    flex-shrink: 0;
    display: inline-flex;
    margin-top: 1px;
    color: var(--teal);
}

.adamiro-product-tour__memory-text strong {
    color: var(--text-dark);
}

@media (max-width: 782px) {
    .adamiro-product-tour__chapter {
        display: none;
    }
}
