/*
 * rm/advisor (Home, Product): the ReelAdvisor showcase. Look from
 * docs/superpowers/specs/mockups/reeladvisor-showcase.html; breakpoints 1024 (stacked)
 * and 767 (skeleton hidden, chat full width). assets/js/advisor.js plays the demo;
 * the markup shows the first scene in its final state without it.
 */

.rm-advisor {
    --rm-advisor-soft: #E7E5FE;
    --rm-advisor-green: #2BB673;
    --rm-advisor-green-soft: #DDF3E8;
    padding: 0 var(--rm-gutter);
    margin: 40px 0;
}

.rm-advisor__panel {
    max-width: calc(var(--rm-container) - 2 * var(--rm-gutter));
    margin: 0 auto;
    padding: 100px 30px;
    border-radius: 40px;
    background: var(--rm-lavender);
}

.rm-advisor__inner {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
    align-items: center;
}

.rm-advisor__tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    padding: 6px 14px 6px 10px;
    border-radius: 999px;
    background: var(--rm-white);
    color: var(--rm-blurple);
    font-size: 14px;
    font-weight: 500;
}

.rm-advisor__tag svg {
    width: 16px;
    height: 16px;
}

.rm-advisor__title {
    max-width: 14ch;
    margin: 0 0 16px;
    font-family: var(--rm-font-helvetica);
    font-size: var(--rm-type-h60);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -.02em;
}

.rm-advisor__title .rm-accent {
    color: var(--rm-title-accent, var(--rm-red));
}

.rm-advisor__lede {
    max-width: 44ch;
    margin: 0 0 32px;
    color: var(--rm-black);
    font-size: var(--rm-type-20l);
    font-weight: 300;
    line-height: 1.5;
}

.rm-advisor__points {
    display: grid;
    gap: 4px;
    margin: 0 0 36px;
    padding: 0;
    list-style: none;
}

.rm-advisor__point {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    transition: background .3s;
}

.rm-advisor__point-mark {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--rm-blurple-medium);
    border-radius: 50%;
    transition: background .3s, border-color .3s;
}

.rm-advisor__point-mark svg {
    width: 14px;
    height: 14px;
    color: #fff;
    opacity: 0;
    transition: opacity .3s;
}

.rm-advisor__point h3 {
    margin: 3px 0 2px;
    font-size: 16px;
    font-weight: 500;
}

.rm-advisor__point p {
    margin: 0;
    color: var(--rm-grey);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.45;
}

.rm-advisor__point.is-done .rm-advisor__point-mark {
    border-color: var(--rm-blurple);
    background: var(--rm-blurple);
}

.rm-advisor__point.is-done .rm-advisor__point-mark svg {
    opacity: 1;
}

.rm-advisor__point.is-active {
    background: rgba(255, 255, 255, .7);
}

.rm-advisor__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.rm-advisor__link {
    color: var(--rm-black);
    font-size: 15px;
    text-decoration: underline;
    text-decoration-color: var(--rm-blurple-medium);
    text-underline-offset: 3px;
}

.rm-advisor__link:hover,
.rm-advisor__link:focus-visible {
    text-decoration-color: var(--rm-black);
}

.rm-advisor :focus-visible {
    outline: 2px solid var(--rm-blurple);
    outline-offset: 3px;
}

.rm-advisor__demo-wrap {
    position: relative;
    min-width: 0;
}

.rm-advisor__frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 12.5;
    border-radius: 24px;
    background: var(--rm-white);
    box-shadow: 0 1px 2px rgba(41, 41, 41, .06), 0 24px 60px -20px rgba(94, 85, 252, .28);
}

.rm-advisor__chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border-bottom: 1px solid var(--rm-grey-medium);
}

.rm-advisor__chrome i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--rm-grey-medium);
}

.rm-advisor__chrome b {
    width: 38%;
    height: 8px;
    margin-left: 16px;
    border-radius: 4px;
    background: var(--rm-grey-light);
}

.rm-advisor__app {
    position: absolute;
    inset: 36px 0 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 12px;
    padding: 18px;
    filter: saturate(.8);
}

.rm-advisor__sk {
    display: grid;
    gap: 9px;
    align-content: start;
    padding: 14px;
    border-radius: 12px;
    background: var(--rm-grey-light);
}

.rm-advisor__sk-row {
    height: 7px;
    border-radius: 4px;
    background: var(--rm-grey-medium);
}

.rm-advisor__sk-row--pill {
    width: 22%;
    margin-top: -16px;
    justify-self: end;
    background: var(--rm-blurple-medium);
}

.rm-advisor__sk-wide {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
}

.rm-advisor__sk-wide .rm-advisor__sk {
    flex: 1;
    height: 56px;
}

.rm-advisor__sk-line {
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(90deg, transparent, var(--rm-blurple-medium) 30%, transparent 70%, var(--rm-blurple-medium));
    opacity: .6;
    mask: linear-gradient(transparent 45%, #000 45% 60%, transparent 60%);
}

.rm-advisor__card {
    position: absolute;
    top: 11%;
    right: 5%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: min(440px, 80%);
    max-height: 86%;
    border-radius: 20px;
    background: var(--rm-white);
    box-shadow: 0 18px 50px -12px rgba(41, 41, 41, .35);
}

.rm-advisor__card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--rm-black);
    color: #fff;
}

.rm-advisor__avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--rm-blurple);
}

.rm-advisor__avatar svg {
    width: 15px;
    height: 15px;
}

.rm-advisor__name {
    font-size: 14px;
    font-weight: 500;
}

.rm-advisor__chat {
    display: grid;
    gap: 12px;
    overflow: hidden;
    padding: 16px;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.5;
}

.rm-advisor__q {
    justify-self: end;
    max-width: 85%;
    min-height: 1.5em;
    padding: 9px 13px;
    border-radius: 14px 14px 4px 14px;
    background: var(--rm-lavender);
    font-weight: 400;
}

.rm-advisor__steps {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--rm-grey);
    font-size: 13px;
}

.rm-advisor__steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: .35;
    transition: opacity .25s;
}

.rm-advisor__steps li::before {
    content: "";
    flex: none;
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--rm-blurple-medium);
    border-radius: 50%;
}

.rm-advisor__steps li.is-active {
    color: var(--rm-blurple);
    opacity: 1;
}

.rm-advisor__steps li.is-active::before {
    border-color: var(--rm-blurple);
    border-right-color: transparent;
    animation: rm-advisor-spin .8s linear infinite;
}

.rm-advisor__steps li.is-done {
    opacity: 1;
}

.rm-advisor__steps li.is-done::before {
    border-color: var(--rm-advisor-green);
    background: var(--rm-advisor-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.rm-advisor__answer {
    display: grid;
    gap: 8px;
}

.rm-advisor__answer p {
    margin: 0;
}

.rm-advisor__answer strong {
    font-weight: 600;
}

.rm-advisor__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rm-advisor__chips span {
    padding: 4px 10px;
    border: 1px solid var(--rm-blurple-medium);
    border-radius: 999px;
    color: var(--rm-blurple);
    font-size: 12px;
    font-weight: 400;
}

.rm-advisor-token {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 17px;
    padding: 3px 6px;
    border-radius: 6px;
    background: var(--rm-advisor-soft);
    vertical-align: -2px;
}

.rm-advisor-token i {
    width: 3px;
    border-radius: 1px;
    background: var(--rm-blurple);
    animation: rm-advisor-token 1.6s ease-in-out infinite;
}

.rm-advisor-token i:nth-child(1) { height: 6px; }
.rm-advisor-token i:nth-child(2) { height: 10px; animation-delay: .15s; }
.rm-advisor-token i:nth-child(3) { height: 8px; animation-delay: .3s; }
.rm-advisor-token i:nth-child(4) { height: 11px; animation-delay: .45s; }

.rm-advisor-token--up {
    background: var(--rm-advisor-green-soft);
}

.rm-advisor-token--up i {
    background: var(--rm-advisor-green);
}

.rm-advisor-token__unit {
    color: var(--rm-grey);
    font-size: 13px;
}

.rm-advisor__scenes {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

html.rm-js .rm-advisor__scenes {
    display: flex;
}

.rm-advisor__scene {
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    color: var(--rm-black);
    font: 400 14px/1 var(--rm-font);
    cursor: pointer;
}

.rm-advisor__scene[aria-pressed="true"] {
    border-color: var(--rm-blurple);
    background: var(--rm-white);
    color: var(--rm-blurple);
}

.rm-advisor__sr,
.rm-advisor__live {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.rm-advisor__q.caret::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 1px;
    background: var(--rm-blurple);
    vertical-align: -2px;
    animation: rm-advisor-blink 1s steps(1) infinite;
}

@keyframes rm-advisor-spin {
    to { transform: rotate(360deg); }
}

@keyframes rm-advisor-token {
    50% { transform: scaleY(.55); }
}

@keyframes rm-advisor-blink {
    50% { opacity: 0; }
}

/* Product: the points as the rm/showcase paytable under the copy and demo (showcase.css) */
.rm-advisor .rm-advisor__steps {
    margin: 64px auto 0;
    padding: 0;
    overflow: visible;
}

@media (max-width: 1024px) {
    .rm-advisor__panel {
        border-radius: 30px;
    }

    .rm-advisor__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .rm-advisor .rm-advisor__steps {
        margin-top: 40px;
    }
}

@media (max-width: 767px) {
    .rm-advisor__panel {
        padding: 72px 20px;
        border-radius: 25px;
    }

    .rm-advisor__frame {
        aspect-ratio: auto;
        min-height: 440px;
    }

    .rm-advisor__app {
        display: none;
    }

    .rm-advisor__card {
        position: relative;
        inset: auto;
        width: auto;
        max-height: none;
        margin: 14px;
        box-shadow: 0 8px 28px -10px rgba(41, 41, 41, .3);
    }
}

@media (prefers-reduced-motion: reduce) {
    .rm-advisor *,
    .rm-advisor *::before,
    .rm-advisor *::after {
        animation: none !important;
        transition: none !important;
    }
}
