/* "I want to..." buttons and shared modal. Loaded after detail_modal.css. */

/* ---- Strip button: a <button> styled like the .home-category-card links ---- */
.home-category-card--intent {
    font-family: inherit;
    cursor: pointer;
}

.home-category-card--intent .sparkle-icon {
    flex: none;
    color: var(--home-action);
}

@media (max-width: 480px) {
    .home-category-card--intent .sparkle-icon {
        width: 1em;
        height: 1em;
    }
}

.breadcrumb-intent-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.breadcrumb-intent-row > .breadcrumb-trail {
    min-width: 0;
}

.breadcrumb-intent-separator {
    color: #9a9a9a;
}

.breadcrumb-intent-button {
    flex: none;
    min-height: 22px;
    padding: 2px 8px;
    border: 1px solid #d6d6d6;
    border-radius: 999px;
    background: #fff;
    color: #5f6368;
    font: inherit;
    white-space: nowrap;
    cursor: pointer;
}

.breadcrumb-intent-button:hover {
    background: #eef1f3;
    color: #333;
}

.breadcrumb-intent-button:focus-visible {
    outline: 2px solid #255a9b;
    outline-offset: 2px;
}

/* ---- Modal ---- */
.home-intent-modal .home-intent-modal__dialog {
    width: min(680px, calc(100vw - 32px));
}

.home-intent-modal__header {
    padding-left: 22px;
}

.home-intent-modal__back {
    flex: none;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #444;
    cursor: pointer;
    font-size: 18px;
}

.home-intent-modal__back[hidden] {
    display: none;
}

.home-intent-modal__back:hover,
.home-intent-modal__back:focus-visible {
    background: #f2f2f2;
    color: #111;
    outline: none;
}

.home-intent-modal .detail-modal__heading h2 {
    font-size: 24px;
}

.home-intent-list {
    display: grid;
    gap: 10px;
    margin: 6px 0 4px;
    padding: 0;
    list-style: none;
}

.home-intent-list[hidden] {
    display: none;
}

.home-intent-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dfe4e6;
    border-radius: 12px;
    background: #fff;
    color: #30383e;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.home-intent-option:hover {
    border-color: #b9cad4;
    background: #f9fbfc;
    box-shadow: 0 2px 6px rgba(39, 51, 59, 0.1);
}

.home-intent-option:focus-visible {
    outline: 3px solid rgba(37, 90, 155, 0.32);
    outline-offset: 2px;
}

.home-intent-option__icon {
    flex: none;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eef3f6;
    color: #506d80;
    font-size: 17px;
}

.home-intent-option__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.home-intent-option__label {
    font-size: 16px;
    font-weight: 600;
    color: #1f2a31;
}

.home-intent-option__hint {
    font-size: 13.5px;
    line-height: 1.35;
    color: #5f6b73;
}

.home-intent-option__chevron {
    flex: none;
    color: #8a979f;
    font-size: 13px;
}

.home-intent-assist[hidden],
.home-intent-assist__loading[hidden] {
    display: none;
}

.home-intent-modal[data-step="assist"] .home-intent-modal__body {
    padding-top: 6px;
    padding-bottom: 16px;
}

.home-intent-assist__frame {
    display: block;
    width: 100%;
    height: 220px;
    border: 0;
}

.home-intent-assist__frame[hidden] {
    display: none;
}

.home-intent-assist__loading {
    display: grid;
    gap: 12px;
    padding: 10px 0 20px;
}

.home-intent-assist__skeleton {
    display: block;
    width: 55%;
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, #eef1f3 0%, #f7f9fa 50%, #eef1f3 100%);
    background-size: 200% 100%;
    animation: home-intent-shimmer 1.2s ease-in-out infinite;
}

.home-intent-assist__skeleton--wide {
    width: 85%;
}

.home-intent-assist__skeleton--tall {
    width: 100%;
    height: 120px;
    border-radius: 10px;
}

.home-intent-assist__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@keyframes home-intent-shimmer {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .home-intent-assist__skeleton {
        animation: none;
    }
}

/* detail_modal.css caps the dialog at 100vh - 250px below 800px, which leaves
   too little room for a form. */
@media (max-width: 800px) {
    .home-intent-modal .home-intent-modal__dialog {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .home-intent-modal__header {
        padding: 16px 54px 12px 14px;
    }

    .home-intent-modal .detail-modal__heading h2 {
        font-size: 21px;
    }

    .home-intent-modal .home-intent-modal__body {
        padding: 10px 14px 16px;
    }

    .home-intent-option {
        padding: 12px;
        gap: 12px;
    }
}
