.eurotools-tour-host {
    display: none;
}

body.eurotools-tour-selector-open {
    overflow: hidden;
}

.eurotools-tour-selector .modal-dialog {
    max-width: 640px;
}

.eurotools-tour-selector-list {
    display: grid;
    gap: 0.75rem;
}

.eurotools-tour-selector-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}

.eurotools-tour-selector-copy {
    min-width: 0;
}

@media (max-width: 575.98px) {
    .eurotools-tour-selector-item {
        align-items: stretch;
        flex-direction: column;
    }
}

.tour-editor {
    max-width: 1100px;
}

.tour-step-list {
    display: grid;
    gap: 12px;
}

.tour-step-editor {
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
    padding: 12px;
}

.tour-step-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.eurotools-tour-popover.driver-popover {
    max-width: min(360px, calc(100vw - 32px));
}

.eurotools-tour-popover .driver-popover-title {
    font-size: 1rem;
    line-height: 1.3;
}

.eurotools-tour-popover .driver-popover-description {
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.eurotools-tour-popover.driver-popover.eurotools-tour-video {
    width: min(760px, calc(100vw - 32px));
    min-width: 0;
    max-width: min(760px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    display: flex !important;
    flex-direction: column;
}

.eurotools-tour-video .driver-popover-title,
.eurotools-tour-video .driver-popover-footer {
    flex-shrink: 0;
}

.eurotools-tour-video .driver-popover-description {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.eurotools-tour-popover .eurotools-tour-media-parent {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
}

.eurotools-tour-popover .eurotools-tour-media-only {
    padding: 0 !important;
}

.eurotools-tour-popover :is(iframe, video),
.tour-step-rich-text :is(iframe, video) {
    box-sizing: border-box;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border: 0;
}

/* Modal content can override Driver's default pointer rule. The Custom Synth
   tour permits only its current creation fields and the tour's own navigation. */
body.eurotools-custom-synth-tour * {
    pointer-events: none !important;
}

body.eurotools-custom-synth-tour .eurotools-tour-interactive,
body.eurotools-custom-synth-tour .eurotools-tour-interactive *,
body.eurotools-custom-synth-tour .driver-popover,
body.eurotools-custom-synth-tour .driver-popover * {
    pointer-events: auto !important;
}
