/* ============================================================
   The iamproperty lead demo.
   ------------------------------------------------------------
   Lifted verbatim out of the old integrations/iamproperty.html,
   where it lived in an inline <style> block. It drives the one
   product moment on the profile page: a Rightmove enquiry email
   becoming a filled iamproperty applicant record and a booked
   viewing. Paired with js/iam-hero.js.

   Kept in its own file rather than folded into
   integration-profile.css, because it belongs to this one demo
   and the other profile pages should not carry it.

   The old block also carried .nav-dd-* rules for that page's
   hand-rolled nav dropdown. Those are dropped: v8.css owns the
   nav now, and the two definitions fought.
   ============================================================ */


        /* Use-cases nav dropdown (pure CSS, hover/focus driven) */



        /* ===== hero demo: the incoming lead email (left panel) ===== */
        .iam-mail .hsd-panel-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid #eef0f5; }


        .iam-mail .hsd-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; flex: none; }


        .iam-mail .hsd-panel-head-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #6b7280; }


        .iam-mail-source { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }


        .iam-mail-source img { width: 16px; height: 16px; }


        .iam-mail-source span { font-size: 12.5px; font-weight: 600; color: #111827; }


        .iam-mail-meta { padding: 12px 16px 10px; border-bottom: 1px solid #f3f4f6; }


        .iam-mail-row { display: flex; gap: 10px; padding: 2px 0; }


        .iam-mail-k { flex: 0 0 54px; font-size: 12px; color: #9ca3af; }


        .iam-mail-v { font-size: 13px; font-weight: 600; color: #111827; }


        .iam-mail-body { padding: 14px 16px; font-size: 14px; line-height: 1.6; color: #374151; flex: 1 1 auto; min-height: 0; overflow-y: hidden; scroll-behavior: smooth; touch-action: pan-y; }


        .iam-mail-body p { margin: 0 0 10px; }


        .iam-mail-body p:last-child { margin-bottom: 0; }



        /* WhatsApp follow-up screen (right panel, screen 4) — reuses the app-bar
           chrome; the thread/bubbles are a self-contained WhatsApp skin so we
           don't need the v2 stylesheet. */
        .iam-wa-badge { color: #15803d; background: rgba(37, 211, 102, 0.14); }


        .iam-wa-body {
            padding: 16px 16px 18px;
            background:
                radial-gradient(rgba(37, 211, 102, 0.05) 1px, transparent 1px) 0 0 / 16px 16px,
                #f6faf7;
        }


        .iam-wa-thread { display: flex; flex-direction: column; gap: 10px; }


        .iam-wa-bubble {
            max-width: 84%;
            padding: 8px 11px 6px;
            border-radius: 12px;
            font-size: 13.5px;
            line-height: 1.5;
            color: #1f2937;
            position: relative;
            opacity: 0;
            transform: translateY(8px);
            transition: opacity 0.4s ease, transform 0.4s ease;
            box-shadow: 0 1px 1px rgba(15, 23, 42, 0.06);
        }


        .iam-wa-bubble.is-on { opacity: 1; transform: none; }


        .iam-wa-bubble.is-in { align-self: flex-start; background: #ffffff; border: 1px solid #e6e9f0; border-top-left-radius: 4px; }


        .iam-wa-bubble.is-out { align-self: flex-end; background: #d9fdd3; border: 1px solid #c2ecba; border-top-right-radius: 4px; }


        .iam-wa-bubble-time { display: inline-flex; align-items: center; gap: 3px; float: right; margin: 2px 0 0 8px; font-size: 10px; color: #94a3b8; }


        .iam-wa-bubble-time svg { width: 14px; height: 10px; fill: none; stroke: #34b7f1; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }


        /* the applicant's typing "…" bubble */
        .iam-wa-bubble.is-typing { min-width: 40px; min-height: 20px; }


        .iam-wa-bubble.is-typing::after { content: "..."; color: #9aa4ad; letter-spacing: 2px; font-size: 15px; line-height: 0.6; display: block; animation: iamWaDots 1.1s steps(3) infinite; }


        @keyframes iamWaDots { 0% { opacity: 0.35; } 50% { opacity: 1; } 100% { opacity: 0.35; } }


        /* calendar event lands with a blue ring, then settles */
        .hsd-cal-event { transition: box-shadow 0.45s ease; }


        .hsd-cal-event.iam-landing { box-shadow: 0 0 0 2px rgba(101, 131, 255, 0.45); }


        /* idle: the enquiry being read — a mini email card with a scan beam */
        .iam-scan { position: relative; width: 128px; margin: 0 auto; padding: 12px 14px; background: #fff; border: 1px solid #e3e7f3; border-radius: 12px; box-shadow: 0 12px 26px -16px rgba(17, 24, 39, 0.3); display: flex; flex-direction: column; gap: 8px; overflow: hidden; }


        .iam-scan-row { display: flex; align-items: center; gap: 6px; }


        .iam-scan-ico { width: 14px; height: 14px; flex: none; border-radius: 5px; background: #eef1ff; box-shadow: inset 0 0 0 1px #dbe2fb; }


        .iam-scan-line { display: block; height: 5px; border-radius: 3px; background: #e6e9f2; }


        .iam-scan-line.l0 { flex: 1 1 auto; }


        .iam-scan-line.l1 { width: 92%; }


        .iam-scan-line.l2 { width: 100%; }


        .iam-scan-line.l3 { width: 58%; }


        .iam-scan-beam { position: absolute; left: 8px; right: 8px; top: -8px; height: 18px; border-radius: 9px; background: linear-gradient(180deg, rgba(101, 131, 255, 0), rgba(101, 131, 255, 0.25), rgba(101, 131, 255, 0)); animation: iamScanSweep 2.6s ease-in-out infinite; }


        @keyframes iamScanSweep { 0% { top: -10px; } 55% { top: calc(100% - 8px); } 100% { top: -10px; } }


        @media (prefers-reduced-motion: reduce) { .iam-scan-beam { animation: none; opacity: 0; } }



        /* why-askpilot card 2: certificate expiring → chase fires → renewed.
           Page-scoped stage (iam-wyc); loops via the shared .wy-on gate. */
        .iam-wyc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; padding: 16px; }


        .iam-wyc-row { width: 292px; display: flex; align-items: center; gap: 9px; padding: 10px 12px; background: #fff; border: 1px solid #e3e7f3; border-radius: 12px; box-shadow: 0 8px 20px -12px rgba(17, 24, 39, 0.3); }


        .iam-wyc-ico { width: 28px; height: 28px; flex: none; border-radius: 8px; background: #eef1ff; color: #4c6cff; display: flex; align-items: center; justify-content: center; }


        .iam-wyc-ico svg { width: 14px; height: 14px; }


        .iam-wyc-txt { display: flex; flex-direction: column; min-width: 0; }


        .iam-wyc-txt b { font-size: 11.5px; font-weight: 600; color: #0f172a; white-space: nowrap; }


        .iam-wyc-txt i { font-style: normal; font-size: 9.5px; color: #6b7280; }


        .iam-wyc-txt { padding-right: 12px; }


        .iam-wyc-badges { margin-left: auto; position: relative; flex: none; }


        .iam-wyc-due { display: inline-flex; padding: 3px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; color: #b45309; background: #fef3c7; box-shadow: inset 0 0 0 1px #fde68a; white-space: nowrap; }


        .iam-wyc-ok { position: absolute; inset: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: 999px; font-size: 9px; font-weight: 700; color: #047857; background: #ecfdf5; box-shadow: inset 0 0 0 1px #a7f3d0; white-space: nowrap; opacity: 0; }


        .iam-wyc-ok svg { width: 8px; height: 8px; }


        .iam-wyc-chase { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; background: #fff; border: 1px solid #e3e7f3; border-radius: 999px; box-shadow: 0 6px 16px -10px rgba(17, 24, 39, 0.25); font-size: 10.5px; font-weight: 600; color: #374151; opacity: 0; transform: translateY(8px); }


        .iam-wyc-mark { width: 15px; height: 15px; flex: none; display: grid; place-items: center; }


        .iam-wyc-mark img { width: 13px; height: 13px; }


        .iam-wyc-sent { width: 15px; height: 15px; flex: none; border-radius: 50%; background: #4c6cff; color: #fff; display: flex; align-items: center; justify-content: center; transform: scale(0); }


        .iam-wyc-sent svg { width: 8px; height: 8px; }


        .iam-wyc-row { opacity: 0; transform: translateY(-8px); }


        .wy-on .iam-wyc-row { animation: iamWycRow 7s ease-in-out infinite; }


        .wy-on .iam-wyc-chase { animation: iamWycChase 7s ease-in-out infinite; }


        .wy-on .iam-wyc-due { animation: iamWycDue 7s ease-in-out infinite, iamWycPulse 1.3s ease-in-out infinite; }


        .wy-on .iam-wyc-ok { animation: iamWycOk 7s cubic-bezier(0.2, 0.9, 0.3, 1.4) infinite; }


        .wy-on .iam-wyc-sent { animation: iamWycSent 7s cubic-bezier(0.2, 0.9, 0.3, 1.4) infinite; }


        @keyframes iamWycSent { 0%, 30% { transform: scale(0); } 36%, 94% { transform: scale(1); } 99%, 100% { transform: scale(0); } }


        @keyframes iamWycRow { 0% { opacity: 0; transform: translateY(-8px); } 5%, 95% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; transform: translateY(-8px); } }


        @keyframes iamWycChase { 0%, 12% { opacity: 0; transform: translateY(8px); } 18%, 94% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; } }


        @keyframes iamWycDue { 0%, 50% { opacity: 1; } 56%, 94% { opacity: 0; } 99%, 100% { opacity: 1; } }


        @keyframes iamWycPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }


        @keyframes iamWycOk { 0%, 50% { opacity: 0; transform: scale(0.6); } 57%, 94% { opacity: 1; transform: scale(1); } 99%, 100% { opacity: 0; transform: scale(0.6); } }



        /* why-askpilot card 3: proactive WhatsApp update to the landlord + reply.
           Page-scoped stage (iam-wyl); same .wy-on gate and 7s rhythm. */
        .iam-wyl { display: flex; align-items: center; justify-content: center; height: 100%; padding: 16px; }


        .iam-wyl-card { width: 226px; background: #fff; border: 1px solid #e3e7f3; border-radius: 13px; box-shadow: 0 10px 24px -12px rgba(17, 24, 39, 0.35); overflow: hidden; }


        .iam-wyl-head { display: flex; align-items: center; gap: 6px; padding: 8px 11px; border-bottom: 1px solid #e3efe9; background: #f0fdf4; font-size: 10.5px; }


        .iam-wyl-head img { width: 13px; height: 13px; }


        .iam-wyl-head b { font-weight: 700; color: #0f172a; }


        .iam-wyl-head i { font-style: normal; color: #6b7280; font-size: 9.5px; margin-left: auto; }


        .iam-wyl-thread { display: flex; flex-direction: column; gap: 7px; padding: 10px 11px 12px; background: radial-gradient(rgba(37, 211, 102, 0.05) 1px, transparent 1px) 0 0 / 14px 14px, #f6faf7; }


        .iam-wyl-bub { max-width: 88%; padding: 6px 8px 5px; border-radius: 9px; font-size: 10.5px; line-height: 1.45; color: #1f2937; box-shadow: 0 1px 1px rgba(15, 23, 42, 0.06); opacity: 0; transform: translateY(6px); }


        .iam-wyl-bub.is-out { align-self: flex-end; background: #d9fdd3; border: 1px solid #c2ecba; border-top-right-radius: 3px; }


        .iam-wyl-bub.is-in { align-self: flex-start; background: #fff; border: 1px solid #e6e9f0; border-top-left-radius: 3px; }


        .iam-wyl-time { display: inline-flex; align-items: center; gap: 2px; float: right; margin: 3px 0 0 6px; font-size: 8px; color: #94a3b8; }


        .iam-wyl-time svg { width: 11px; height: 8px; fill: none; stroke: #34b7f1; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }


        .wy-on .iam-wyl-bub.is-out { animation: iamWylOut 7s ease-in-out infinite; }


        .wy-on .iam-wyl-bub.is-in { animation: iamWylIn 7s ease-in-out infinite; }


        @keyframes iamWylOut { 0%, 6% { opacity: 0; transform: translateY(6px); } 12%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }


        @keyframes iamWylIn { 0%, 38% { opacity: 0; transform: translateY(6px); } 45%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }



        @media (prefers-reduced-motion: reduce) {
            .iam-wyc-row, .iam-wyc-chase, .iam-wyl-bub { opacity: 1; transform: none; }
            .iam-wyc-due { opacity: 0; }
            .iam-wyc-ok, .iam-wyc-sent { opacity: 1; transform: none; }
            .wy-on .iam-wyc-row, .wy-on .iam-wyc-chase, .wy-on .iam-wyc-due, .wy-on .iam-wyc-ok, .wy-on .iam-wyc-sent,
            .wy-on .iam-wyl-bub.is-out, .wy-on .iam-wyl-bub.is-in { animation: none; }
        }



        /* onboarding section (ported from the index .onb band) */
        .iam-onb-tag { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: #EEF2FE; border: 1px solid #CBD8FC; border-radius: 999px; font-size: 0.875rem; font-weight: 700; color: #4c6cff; }


        .iam-onb-tag svg { width: 15px; height: 15px; flex: none; }


        .iam-onb-tag s { font-weight: 600; color: #8A8494; }


        .iam-onb-steps { list-style: none; margin: 46px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }


        .iam-onb-step { background: #fff; border: 1px solid #16121A; border-radius: 20px; padding: 26px 24px 28px; box-shadow: 0 1px 2px rgba(22, 18, 26, 0.03); }


        .iam-onb-num { display: inline-grid; place-items: center; min-width: 40px; height: 40px; border-radius: 999px; background: #FFF3FF; border: 1px solid #FFD9FF; font-size: 0.8125rem; font-weight: 800; color: #D53BD5; margin-bottom: 18px; }


        .iam-onb-step h3 { font-size: 1.25rem; font-weight: 600; color: #16121A; letter-spacing: -0.01em; margin: 0 0 8px; }


        .iam-onb-step p { font-size: 0.9375rem; line-height: 1.55; color: #4E4854; margin: 0; }


        .iam-onb-mark { background-color: transparent; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M2 6.5 L98 2.5' fill='none' stroke='%23D53BD5' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left bottom; background-size: 100% 6px; padding-bottom: 5px; color: #16121A; font-weight: 700; -webkit-box-decoration-break: clone; box-decoration-break: clone; }


        .iam-onb-after { margin-top: 18px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; background: #FFF3FF; border: 1px solid #16121A; border-radius: 24px; padding: 44px 48px; }


        .iam-onb-after-label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #D53BD5; margin: 0 0 12px; }


        .iam-onb-after h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 600; line-height: 1.22; letter-spacing: -0.018em; color: #16121A; margin: 0 0 12px; }


        .iam-onb-after-p { font-size: 1rem; line-height: 1.55; color: #4E4854; margin: 0; }


        .iam-onb-demo { display: grid; gap: 12px; justify-items: start; }


        .iam-onb-input { display: flex; align-items: center; gap: 16px; width: 100%; background: #fff; border: 1px solid #EAE3E1; border-radius: 16px; padding: 16px 16px 16px 20px; box-shadow: 0 10px 30px -18px rgba(122, 38, 122, 0.35); }


        .iam-onb-text { font-size: 0.9375rem; font-weight: 500; color: #16121A; line-height: 1.5; }


        .iam-onb-send { flex: none; width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: #16121A; color: #fff; font-size: 0.9375rem; font-weight: 700; }


        .iam-onb-done { display: inline-flex; align-items: center; gap: 7px; font-size: 0.8125rem; font-weight: 700; color: #1F6B49; background: #E3F5EA; border-radius: 999px; padding: 6px 13px; }


        @media (max-width: 1000px) { .iam-onb-steps { grid-template-columns: repeat(2, 1fr); } }


        @media (max-width: 900px) { .iam-onb-after { grid-template-columns: 1fr; gap: 28px; padding: 32px 26px; } }


        @media (max-width: 560px) { .iam-onb-steps { grid-template-columns: 1fr; } }



        /* announcement section: the iamproperty article as a clickable citation card */
        .iam-cite { transition: transform 0.18s ease, box-shadow 0.18s ease; }


        .iam-cite:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -16px rgba(22, 18, 26, 0.4); }


        .iam-cite-ico { width: 42px; height: 42px; flex: none; border-radius: 11px; background: #fff; border: 1px solid #eef0f5; display: grid; place-items: center; }


        .iam-cite-ico img { width: 24px; height: 24px; }


        .iam-cite-arrow { width: 18px; height: 18px; flex: none; color: #9ca3af; margin-left: 2px; transition: color 0.18s ease, transform 0.18s ease; }


        .iam-cite:hover .iam-cite-arrow { color: #16121a; transform: translate(1px, -1px); }
