/* ---------------------------------------------------------------------------------------------
   Guided tours — SmartAdmin skin for driver.js, plus the stacking fix it needs in this app.
   --------------------------------------------------------------------------------------------- */

:root {
    /* Must clear jQuery EasyUI, whose panels, masks, tooltips and combo panels all sit at
       9 900 000 (see wwwroot/lib/easyui/themes/*/easyui.css). Anything lower and the tour's
       backdrop paints *behind* every datagrid — which is exactly where the tours point. */
    --imonas-tour-z-overlay: 9900500;
}

/* driver.js assigns the overlay SVG `zIndex = "10000"` inline, so beating it needs !important.
   The popover carries z-index 1000000000 from driver.css and already clears everything. */
.driver-overlay,
svg.driver-overlay {
    z-index: var(--imonas-tour-z-overlay) !important;
}

/* ---------------------------------------------------------------------------------------------
   Popover, restyled to match the theme. driver.css starts from `all: unset`, so every property
   here has to be stated rather than inherited.
   --------------------------------------------------------------------------------------------- */

.driver-popover.imonas-tour {
    font-family: inherit;
    max-width: 340px;
    min-width: 280px;
    padding: 0;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
    color: #333;
}

.driver-popover.imonas-tour .driver-popover-title {
    display: block;
    padding: 14px 16px 6px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
    color: #2b7ec1;
}

.driver-popover.imonas-tour .driver-popover-description {
    padding: 0 16px 12px;
    font-size: .8125rem;
    line-height: 1.55;
    color: #4d4d4d;
}

.driver-popover.imonas-tour .driver-popover-description kbd {
    padding: 1px 5px;
    font-size: .75rem;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-bottom-width: 2px;
    border-radius: 3px;
    color: #495057;
}

.driver-popover.imonas-tour .driver-popover-footer {
    margin: 0;
    padding: 10px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 4px 4px;
}

.driver-popover.imonas-tour .driver-popover-progress-text {
    font-size: .6875rem;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.driver-popover.imonas-tour .driver-popover-footer-btn {
    padding: 4px 12px;
    font-size: .75rem;
    font-weight: 500;
    border-radius: 3px;
    border: 1px solid #ced4da;
    background: #fff;
    color: #495057;
}

.driver-popover.imonas-tour .driver-popover-footer-btn:hover {
    background: #f1f3f5;
}

/* The final button in the navigation group is Next / Finish — the primary action. */
.driver-popover.imonas-tour .driver-popover-navigation-btns button:last-child {
    background: #2b7ec1;
    border-color: #2b7ec1;
    color: #fff;
}

.driver-popover.imonas-tour .driver-popover-navigation-btns button:last-child:hover {
    background: #24699f;
    border-color: #24699f;
}

.driver-popover.imonas-tour .driver-popover-close-btn {
    color: #adb5bd;
}

.driver-popover.imonas-tour .driver-popover-arrow {
    border-color: #fff;
}

/* Injected by the engine, not by driver.js: the optional anchor link from the YAML, and Skip. */
.imonas-tour-link {
    display: inline-block;
    margin: 0 16px 12px;
    font-size: .8125rem;
    font-weight: 500;
    color: #2b7ec1;
    text-decoration: none;
    cursor: pointer;
}

.imonas-tour-link:hover {
    text-decoration: underline;
    color: #24699f;
}

.imonas-tour-skip {
    margin-right: auto;
    font-size: .6875rem !important;
    color: #868e96 !important;
    background: transparent !important;
    border-color: transparent !important;
    text-decoration: underline;
}

.imonas-tour-skip:hover {
    color: #495057 !important;
    background: transparent !important;
}

/* ---------------------------------------------------------------------------------------------
   Header launcher + post-login prompt
   --------------------------------------------------------------------------------------------- */

#tour-launcher-list .dropdown-item {
    white-space: normal;
}

#tour-launcher-list .dropdown-item small {
    display: block;
    line-height: 1.35;
}

.imonas-tour-modal .modal-header {
    padding: .75rem 1rem;
}

.imonas-tour-modal .list-group-item {
    display: flex;
    align-items: flex-start;
    padding: .65rem .85rem;
}

.imonas-tour-modal .list-group-item .imonas-tour-modal-meta {
    flex: 1;
    min-width: 0;
}

.imonas-tour-modal .list-group-item small {
    display: block;
    color: #868e96;
    line-height: 1.35;
}
