/* Motivo contact form and protected platform inbox. Theme-aware release v5. */

/* Public contact page */
.contact-page { display:flex;flex-direction:column;gap:42px;padding:36px 0 48px; }
.contact-intro { margin-bottom:0; }
.contact-intro h1 { margin:16px 0 20px;line-height:1.15; }
.contact-intro p { max-width:650px;line-height:1.8; }
.motivo-contact-form { display:flex;flex-direction:column;gap:24px;box-sizing:border-box;width:100%;max-width:760px;min-width:0;margin:0 auto;padding:40px;border:1px solid rgba(44,119,76,.35);border-radius:20px;background:rgba(231,246,232,.93);box-shadow:0 18px 42px rgba(7,39,24,.07);color:#163b2b; }
.motivo-contact-form h2 { margin:0;color:inherit;font-size:1.5rem;line-height:1.3; }
.motivo-contact-form p { margin:0;line-height:1.75; }
.motivo-contact-form .contact-form-description { max-width:620px; }
.motivo-contact-form > label, .motivo-contact-form .contact-grid > label { display:flex;flex-direction:column;gap:10px;min-width:0;margin:0;color:inherit;font-size:.9rem;font-weight:650;line-height:1.5; }
.motivo-contact-form .contact-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px; }
.motivo-contact-form input:not([type="checkbox"]),.motivo-contact-form select,.motivo-contact-form textarea { box-sizing:border-box;width:100%;min-width:0;min-height:48px;padding:14px 16px;border:1px solid #91b6a0;border-radius:10px;background:#fff;color:#152b20;font:inherit;line-height:1.5; }
.motivo-contact-form textarea { min-height:180px;resize:vertical; }
.motivo-contact-form input:focus-visible,.motivo-contact-form select:focus-visible,.motivo-contact-form textarea:focus-visible { outline:3px solid #4dab7b;outline-offset:2px; }
/* Fixed privacy grid prevents the global label/input rules from squeezing consent. */
.motivo-contact-form .contact-privacy { display:grid!important;grid-template-columns:20px minmax(0,1fr)!important;align-items:start!important;justify-content:start!important;gap:14px!important;width:100%;min-width:0;margin:0;padding:0; }
.motivo-contact-form .contact-privacy input[type="checkbox"] { display:block!important;grid-column:1;grid-row:1;box-sizing:border-box;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;margin:4px 0 0!important;padding:0!important;accent-color:#2b765a;cursor:pointer; }
.motivo-contact-form .contact-privacy label { display:block!important;grid-column:2;grid-row:1;width:auto!important;min-width:0!important;max-width:none!important;margin:0!important;padding:0!important;color:inherit;font-size:.9rem;font-weight:400;line-height:1.75;text-align:left;overflow-wrap:break-word;cursor:pointer; }
/* Also support the earlier label-based privacy markup, if still deployed. */
.motivo-contact-form label.privacy-line { display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:14px!important;width:100%;font-weight:400;line-height:1.75; }
.motivo-contact-form label.privacy-line input[type="checkbox"] { flex:0 0 20px!important;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;margin:4px 0 0!important;padding:0!important;accent-color:#2b765a; }
.motivo-contact-form label.privacy-line span { flex:1 1 auto;min-width:0;width:auto!important;max-width:none!important; }
.motivo-contact-form a { color:#155d3a;text-decoration:underline;text-underline-offset:3px; }
.motivo-contact-form button[type="submit"] { align-self:flex-start;min-height:48px;margin:4px 0 0;padding:14px 26px;border:0;border-radius:11px;background:#215f42;color:#fff;font:inherit;font-weight:700;cursor:pointer; }
.motivo-contact-form button[type="submit"]:hover { background:#194b34; }
.motivo-contact-form button[type="submit"]:focus-visible,.motivo-contact-form .contact-privacy input:focus-visible { outline:3px solid #4dab7b;outline-offset:3px; }
.motivo-contact-form button[type="submit"]:disabled { opacity:.6;cursor:wait; }
.motivo-contact-form .feedback { min-height:24px;margin:0;font-weight:600;line-height:1.6; }
.motivo-contact-form .contact-hp { position:absolute!important;left:-9999px!important;opacity:0!important;pointer-events:none!important; }
.contact-page .contact-layout { margin-top:24px; }
.contact-page .contact-details { gap:36px; }
.contact-page .contact-detail { padding:12px 0; }
.contact-page .contact-detail h2 { margin:0 0 20px;line-height:1.3; }
.contact-page .contact-detail p { max-width:600px;margin:0 0 20px;line-height:1.85; }
.contact-page .contact-detail p:last-child { margin-bottom:0; }
.contact-page .overview-feature-image { margin-top:16px; }
.contact-page .overview-feature-image img { display:block;width:100%;height:auto;border-radius:16px; }
.contact-page .overview-feature-image figcaption { margin-top:14px;line-height:1.6; }
body.dark-mode .motivo-contact-form { background:rgba(12,39,27,.95);border-color:rgba(102,183,126,.44);color:#e7f6eb; }
body.dark-mode .motivo-contact-form input:not([type="checkbox"]),body.dark-mode .motivo-contact-form select,body.dark-mode .motivo-contact-form textarea { background:#132f22;color:#f2fff4;border-color:#567e60; }
body.dark-mode .motivo-contact-form a { color:#a0ebba; }

/* Developer inbox - base layout; adopts the actual console v15 theme tokens. */
.platform-inbox-controls { display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin:20px 0 28px; }
.platform-inbox-controls select,.platform-inbox-controls input { max-width:260px; }
.contact-inbox-list { display:grid;gap:20px; }
.contact-inbox-item { padding:24px;border-radius:14px;border:1px solid var(--c15-border,#a4c0ae);background:var(--c15-surface,#f1f6f1);color:var(--c15-ink,#22362c); }
.contact-inbox-item h3 { margin:12px 0;line-height:1.4; }
.contact-inbox-item p { margin:12px 0;line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere; }
.contact-inbox-item .meta { font-size:.85rem;line-height:1.6;opacity:1; }
.contact-inbox-item .inbox-actions { display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:20px; }
.contact-inbox-item textarea { box-sizing:border-box;width:100%;max-width:100%;min-height:100px;margin-top:14px;padding:12px 14px;resize:vertical;line-height:1.6; }
.contact-inbox-item button { margin:0; }
.contact-inbox-item a { overflow-wrap:anywhere; }

/* Specific enough to beat older platform.css and platform-comfort rules. */
html body.motivo-console-v15 #page-contact {
  color:var(--c15-ink)!important;
}
html body.motivo-console-v15 #page-contact > .panel {
  background:var(--c15-panel)!important;
  border-color:var(--c15-border)!important;
  color:var(--c15-ink)!important;
}
html body.motivo-console-v15 #page-contact .section-header h2,
html body.motivo-console-v15 #page-contact .section-header p,
html body.motivo-console-v15 #contactInboxCount,
html body.motivo-console-v15 #contactInboxFeedback {
  color:var(--c15-ink)!important;
  opacity:1!important;
}
html body.motivo-console-v15 #page-contact .section-header p,
html body.motivo-console-v15 #contactInboxCount { color:var(--c15-subtle)!important; }
html body.motivo-console-v15 .contact-inbox-list { gap:20px; }
html body.motivo-console-v15 .contact-inbox-item {
  background:var(--c15-surface)!important;
  color:var(--c15-ink)!important;
  border:1px solid var(--c15-border)!important;
  border-radius:16px;
  padding:26px;
  box-shadow:none!important;
}
html body.motivo-console-v15 .contact-inbox-item h3,
html body.motivo-console-v15 .contact-inbox-item p:not(.meta) { color:var(--c15-ink)!important;opacity:1!important; }
html body.motivo-console-v15 .contact-inbox-item .meta { color:var(--c15-subtle)!important;opacity:1!important; }
html body.motivo-console-v15 .contact-inbox-item textarea,
html body.motivo-console-v15 .contact-inbox-item select,
html body.motivo-console-v15 .platform-inbox-controls select,
html body.motivo-console-v15 .platform-inbox-controls input {
  background:var(--c15-panel)!important;
  color:var(--c15-ink)!important;
  border:1px solid var(--c15-border)!important;
  border-radius:10px;
}
html body.motivo-console-v15 .contact-inbox-item textarea::placeholder,
html body.motivo-console-v15 .platform-inbox-controls input::placeholder { color:var(--c15-faint)!important;opacity:1; }
html body.motivo-console-v15 .contact-inbox-item :is(textarea,select):focus-visible,
html body.motivo-console-v15 .platform-inbox-controls :is(input,select):focus-visible {
  outline:2px solid var(--c15-focus)!important;outline-offset:2px;
}
/* Fix extremely faint console headings shown in the screenshot, on both themes. */
html body.motivo-console-v15 .pageheading h1 { color:var(--c15-ink)!important;opacity:1!important; }
html body.motivo-console-v15 .pageheading .eyebrow { color:var(--c15-accent)!important;opacity:1!important; }
html body.motivo-console-v15 .pageheading p { color:var(--c15-subtle)!important;opacity:1!important; }
html body.motivo-console-v15 .pageheading p span { color:var(--c15-ink)!important; }
html body.motivo-console-v15 .tabs .tab:not(.selected) { color:var(--c15-subtle)!important;opacity:1!important; }
html body.motivo-console-v15 .tabs .tab.selected { color:var(--c15-ink)!important; }
/* Slightly soften the light setting, while respecting the actual dark theme setting. */
html[data-console-theme="light"] body.motivo-console-v15 #page-contact .contact-inbox-item { background:#eff5f0!important; }
html[data-console-theme="dark"] body.motivo-console-v15 #page-contact .contact-inbox-item { background:#20342d!important;border-color:#395548!important; }
html[data-console-theme="dark"] body.motivo-console-v15 #page-contact .contact-inbox-item :is(textarea,select) { background:#182824!important;color:#dde9e0!important;border-color:#395548!important; }

@media(max-width:640px) {
  .contact-page { gap:28px;padding:24px 0 32px; }
  .motivo-contact-form { gap:20px;padding:26px 20px;border-radius:16px; }
  .motivo-contact-form .contact-grid { grid-template-columns:1fr;gap:20px; }
  .motivo-contact-form button[type="submit"] { width:100%;align-self:stretch; }
  .motivo-contact-form .contact-privacy { gap:12px!important; }
  .contact-page .contact-layout { margin-top:12px; }
  .contact-page .contact-details { gap:24px; }
  .contact-page .overview-feature-image { margin-top:8px; }
  .platform-inbox-controls { flex-direction:column;align-items:stretch; }
  .platform-inbox-controls select,.platform-inbox-controls input { width:100%;max-width:none; }
  .contact-inbox-item { padding:20px; }
  html body.motivo-console-v15 .contact-inbox-item { padding:20px; }
}
@media(prefers-reduced-motion:reduce) {
  .motivo-contact-form *,.contact-inbox-item * { scroll-behavior:auto;transition-duration:.01ms;animation-duration:.01ms; }
}

/* ==========================================================
   Motivo developer console - full DIM canvas v6
   Scoped to Display > Dim; System/Light remain unchanged.
   ========================================================== */
html[data-console-theme="dark"] {
  background: #0c1713 !important;
  color-scheme: dark;
}
html[data-console-theme="dark"] body.motivo-console-v15 {
  --c15-bg: #0c1713;
  --c15-panel: #15251f;
  --c15-surface: #1b3027;
  --c15-elevated: #22392e;
  --c15-topbar: #111e19;
  --c15-border: #334d3e;
  --c15-divider: #2b4236;
  --c15-ink: #e7f1e9;
  --c15-subtle: #b8d0c0;
  --c15-faint: #a3bdac;
  --c15-hover: #264334;
  --c15-shadow: 0 8px 28px rgba(0,0,0,.13);
  background: #0c1713 !important;
  background-image: none !important;
  color: var(--c15-ink) !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 main,
html[data-console-theme="dark"] body.motivo-console-v15 #workspace,
html[data-console-theme="dark"] body.motivo-console-v15 #page-contact {
  background: transparent !important;
  color: var(--c15-ink) !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 #page-contact > .panel {
  background: #15251f !important;
  border-color: #334d3e !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 #page-contact .contact-inbox-item {
  background: #1b3027 !important;
  border-color: #3a5a47 !important;
  color: #e7f1e9 !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 #page-contact :is(h2,h3,p,span,label) {
  color: #e7f1e9;
}
html[data-console-theme="dark"] body.motivo-console-v15 #page-contact :is(.meta,#contactInboxCount,.section-header p) {
  color: #b8d0c0 !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 #page-contact :is(input,select,textarea) {
  background: #111f19 !important;
  border-color: #43604d !important;
  color: #eef6f0 !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 #page-contact :is(input,textarea)::placeholder {
  color: #a8bdae !important;
  opacity: 1;
}


/* ===============================================================
   Motivo Developer Console / Theme Repair v9
   Keep the public contact form unchanged. Override only the
   developer dashboard, keyed to the existing theme controller.
   =============================================================== */

/* Restore the original airy LIGHT console when System resolves to
   light, or the visitor explicitly selects Light. Earlier releases
   accidentally painted dark surfaces even with a pale canvas. */
html[data-console-theme="light"] {
  color-scheme: light;
  background: #edf2ee !important;
}
html[data-console-theme="light"] body.motivo-console-v15 {
  --c15-bg: #edf2ee;
  --c15-ink: #22362c;
  --c15-subtle: #526a5b;
  --c15-faint: #63796b;
  --c15-panel: #f8fbf8;
  --c15-surface: #f1f6f1;
  --c15-elevated: #fff;
  --c15-border: #d1ded3;
  --c15-divider: #dfebe1;
  --c15-topbar: #e6efe8;
  --c15-shadow: 0 6px 20px rgba(21,52,35,.045);
  color: var(--c15-ink) !important;
  background: #edf2ee !important;
  background-image: none !important;
}
html[data-console-theme="light"] body.motivo-console-v15 :is(.panel,.metric,.drawer,.drawer-header,dialog.confirm) {
  background: #f8fbf8 !important;
  background-image: none !important;
  border-color: #d1ded3 !important;
  color: #22362c !important;
  box-shadow: 0 6px 20px rgba(21,52,35,.045) !important;
}
html[data-console-theme="light"] body.motivo-console-v15 :is(.footprint > div,.mini-metrics > div,.contact-inbox-item) {
  background: #f1f6f1 !important;
  border: 1px solid #d1ded3 !important;
  color: #22362c !important;
}
html[data-console-theme="light"] body.motivo-console-v15 :is(.pageheading h1,.pageheading p,.pageheading p span,.eyebrow,.tab,.metric strong,.panel h2,.panel h3,.contact-inbox-item h3) {
  color: #22362c !important;
  opacity: 1 !important;
}
html[data-console-theme="light"] body.motivo-console-v15 :is(.tab:not(.selected),.section-header p,.metric span,.metric small,.contact-inbox-item .meta) {
  color: #526a5b !important;
  opacity: 1 !important;
}
html[data-console-theme="light"] body.motivo-console-v15 :is(input,select,textarea) {
  background: #fff !important;
  color: #22362c !important;
  border-color: #c9d8ce !important;
}

/* DIM is a full canvas treatment, not just dark cards on a light page. */
html[data-console-theme="dark"] {
  background: #0c1915 !important;
  color-scheme: dark;
  min-height: 100%;
}
html[data-console-theme="dark"] body.motivo-console-v15 {
  --c15-bg: #0c1915;
  --c15-ink: #edf7f0;
  --c15-subtle: #bfd5c5;
  --c15-faint: #b1c9b9;
  --c15-panel: rgba(27,57,42,.66);
  --c15-surface: rgba(47,88,63,.51);
  --c15-elevated: rgba(52,94,67,.69);
  --c15-border: rgba(174,219,183,.32);
  --c15-divider: rgba(174,219,183,.24);
  --c15-hover: rgba(93,147,108,.28);
  --c15-topbar: rgba(12,31,24,.88);
  --c15-shadow: 0 12px 32px rgba(0,0,0,.16);
  color: var(--c15-ink) !important;
  min-height: 100vh;
  background: radial-gradient(ellipse at 82% 8%, rgba(49,119,73,.26) 0%, transparent 56%),
              radial-gradient(ellipse at 6% 90%, rgba(35,100,80,.21) 0%, transparent 58%),
              linear-gradient(150deg,#0b1814,#153427 54%,#0c1d18) !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 :is(main,#workspace,.page) {
  background: transparent !important;
  background-image: none !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 :is(.panel,.metric,.drawer,.drawer-header,dialog.confirm) {
  background: rgba(28,57,42,.67) !important;
  background-image: linear-gradient(145deg,rgba(242,255,244,.055),rgba(242,255,244,.008)) !important;
  border-color: var(--c15-border) !important;
  box-shadow: var(--c15-shadow), inset 0 1px rgba(255,255,255,.055) !important;
  color: var(--c15-ink) !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 :is(.footprint > div,.mini-metrics > div,.contact-inbox-item) {
  background: rgba(39,75,54,.56) !important;
  border: 1px solid var(--c15-border) !important;
  color: var(--c15-ink) !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 :is(.pageheading h1,.pageheading p,.pageheading p span,.eyebrow,.panel h2,.panel h3,.metric strong,.shop-label strong,.contact-inbox-item h3) {
  color: #edf7f0 !important;
  opacity: 1 !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 :is(.tab:not(.selected),.metric span,.metric small,.section-header p,.shop-label small,.contact-inbox-item .meta,#directoryCount) {
  color: #bfd5c5 !important;
  opacity: 1 !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 .tab.selected {
  background: rgba(43,85,59,.67) !important;
  color: #f3fff5 !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 :is(input,select,textarea) {
  background: rgba(10,29,21,.78) !important;
  color: #f1fcf3 !important;
  border-color: rgba(174,219,183,.40) !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 :is(input,textarea)::placeholder {
  color: #b5cebc !important;
  opacity: 1 !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 .contact-inbox-item :is(h3,p) {
  color: #f0faf2 !important;
}
html[data-console-theme="dark"] body.motivo-console-v15 :is(button,input,select,textarea,a):focus-visible {
  outline: 2px solid #b2e9c0 !important;
  outline-offset: 3px;
}
@media (max-width:640px) {
  html[data-console-theme="dark"] body.motivo-console-v15 {background-attachment: scroll !important;}
}
