/*
 * AI course advisor box in the home hero (resources/views/home-v1/advisor.blade.php). Loaded only while the advisor
 * is configured. Aurora Night: a dark glass prompt bar with a slowly turning blue-violet-pink border, a header strip,
 * a big question field and a white button (the fold's one pink button stays "Check dates and prices").
 * With the box present the hero gets .v1-hero--ask: on desktop the two version routes step aside so the fold stays
 * one screen; below 1000px the box comes straight after the head, before the picker card.
 * Motion only under html.v1-motion and never for reduced motion. Nothing below 16px.
 */

@property --v1-ask-turn { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

main.itil-v1 .v1-ask { position: relative; z-index: 2; width: 100%; max-width: 40rem; margin-top: 22px; }

main.itil-v1 .v1-ask__box {
    position: relative;
    margin: 0;
    border: 1.5px solid transparent;
    border-radius: 24px;
    background:
        linear-gradient(160deg, rgba(29, 26, 82, .96), rgba(14, 12, 48, .94)) padding-box,
        conic-gradient(from var(--v1-ask-turn), #6FA5FF, #A78BFA, #FF6BB0, #38D6F5, #6FA5FF) border-box;
    box-shadow: 0 30px 70px -30px rgba(124, 92, 255, .85), 0 0 0 1px rgba(255, 255, 255, .04) inset;
    transition: box-shadow var(--t-fast, .2s) ease, transform var(--t-fast, .2s) ease;
}
main.itil-v1 .v1-ask__box:focus-within {
    box-shadow: 0 0 0 5px rgba(167, 139, 250, .28), 0 30px 70px -28px rgba(124, 92, 255, .95);
    transform: translateY(-1px);
}

main.itil-v1 .v1-ask__label {
    display: flex; align-items: center; gap: 10px;
    margin: 0;
    padding: 12px 18px 11px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    border-radius: 22px 22px 0 0;
    background: linear-gradient(90deg, rgba(124, 92, 255, .22), rgba(124, 92, 255, 0) 75%);
    font-family: var(--font-head, inherit);
    font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: .005em;
    color: var(--on-dark, #fff);
    cursor: text;
}
main.itil-v1 .v1-ask__spark {
    flex: none; display: inline-grid; place-items: center;
    width: 30px; height: 30px; border-radius: 10px;
    background: var(--grad, linear-gradient(135deg, #6FA5FF, #A78BFA 50%, #FF6BB0));
    color: #fff;
    box-shadow: 0 6px 16px -6px rgba(240, 72, 155, .9);
}
main.itil-v1 .v1-ask__tag {
    display: inline-flex; align-items: center; gap: 8px;
    margin-left: auto; padding: 3px 11px;
    border-radius: 999px;
    background: rgba(56, 214, 245, .12);
    border: 1px solid rgba(56, 214, 245, .3);
    font-family: var(--font-body, inherit);
    font-size: 16px; font-weight: 600; line-height: 1.4;
    color: var(--on-dark, #fff);
    white-space: nowrap;
}
main.itil-v1 .v1-ask__tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan, #38D6F5); box-shadow: 0 0 0 0 rgba(56, 214, 245, .6); }

main.itil-v1 .v1-ask__row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 20px; }
main.itil-v1 .v1-ask__row input {
    flex: 1; min-width: 0;
    height: 60px; margin: 0; padding: 0;
    border: 0; border-radius: 0; outline: 0; box-shadow: none;
    background: transparent;
    font: inherit; font-size: 20px; font-weight: 500; line-height: 1.3;
    color: var(--on-dark, #fff);
}
/* The box shows focus as a whole, so the field gets no second outline. */
main.itil-v1 .v1-ask__row input:focus,
main.itil-v1 .v1-ask__row input:focus-visible { outline: none; box-shadow: none; border: 0; background: transparent; }
main.itil-v1 .v1-ask__row input::placeholder { color: rgba(226, 226, 255, .62); opacity: 1; }

main.itil-v1 .v1-ask__btn {
    flex: none;
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 56px; padding: 0 24px;
    border: 0; border-radius: 16px;
    background: #fff; color: var(--night, #0A0926);
    font-family: var(--font-head, inherit);
    font-size: 17px; font-weight: 700; line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 28px -12px rgba(255, 255, 255, .55);
    transition: transform var(--t-fast, .2s) ease, box-shadow var(--t-fast, .2s) ease, background-color var(--t-fast, .2s) ease;
}
main.itil-v1 .v1-ask__btn .v1-i { width: 20px; height: 20px; stroke-width: 2.4; transition: transform var(--t-fast, .2s) ease; }
main.itil-v1 .v1-ask__btn:hover { background: #F1EEFF; transform: translateY(-1px); box-shadow: 0 16px 32px -12px rgba(255, 255, 255, .7); }
main.itil-v1 .v1-ask__btn:hover .v1-i { transform: translateX(3px); }
main.itil-v1 .v1-ask__btn[aria-busy='true'] { opacity: .75; cursor: progress; }

main.itil-v1 .v1-ask__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
main.itil-v1 .v1-ask__chips > li { margin: 0; }
main.itil-v1 .v1-ask__chip {
    min-height: 40px; padding: 7px 15px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .07);
    color: var(--on-dark, #fff);
    font: inherit; font-size: 16px; font-weight: 600; line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--t-fast, .2s) ease, border-color var(--t-fast, .2s) ease, transform var(--t-fast, .2s) ease;
}
main.itil-v1 .v1-ask__chip:hover { background: rgba(167, 139, 250, .2); border-color: rgba(167, 139, 250, .7); transform: translateY(-1px); }
main.itil-v1 .v1-ask__note { margin: 10px 0 0; font-size: 16px; line-height: 1.45; color: var(--on-dark-2, rgba(226, 226, 255, .8)); }

main.itil-v1 .v1-ask button:focus-visible { outline: 3px solid var(--focus-on-dark, #38D6F5); outline-offset: 3px; }

/* ---------- The hero around it ---------- */
@media (min-width: 1000px) {
    /* The box takes the routes' place on desktop, so the fold is still one screen. */
    main.itil-v1 .v1-hero--ask .v1-hero__route { display: none; }
    main.itil-v1 .v1-hero--ask .v1-hero__team { margin-top: 14px; }
    /* One row of chips (the team chip steps aside: the team link sits right below), and the note line is kept for
       phones, where the box says less around it. The floating badge beside the chips goes too. */
    main.itil-v1 .v1-ask { margin-top: 18px; }
    main.itil-v1 .v1-ask__row { padding-block: 8px; }
    main.itil-v1 .v1-ask__row input { height: 56px; }
    main.itil-v1 .v1-ask__chips { flex-wrap: nowrap; margin-top: 12px; }
    main.itil-v1 .v1-ask__chips > li:nth-child(n+4) { display: none; }
    main.itil-v1 .v1-ask__note { display: none; }
    main.itil-v1 #hero.v1-hero--ask .v1-hero__float--b { display: none; }
}
/* Laptop heights (1366x768 and similar): the eyebrow tag steps aside so the box fits the first screen. */
@media (min-width: 1000px) and (max-height: 819.98px) {
    main.itil-v1 .v1-hero--ask .v1-hero__eyebrow { display: none; }
}
@media (min-width: 1000px) and (max-height: 739.98px) {
    main.itil-v1 .v1-ask { margin-top: 14px; }
    main.itil-v1 .v1-ask__note { display: none; }
    main.itil-v1 .v1-ask__row input { height: 52px; }
    main.itil-v1 .v1-ask__btn { min-height: 50px; }
}
@media (min-width: 1200px) and (min-height: 860px) {
    main.itil-v1 .v1-ask { margin-top: 30px; }
    main.itil-v1 .v1-ask__row input { height: 66px; font-size: 21px; }
}
@media (max-width: 999.98px) {
    /* One column: head, then the advisor, then the picker card, team link and routes. */
    main.itil-v1 .v1-hero--ask .v1-ask { order: 2; max-width: 560px; }
    main.itil-v1 .v1-hero--ask .v1-hero__stage { order: 3; }
    main.itil-v1 .v1-hero--ask .v1-hero__team { order: 4; }
    main.itil-v1 .v1-hero--ask .v1-hero__route { order: 5; }
}
@media (max-width: 767.98px) {
    main.itil-v1 .v1-ask { max-width: none; margin-top: 20px; }
    main.itil-v1 .v1-ask__box { border-radius: 20px; }
    main.itil-v1 .v1-ask__label { padding: 10px 14px; border-radius: 18px 18px 0 0; }
    main.itil-v1 .v1-ask__row { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 10px 10px 14px; }
    main.itil-v1 .v1-ask__row input { height: 52px; font-size: 18px; }
    main.itil-v1 .v1-ask__btn { justify-content: center; min-height: 52px; border-radius: 14px; }
    main.itil-v1 .v1-ask__chips > li:nth-child(n+3) { display: none; }
}
@media (max-width: 399.98px) {
    main.itil-v1 .v1-ask__tag { display: none; }
}

/* ---------- Motion ---------- */
html.v1-motion main.itil-v1 .v1-ask__box { animation: v1-ask-turn 9s linear infinite; }
html.v1-motion main.itil-v1 .v1-ask__tag i { animation: v1-ask-pulse 2.2s ease-out infinite; }
html.v1-motion main.itil-v1 .v1-aurora.is-paused ~ .v1-container :is(.v1-ask__box, .v1-ask__tag i) { animation-play-state: paused; }
@keyframes v1-ask-turn { to { --v1-ask-turn: 360deg; } }
@keyframes v1-ask-pulse { 70% { box-shadow: 0 0 0 9px rgba(56, 214, 245, 0); } 100% { box-shadow: 0 0 0 0 rgba(56, 214, 245, 0); } }
@media (prefers-reduced-motion: reduce) {
    main.itil-v1 .v1-ask__box, main.itil-v1 .v1-ask__tag i { animation: none !important; }
}
