/* Lamplight Commerce — front-end styles (checkout, account, coach). Shares design tokens with the theme; has fallbacks for other themes. */
:root {
  --llc-gold: #D9A441; --llc-gold-soft: #F3E3C0; --llc-dusk: #4C7A94; --llc-night: #1F3A4B; --llc-mist: #A9C6D6; --llc-mist-soft: #E4EEF3; --llc-cream: #FBF7F0; --llc-cream-2: #F4EDE0; --llc-muted: #5B6F7B;
}

/* Checkout button */
.ll-checkout { display: inline-block; max-width: 100%; }
.ll-checkout__consent { margin-top: 0.9rem; background: var(--llc-mist-soft); border-radius: 14px; padding: 1rem 1.1rem; text-align: left; font-size: 0.93rem; }
.ll-checkout__consent .ll-consent { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.8rem; }
.ll-checkout__consent .ll-consent input { margin-top: 0.3rem; }
.ll-checkout__msg:empty { display: none; }
.ll-price-card .ll-checkout { display: block; }

/* Account */
.ll-account { display: grid; grid-template-columns: 300px 1fr; gap: 1.6rem; align-items: start; }
@media (max-width: 860px) { .ll-account { grid-template-columns: 1fr; } .ll-account__aside { order: 2; } }
.ll-account__aside { display: grid; gap: 1.2rem; }
.ll-progress { height: 8px; background: var(--llc-mist-soft); border-radius: 999px; overflow: hidden; margin: 1rem 0; }
.ll-progress span { display: block; height: 100%; width: 35%; background: linear-gradient(90deg, var(--llc-dusk), var(--llc-gold)); border-radius: 999px; animation: ll-slide 1.6s ease-in-out infinite; }
@keyframes ll-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.ll-plan-status[data-status="failed"] .ll-progress { display: none; }

/* Plan document */
.ll-plan-doc__header { border-bottom: 2px solid var(--llc-gold); padding-bottom: 1rem; margin-bottom: 1.2rem; }
.ll-plan-doc__header h2 { margin-bottom: 0.2rem; }
.ll-plan-doc__body h2 { font-size: 1.5rem; margin-top: 2rem; border-bottom: 1px solid var(--llc-mist-soft); padding-bottom: 0.3rem; }
.ll-plan-doc__body h3 { font-size: 1.2rem; margin-top: 1.4rem; }
.ll-plan-doc__body blockquote { font-size: 1.05em; }

/* Coach */
.ll-coach { background: #fff; border: 1px solid rgba(169,198,214,0.5); border-radius: 22px; box-shadow: 0 10px 30px rgba(31,58,75,0.08); overflow: hidden; }
.ll-coach__head { display: flex; align-items: center; gap: 0.9rem; padding: 1rem 1.2rem; background: var(--llc-night); color: var(--llc-cream); }
.ll-coach__head strong { font-family: Fraunces, Georgia, serif; font-size: 1.15rem; }
.ll-coach__status { font-size: 0.82rem; color: var(--llc-mist); }
.ll-coach__avatar { width: 44px; height: 44px; flex: none; }
.ll-coach__avatar svg { width: 100%; height: 100%; }
.ll-coach__reset { margin-left: auto; color: var(--llc-mist) !important; border-color: rgba(169,198,214,0.5) !important; background: transparent !important; }
.ll-coach__reset:hover { background: rgba(255,255,255,0.08) !important; color: #fff !important; }
.ll-coach__disclaimer { background: var(--llc-gold-soft); color: var(--llc-night); font-size: 0.85rem; padding: 0.55rem 1.2rem; }
.ll-coach__log { padding: 1.2rem; display: flex; flex-direction: column; gap: 0.8rem; min-height: 340px; max-height: 62vh; overflow-y: auto; scroll-behavior: smooth; }
.ll-msg { max-width: 86%; padding: 0.8rem 1.05rem; border-radius: 18px; line-height: 1.55; font-size: 1rem; }
.ll-msg p { margin: 0 0 0.6em; }
.ll-msg p:last-child, .ll-msg ul:last-child, .ll-msg ol:last-child { margin-bottom: 0; }
.ll-msg ul, .ll-msg ol { padding-left: 1.2em; margin: 0.4em 0; }
.ll-msg h2, .ll-msg h3, .ll-msg h4 { font-size: 1.02em; margin: 0.8em 0 0.3em; }
.ll-msg--user { align-self: flex-end; background: var(--llc-dusk); color: #fff; border-bottom-right-radius: 5px; }
.ll-msg--coach { align-self: flex-start; background: var(--llc-cream-2); color: var(--llc-night); border-bottom-left-radius: 5px; }
.ll-msg--coach strong { color: #3B6178; font-weight: 500; }
.ll-msg--flagged { border: 2px solid #A94442; }
.ll-msg--error { align-self: center; background: #F8E9E8; color: #A94442; font-size: 0.92rem; }
.ll-msg--typing { align-self: flex-start; background: var(--llc-cream-2); color: var(--llc-muted); font-style: italic; }
.ll-msg--typing::after { content: "…"; animation: ll-dots 1.2s steps(4, end) infinite; }
@keyframes ll-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.ll-coach__form { display: flex; gap: 0.6rem; padding: 0.9rem 1.2rem 0.4rem; border-top: 1px solid var(--llc-mist-soft); align-items: flex-end; }
.ll-coach__form textarea { flex: 1; font: inherit; font-weight: 300; padding: 0.7rem 0.9rem; border-radius: 14px; border: 1.5px solid var(--llc-mist); resize: none; min-height: 52px; max-height: 180px; }
.ll-coach__form textarea:focus { outline: none; border-color: var(--llc-dusk); box-shadow: 0 0 0 3px rgba(76,122,148,0.18); }
.ll-coach__hint { padding: 0 1.2rem 0.9rem; margin: 0; }
.ll-coach__log[aria-busy="true"] .ll-coach__form button { opacity: 0.6; }

/* Embedded (Copilot Studio) agent */
.ll-coach__embed { min-height: 560px; }
.ll-coach__embed iframe { width: 100%; height: 600px; border: 0; display: block; }
.ll-coach__embed #ll-webchat { height: 600px; }
.ll-coach__embed #ll-webchat:empty { height: 0; }
.ll-coach__canvas-msg { padding: 2.5rem 1.2rem; text-align: center; margin: 0; }
.ll-coach__canvas-msg.is-error { color: #A94442; }

/* Generic bits when the Lamplight theme is NOT active (the theme adds body.lamplight and styles these itself) */
body:not(.lamplight) .ll-btn { display: inline-block; font-weight: 500; text-decoration: none; padding: 0.85rem 1.6rem; border-radius: 999px; border: 2px solid var(--llc-dusk); background: var(--llc-dusk); color: #fff; cursor: pointer; }
body:not(.lamplight) .ll-btn--gold { background: var(--llc-gold); border-color: var(--llc-gold); color: var(--llc-night); }
body:not(.lamplight) .ll-btn--ghost { background: transparent; color: var(--llc-dusk); }
body:not(.lamplight) .ll-btn--sm { font-size: 0.9rem; padding: 0.55rem 1.1rem; }
body:not(.lamplight) .ll-btn--lg { font-size: 1.1rem; padding: 1rem 2.1rem; }
body:not(.lamplight) .ll-btn--block { display: block; width: 100%; text-align: center; }
body:not(.lamplight) .ll-card { background: #fff; border-radius: 18px; padding: 1.5rem; border: 1px solid var(--llc-mist-soft); }
body:not(.lamplight) .ll-wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
body:not(.lamplight) .ll-narrow { max-width: 760px; }
body:not(.lamplight) .ll-grid { display: grid; gap: 1.5rem; }
body:not(.lamplight) .ll-grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
body:not(.lamplight) .ll-check { list-style: none; padding: 0; }
body:not(.lamplight) .ll-check li { padding-left: 1.5rem; position: relative; }
body:not(.lamplight) .ll-check li::before { content: "\2713"; position: absolute; left: 0; color: var(--llc-gold); }
.ll-btn[disabled], .ll-btn.is-loading { opacity: 0.6; cursor: progress; }

/* Three-tier pricing */
body.lamplight .ll-pricing--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1140px; }
@media (max-width: 960px) { body.lamplight .ll-pricing--3 { grid-template-columns: 1fr; max-width: 520px; } }

/* ---------- Text & email coaching card ---------- */
.ll-channels .ll-channel { padding: .85rem 0; border-top: 1px solid var(--llc-mist-soft); }
.ll-channels .ll-channel strong { display: block; margin-bottom: .25rem; }
.ll-channels .ll-channel__status { margin: 0 0 .6rem; font-size: .92rem; color: var(--llc-muted); }
.ll-channels .ll-channel__form { display: grid; gap: .6rem; margin: .4rem 0 .6rem; }
.ll-channels .ll-channel__form[hidden] { display: none; }
.ll-channels .ll-channel__form input[type=tel],
.ll-channels .ll-channel__form input[type=text] { width: 100%; padding: .6rem .75rem; border: 1px solid var(--llc-mist-soft); border-radius: 10px; font: inherit; }
.ll-channels .ll-consent-row { display: flex; gap: .5rem; align-items: flex-start; font-size: .85rem; line-height: 1.4; color: var(--llc-muted); }
.ll-channels .ll-consent-row input { margin-top: .2rem; flex: none; }
.ll-channels .ll-channel__msg.is-error { color: #A94442; }
