/*
 * InPAT branch website — styles for the live dashboard sections (inpat-live.js), the demo frame, the portal and the
 * account forms. Same file on every site: each site sets its own colours, font and corner radius in its
 * site stylesheet or in /css/inpat-theme.css, through the variables below, so these sections match the site.
 */
:root {
  --il-brand: #1d4ed8;        /* buttons, links, accents */
  --il-brand-ink: #ffffff;    /* text on the brand colour */
  --il-accent: #f59e0b;       /* stars, small highlights */
  --il-text: #1f2937;
  --il-muted: #6b7280;
  --il-bg: #ffffff;           /* cards */
  --il-soft: #f3f4f6;         /* soft panels */
  --il-line: #e5e7eb;
  --il-radius: 14px;
  --il-font: inherit;
  --il-heading-font: inherit;
  --il-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

/* ---------- layout helpers ---------- */
.il-section { padding: clamp(40px, 6vw, 80px) 0; font-family: var(--il-font); color: var(--il-text); }
.il-section[hidden] { display: none !important; }
.il-wrap { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }
.il-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.il-head h2 { font-family: var(--il-heading-font); font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.2; margin: 0 0 10px; color: var(--il-text); }
.il-head p { color: var(--il-muted); margin: 0; font-size: 1.02rem; }
.il-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 22px; }
.il-grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 22px; }
.il-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.il-hidden, [data-live-show][hidden], [data-live][hidden], [data-cms-if][hidden] { display: none !important; }
template[data-live-item] { display: none !important; }

/* ---------- cards ---------- */
.il-card { background: var(--il-bg); border: 1px solid var(--il-line); border-radius: var(--il-radius); box-shadow: var(--il-shadow); overflow: hidden; color: var(--il-text); font-family: var(--il-font); text-align: left; }
.il-pad { padding: 22px; }
.il-card h3 { font-family: var(--il-heading-font); font-size: 1.12rem; line-height: 1.35; margin: 0 0 8px; color: var(--il-text); }
.il-card h3 a { color: inherit; text-decoration: none; }
.il-card h3 a:hover { color: var(--il-brand); }
.il-card p { margin: 0 0 10px; line-height: 1.6; color: var(--il-text); }
.il-eyebrow { font-size: 0.74rem !important; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--il-brand) !important; margin: 0 0 8px !important; }
.il-meta { font-size: 0.85rem !important; color: var(--il-muted) !important; }
.il-link { color: var(--il-brand); font-weight: 700; text-decoration: none; }
.il-link:hover { text-decoration: underline; }

/* ---------- buttons ---------- */
.il-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 20px; border-radius: var(--il-radius); border: 2px solid var(--il-brand); background: var(--il-brand); color: var(--il-brand-ink) !important; font: 700 0.95rem/1 var(--il-font); text-decoration: none !important; cursor: pointer; transition: transform 0.15s ease, opacity 0.15s ease; }
.il-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.il-btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.il-btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.85rem; }
.il-btn-ghost { background: transparent; color: var(--il-brand) !important; }
.il-btn-light { background: #fff; border-color: #fff; color: var(--il-brand) !important; }

/* ---------- reviews ---------- */
.il-quote { padding: 22px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.il-quote blockquote { margin: 0; }
.il-quote blockquote p { font-size: 0.98rem; }
.il-quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.il-quote figcaption img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.il-quote figcaption strong { display: block; }
.il-quote figcaption small { color: var(--il-muted); }
.il-stars { color: var(--il-accent); letter-spacing: 2px; }
.il-stars span { color: var(--il-line); }
.il-avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--il-brand); color: var(--il-brand-ink); font-weight: 800; flex: none; }

/* ---------- stories (YouTube) ---------- */
.il-video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.il-video iframe, .il-video .il-play, .il-video .il-play img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.il-play { padding: 0; border: 0; background: none; cursor: pointer; }
.il-play-btn { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%); border-radius: 12px; background: rgba(220, 38, 38, 0.92); }
.il-play-btn::after { content: ''; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }

/* ---------- posts (blog, news) ---------- */
.il-post { display: flex; flex-direction: column; }
.il-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--il-soft); }
.il-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.il-post:hover .il-cover img { transform: scale(1.03); }
.il-ticks { list-style: none; padding: 0; margin: 0 0 12px; }
.il-ticks li { position: relative; padding-left: 22px; margin: 4px 0; font-size: 0.92rem; }
.il-ticks li::before { content: '✓'; position: absolute; left: 0; color: var(--il-brand); font-weight: 800; }
.il-fee { font-weight: 800; font-size: 1.2rem !important; }
.il-fee s { font-weight: 500; font-size: 0.9rem; color: var(--il-muted); margin-left: 8px; }
.il-tags { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.il-tags li { font-size: 0.75rem; padding: 3px 10px; border-radius: 999px; background: var(--il-soft); color: var(--il-text); }

/* ---------- faculty, partners, stats, employers ---------- */
.il-person { text-align: center; }
.il-person-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; display: flex; font-size: 1.6rem; }
.il-person .il-tags { justify-content: center; }
.il-partner img { max-height: 56px; max-width: 160px; object-fit: contain; margin-bottom: 10px; }
.il-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.il-stat { text-align: center; padding: 18px; border-radius: var(--il-radius); background: var(--il-soft); }
.il-stat strong { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--il-brand); font-family: var(--il-heading-font); }
.il-stat span { color: var(--il-muted); font-size: 0.9rem; }
.il-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.il-chips li { padding: 8px 16px; border: 1px solid var(--il-line); border-radius: 999px; background: var(--il-bg); font-weight: 600; color: var(--il-text); }

/* ---------- FAQ ---------- */
.il-faq { max-width: 860px; margin: 0 auto; text-align: left; }
.il-faq-cat { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--il-brand); margin: 26px 0 10px; }
.il-faq details { background: var(--il-bg); border: 1px solid var(--il-line); border-radius: var(--il-radius); margin: 0 0 10px; padding: 0 18px; color: var(--il-text); }
.il-faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; position: relative; padding-right: 28px; }
.il-faq summary::-webkit-details-marker { display: none; }
.il-faq summary::after { content: '+'; position: absolute; right: 0; top: 12px; font-size: 1.4rem; color: var(--il-brand); }
.il-faq details[open] summary::after { content: '−'; }
.il-faq-a { padding: 0 0 16px; line-height: 1.65; }
.il-faq-a p { margin: 0 0 8px; }

/* ---------- image banners ---------- */
.il-imgbanner { position: relative; margin: 0 0 18px; border-radius: var(--il-radius); overflow: hidden; }
.il-imgbanner img { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.il-imgbanner figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); }
.il-imgbanner figcaption h3 { color: #fff; margin: 0 0 6px; }
.il-imgbanner figcaption p { margin: 0 0 10px; color: #fff; }

/* ---------- article (blog post, news item, policies) ---------- */
.il-article { max-width: 820px; margin: 0 auto; color: var(--il-text); font-family: var(--il-font); }
.il-article h1 { font-family: var(--il-heading-font); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; margin: 6px 0 10px; color: var(--il-text); }
.il-article-img { width: 100%; border-radius: var(--il-radius); margin: 18px 0; }
.il-back { color: var(--il-brand); text-decoration: none; font-weight: 700; }
.il-takeaways { background: var(--il-soft); border-left: 4px solid var(--il-brand); border-radius: var(--il-radius); padding: 16px 20px; margin: 18px 0; }
.il-takeaways h2 { font-size: 1.05rem; margin: 0 0 6px; }
.il-prose { line-height: 1.75; font-size: 1.03rem; }
.il-prose h2, .il-prose h3, .il-prose h4, .il-prose h5 { font-family: var(--il-heading-font); margin: 1.6em 0 0.5em; line-height: 1.3; color: var(--il-text); }
.il-prose p, .il-prose ul, .il-prose ol { margin: 0 0 1em; }
.il-prose ul, .il-prose ol { padding-left: 1.4em; }
.il-prose a { color: var(--il-brand); }
.il-cta { margin: 36px 0 0; padding: 22px; border-radius: var(--il-radius); background: var(--il-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.il-cta p { margin: 0 auto 0 0; font-weight: 700; }
.il-empty { text-align: center; padding: 40px 0; color: var(--il-muted); }

/* ---------- announcement bar + popup (sites without their own) ---------- */
.il-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding: 10px 48px 10px 16px; background: var(--il-brand); color: var(--il-brand-ink); font: 600 0.92rem/1.4 var(--il-font); position: relative; z-index: 1000; text-align: center; }
.il-banner p { margin: 0; color: inherit; }
.il-banner-close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent; color: inherit; font-size: 1.4rem; cursor: pointer; }
.il-popup { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, 0.55); }
.il-popup[hidden] { display: none; }
.il-popup-card { position: relative; width: min(480px, 100%); max-height: 90vh; overflow: auto; background: var(--il-bg); color: var(--il-text); border-radius: var(--il-radius); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3); font-family: var(--il-font); }
.il-popup-img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.il-popup-body { padding: 24px; }
.il-popup-body h2 { font-family: var(--il-heading-font); margin: 0 0 10px; font-size: 1.4rem; color: var(--il-text); }
.il-popup-body p { margin: 0 0 16px; line-height: 1.6; }
.il-popup-close { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: #111; font-size: 1.4rem; cursor: pointer; z-index: 1; }

/* ---------- forms ---------- */
.il-form-msg { margin: 10px 0 0; font-size: 0.92rem; font-weight: 600; }
.il-form-msg:empty { display: none; }
.il-form-msg.is-ok { color: #047857; }
.il-form-msg.is-error { color: #b91c1c; }
.il-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- demo frame page ---------- */
body.il-demo-page { margin: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; font-family: var(--il-font); }
.il-demo-bar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px clamp(10px, 2vw, 24px); background: var(--il-bg); border-bottom: 3px solid var(--il-brand); }
.il-demo-bar img { height: 38px; width: auto; }
.il-demo-title { margin: 0 auto 0 0; font-size: 1rem; font-weight: 700; color: var(--il-text); }
.il-demo-frame { flex: 1; width: 100%; min-height: 0; border: 0; display: block; background: #fff; }
.il-demo-nudge { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: min(360px, calc(100vw - 32px)); padding: 20px; background: var(--il-bg); color: var(--il-text); border: 1px solid var(--il-line); border-top: 4px solid var(--il-brand); border-radius: var(--il-radius); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2); }
.il-demo-nudge[hidden] { display: none; }
.il-demo-nudge h2 { margin: 0 0 6px; font-size: 1.15rem; }
.il-demo-nudge p { margin: 0 0 12px; color: var(--il-muted); }
.il-demo-nudge-close { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--il-text); }
@media (max-width: 640px) { .il-demo-title, .il-demo-bar .il-btn-ghost { display: none; } }

/* ---------- portal frame page (dynamic websites) ---------- */
.il-portal { display: flex; flex-direction: column; min-height: calc(100vh - 80px); }
.il-portal-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; background: var(--il-soft); }
.il-portal-tabs a { padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--il-text); font-weight: 600; font-size: 0.9rem; }
.il-portal-tabs a[aria-current] { background: var(--il-brand); color: var(--il-brand-ink); }
.il-portal-frame { flex: 1; width: 100%; min-height: calc(100vh - 140px); border: 0; }
.il-portal-msg { text-align: center; padding: 80px 20px; color: var(--il-text); font-family: var(--il-font); }
.il-portal-msg[hidden], .il-portal-frame[hidden] { display: none; }
.il-spinner { width: 40px; height: 40px; margin: 0 auto 16px; border-radius: 50%; border: 4px solid var(--il-line); border-top-color: var(--il-brand); animation: il-spin 0.9s linear infinite; }
@keyframes il-spin { to { transform: rotate(360deg); } }

/* ---------- account forms (login, sign-up, reset, profile) ---------- */
.il-auth { width: min(460px, calc(100% - 32px)); margin: clamp(30px, 6vw, 70px) auto; padding: clamp(22px, 4vw, 34px); background: var(--il-bg); border: 1px solid var(--il-line); border-radius: var(--il-radius); box-shadow: var(--il-shadow); font-family: var(--il-font); color: var(--il-text); }
.il-auth-wide { width: min(760px, calc(100% - 32px)); }
.il-auth h1 { font-family: var(--il-heading-font); font-size: 1.7rem; margin: 0 0 6px; color: var(--il-text); }
.il-auth > p { color: var(--il-muted); margin: 0 0 20px; }
.il-field { display: block; margin: 0 0 14px; }
.il-field span { display: block; font-weight: 700; font-size: 0.88rem; margin: 0 0 6px; }
.il-field input, .il-field select, .il-field textarea { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 14px; border: 1px solid var(--il-line); border-radius: calc(var(--il-radius) * 0.7); font: 400 1rem var(--il-font); color: var(--il-text); background: #fff; }
.il-field input:focus, .il-field select:focus, .il-field textarea:focus { outline: 2px solid var(--il-brand); outline-offset: 1px; border-color: var(--il-brand); }
.il-auth .il-btn { width: 100%; }
.il-auth-alt { text-align: center; margin: 16px 0 0; font-size: 0.92rem; color: var(--il-muted); }
.il-auth-alt a { color: var(--il-brand); font-weight: 700; }
.il-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--il-muted); font-size: 0.85rem; }
.il-divider::before, .il-divider::after { content: ''; flex: 1; height: 1px; background: var(--il-line); }
.il-google { width: 100%; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--il-line); border-radius: calc(var(--il-radius) * 0.7); background: #fff; font: 600 0.95rem var(--il-font); color: #1f2937; cursor: pointer; }
.il-google[hidden] { display: none; }
.il-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.il-tile { display: block; padding: 18px; border: 1px solid var(--il-line); border-radius: var(--il-radius); text-decoration: none; color: var(--il-text); background: var(--il-soft); }
.il-tile strong { display: block; color: var(--il-brand); margin-bottom: 4px; }
.il-account-chip { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- cart, checkout, toast (dynamic websites) ---------- */
.il-cart-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--il-line); font-family: var(--il-font); color: var(--il-text); }
.il-cart-row strong { display: block; }
.il-cart-row small { color: var(--il-muted); }
.il-cart-price { text-align: right; flex: none; }
.il-cart-price span { display: block; font-weight: 800; }
.il-cart-price button { border: 0; background: none; color: #b91c1c; font-size: 0.8rem; font-weight: 700; cursor: pointer; padding: 2px 0; }
.il-sum { display: flex; justify-content: space-between; margin: 6px 0; }
.il-sum[hidden] { display: none; }
.il-sum-total { font-size: 1.2rem; font-weight: 800; border-top: 1px solid var(--il-line); padding-top: 10px; margin-top: 10px; }
.il-toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 10001; padding: 12px 20px; border-radius: var(--il-radius); background: #111827; color: #fff; font: 600 0.92rem var(--il-font); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); transition: all 0.25s ease; }
.il-toast a { color: #fde68a; }
.il-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
[data-account-slot] { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.il-acc-link { font: 600 0.9rem var(--il-font); color: inherit; text-decoration: none; background: none; border: 0; cursor: pointer; padding: 6px 4px; }
.il-acc-link:hover { color: var(--il-brand); }
.il-acc-cta { padding: 8px 14px; border-radius: var(--il-radius); background: var(--il-brand); color: var(--il-brand-ink) !important; }
#t-stars button { border: 0; background: none; font-size: 1.6rem; color: var(--il-line); cursor: pointer; padding: 0 2px; }
#t-stars button.on { color: var(--il-accent); }
.il-profile-list { list-style: none; padding: 0; margin: 0; }
.il-profile-list li { padding: 10px 0; border-bottom: 1px solid var(--il-line); }
.il-pw-row { position: relative; }
.il-pw-row button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--il-brand); font-weight: 700; cursor: pointer; font-size: 0.8rem; }
