/* CMS components (from the Dev Solar CMS) - quote popup, rich text, toasts, AI chat widget, admin bar, gallery, lightbox. Colours use the Sivani Tech brand variables at the top. */
:root { --ztc-bg-bg-4: #f4f1fb; --ztc-text-text-2: #0b0c26; --ztc-text-text-3: #515264; --ztc-text-text-9: #515264; --st-primary: #571bcd; --st-accent: #da1aa9; }
/* ===== Get Quote modal ========================================= */
body.quote-modal-open { overflow: hidden; }

.quote-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.quote-modal.is-open { display: flex; }
.quote-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 18, 51, 0.55);
}
.quote-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 18, 51, 0.35);
  animation: qmPop 0.28s ease;
}
@keyframes qmPop {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.quote-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #0b0c26;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 18, 51, 0.18);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.quote-modal__close:hover { background: #571bcd; color: #fff; transform: rotate(90deg); }
.quote-modal__grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
}
.quote-modal__main { padding: 38px 36px; }
.quote-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #571bcd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.quote-modal__eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: #571bcd;
}
.quote-modal__title {
  margin: 14px 0 10px;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
  color: #0b0c26;
}
.quote-modal__lead {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.6;
  color: #676b74;
}
.quote-modal__form { display: flex; flex-direction: column; gap: 14px; }
.qm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qm-field {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid #e2e6ea;
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.qm-field > i:first-child {
  width: 44px;
  text-align: center;
  color: #9aa4ab;
  font-size: 14px;
  flex-shrink: 0;
}
.qm-field input,
.qm-field select,
.qm-field textarea {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 14px 14px 14px 0;
  font-size: 14px;
  color: #0b0c26;
  font-family: inherit;
}
/* the native <select> fills the whole field so a click anywhere opens it */
.qm-field--select {
  position: relative;
  min-height: 50px;
}
.qm-field--select > i:first-child {
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.qm-field--select select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 38px 0 44px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: #676b74;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.qm-field--select .qm-caret {
  position: absolute;
  right: 16px;
  z-index: 1;
  color: #9aa4ab;
  font-size: 12px;
  pointer-events: none;
}
.qm-field--area { align-items: flex-start; }
.qm-field--area > i:first-child { padding-top: 14px; }
.qm-field textarea { min-height: 96px; resize: vertical; padding-right: 60px; }
.qm-counter {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 11px;
  color: #9aa4ab;
}
.qm-field:focus-within {
  border-color: #571bcd;
  box-shadow: 0 0 0 3px rgba(0, 114, 0, 0.12);
}
.qm-submit {
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background: #571bcd;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 15px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s ease;
}
.qm-submit:hover { background: #005a00; }
.qm-submit:disabled { background: #4c9a4c; cursor: default; }
.qm-privacy {
  margin: 12px 0 0;
  font-size: 12px;
  color: #9aa4ab;
  display: flex;
  align-items: center;
  gap: 6px;
}
.quote-modal__aside {
  position: relative;
  padding: 40px 30px 30px;
  background: linear-gradient(180deg, #eaf5ea 0%, #dff0df 100%);
  display: flex;
  flex-direction: column;
}
.qm-aside-script {
  margin: 0 0 26px;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
  font-style: italic;
  color: #0f5c2e;
}
.qm-aside-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.qm-aside-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #063a1c;
}
.qm-ic {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #571bcd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(0, 90, 0, 0.15);
}
.qm-aside-img {
  position: relative;
  margin-top: auto;
  border-radius: 12px;
  overflow: hidden;
}
.qm-aside-img img { display: block; width: 100%; height: 150px; object-fit: cover; }
.qm-aside-caption {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: #fff;
  font-style: italic;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

@media (max-width: 767px) {
  .quote-modal { padding: 0; }
  .quote-modal__dialog { border-radius: 0; max-height: 100vh; height: 100%; }
  .quote-modal__grid { grid-template-columns: 1fr; }
  .quote-modal__aside { order: -1; padding: 46px 24px 24px; }
  .qm-aside-img { display: none; }
  .quote-modal__main { padding: 26px 22px 32px; }
  .qm-row { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
  .project-spec-table th,
  .project-spec-table td { padding: 11px 12px; font-size: 14px; }
  .project-spec-table td:first-child,
  .project-spec-table th:first-child { width: 44%; }
  .company-journey { padding: 60px 0; }
}

/* Rich-text body (blog posts, Contact page, any "rich_text" block).
   The theme resets all h1-h6/p margins to 0 sitewide and instead uses
   manually-placed <div class="spaceNN"> elements between components - fine
   for hand-built template pages, but admin-authored HTML in a plain
   textarea can't realistically do that. This restores real prose
   typography (spacing, hierarchy, list/quote styling) scoped to this
   wrapper only, so it never touches the rest of the site. */
.ds-rich-text {
  color: var(--ztc-text-text-3, #676B74);
  font-size: 16px;
  line-height: 1.85;
}
.ds-rich-text > *:first-child { margin-top: 0; }
.ds-rich-text > *:last-child { margin-bottom: 0; }
.ds-rich-text p { margin: 0 0 20px; }
.ds-rich-text h1, .ds-rich-text h2, .ds-rich-text h3,
.ds-rich-text h4, .ds-rich-text h5, .ds-rich-text h6 {
  color: var(--ztc-text-text-2, #0b0c26);
  font-weight: 700;
  line-height: 1.3;
  margin: 34px 0 16px;
}
.ds-rich-text h1 { font-size: 30px; }
.ds-rich-text h2 { font-size: 26px; }
.ds-rich-text h3 { font-size: 21px; }
.ds-rich-text h4 { font-size: 18px; }
.ds-rich-text h5, .ds-rich-text h6 { font-size: 16px; }
.ds-rich-text strong, .ds-rich-text b { color: var(--ztc-text-text-2, #0b0c26); font-weight: 700; }
.ds-rich-text a { color: var(--ztc-text-text-9, #571bcd); text-decoration: underline; }
.ds-rich-text ul, .ds-rich-text ol { margin: 0 0 20px; padding-left: 0; list-style: none; }
.ds-rich-text ol { counter-reset: ds-rt-ol; }
.ds-rich-text ul li, .ds-rich-text ol li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
  line-height: 1.7;
}
.ds-rich-text ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  background: url('../img/icons/check-h1.svg') no-repeat center / contain;
}
.ds-rich-text ol li { counter-increment: ds-rt-ol; }
.ds-rich-text ol li::before {
  content: counter(ds-rt-ol) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--ztc-text-text-9, #571bcd);
}
.ds-rich-text blockquote {
  margin: 28px 0;
  padding: 18px 26px;
  background: var(--ztc-bg-bg-4, #F6F8FA);
  border-left: 3px solid var(--ztc-text-text-9, #571bcd);
  color: var(--ztc-text-text-2, #0b0c26);
  font-size: 18px;
  font-style: italic;
  line-height: 1.6;
}
.ds-rich-text .table-responsive { margin: 0 0 20px; }
.ds-rich-text img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0 20px; }

/* Toast shown after a form submission (Contact, Get Quote, enquiries, newsletter) */
.ds-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  max-width: min(92vw, 480px);
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0,18,51,.18);
  animation: dsToastIn .3s ease;
}
.ds-toast-success { background: var(--ztc-text-text-9, #571bcd); color: #fff; }
.ds-toast-error { background: #c0392b; color: #fff; }
@keyframes dsToastIn {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.ds-preview-banner {
  background: #fff3cd;
  color: #7a5b00;
  text-align: center;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #f0d98a;
}

/* AI chat widget (app/Views/layouts/_head.php + assets/js/chatbot-widget.js) */
.ds-chat-fab {
  position: fixed; right: 30px; bottom: 100px; height: 56px; width: 56px; z-index: 10000;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: linear-gradient(135deg, #da1aa9, #3d1291); color: #fff; font-size: 24px;
  border: none; cursor: pointer; box-shadow: 0 6px 18px rgba(15,122,62,.4);
}
.ds-chat-fab:hover { filter: brightness(1.08); }
.ds-chat-panel {
  position: fixed; right: 24px; bottom: 168px; width: 350px; max-width: calc(100vw - 32px);
  height: 480px; max-height: calc(100vh - 200px); background: #fff; border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); z-index: 10000; display: flex; flex-direction: column; overflow: hidden;
}
.ds-chat-head {
  background: linear-gradient(135deg, #da1aa9, #3d1291); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 14.5px;
}
.ds-chat-head span { display: flex; align-items: center; gap: 8px; }
.ds-chat-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; line-height: 1; }
.ds-chat-body { flex: 1; overflow-y: auto; padding: 16px; background: #f7f9f8; }
.ds-chat-lead-form { display: flex; flex-direction: column; gap: 10px; }
.ds-chat-lead-form p { margin: 0 0 4px; font-size: 13px; color: #555; }
.ds-chat-lead-form input {
  padding: 10px 12px; border: 1px solid #dde3e0; border-radius: 8px; font-size: 13.5px; font-family: inherit;
}
.ds-chat-lead-form button {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border: none;
  border-radius: 8px; background: #da1aa9; color: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer;
}
.ds-chat-lead-error { color: #c0392b; font-size: 12.5px; }
.ds-chat-messages { display: flex; flex-direction: column; gap: 10px; }
.ds-chat-msg { max-width: 84%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; }
.ds-chat-msg--assistant { align-self: flex-start; background: #fff; border: 1px solid #e4e8e6; color: #222; border-bottom-left-radius: 4px; }
.ds-chat-msg--user { align-self: flex-end; background: #da1aa9; color: #fff; border-bottom-right-radius: 4px; }
.ds-chat-msg--typing { align-self: flex-start; color: #888; font-style: italic; }
.ds-chat-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #eee; background: #fff; }
.ds-chat-input-row input {
  flex: 1; padding: 10px 12px; border: 1px solid #dde3e0; border-radius: 999px; font-size: 13.5px; font-family: inherit;
}
.ds-chat-input-row button {
  width: 40px; height: 40px; border-radius: 50%; border: none; background: #da1aa9; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex: none;
}
@media (max-width: 575px) {
  .ds-chat-fab { right: 16px; bottom: 82px; height: 48px; width: 48px; font-size: 20px; }
  .ds-chat-panel { right: 12px; bottom: 138px; width: calc(100vw - 24px); }
}

/* Google rating badge (app/Views/partials/_google_rating_badge.php) */
.ds-google-badge {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e2e5ea;
  border-radius: 999px; padding: 7px 14px; font-size: 13px; color: #1b2432; text-decoration: none;
}
.ds-google-badge:hover { border-color: #4285F4; text-decoration: none; color: #1b2432; }
.ds-google-badge-brand { font-weight: 700; color: #4285F4; font-size: 12.5px; }
.ds-google-badge-stars { color: #fbbc04; font-size: 12px; letter-spacing: 1px; }
.ds-google-badge-text { font-weight: 700; }

/* Video & Gallery block (app/Views/blocks/video_gallery.php) + Product gallery (products/show.php) */
.ds-video-thumb { position: relative; display: block; border-radius: 14px; overflow: hidden; }
.ds-video-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.ds-video-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 78px; height: 78px; border-radius: 50%; background: rgba(255,255,255,.95);
  display: flex; align-items: center; justify-content: center; color: #da1aa9; font-size: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .2s ease;
}
.ds-video-thumb:hover .ds-video-play { transform: translate(-50%, -50%) scale(1.08); }

.ds-gallery-row { row-gap: 20px; }
.ds-gallery-popup-item { position: relative; display: block; border-radius: 10px; overflow: hidden; }
.ds-gallery-popup-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: transform .3s ease; }
.ds-gallery-zoom {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,18,51,0); color: #fff; font-size: 20px; opacity: 0; transition: opacity .2s ease, background .2s ease;
}
.ds-gallery-popup-item:hover .ds-gallery-zoom { opacity: 1; background: rgba(0,18,51,.45); }
.ds-gallery-popup-item:hover img { transform: scale(1.06); }

/* Admin bar (app/Views/partials/_admin_bar.php) - only rendered for a logged-in admin viewing the public site */
.ds-admin-bar { background: #0d2748; color: #c3d3e8; font-size: 13px; position: relative; z-index: 20000; }
.ds-admin-bar-inner { max-width: 1320px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 14px; }
.ds-admin-bar-brand { display: flex; align-items: center; gap: 6px; color: #fff; font-weight: 700; text-decoration: none; }
.ds-admin-bar-brand:hover { color: #fff; text-decoration: underline; }
.ds-admin-bar-sep { width: 1px; height: 16px; background: rgba(255,255,255,.2); }
.ds-admin-bar-msg { color: #8fa5c2; }
.ds-admin-bar-spacer { flex: 1; }
.ds-admin-bar-edit {
  display: inline-flex; align-items: center; gap: 6px; background: #da1aa9; color: #fff; padding: 5px 12px;
  border-radius: 999px; font-weight: 700; text-decoration: none; font-size: 12.5px;
}
.ds-admin-bar-edit:hover { background: #3d1291; color: #fff; text-decoration: none; }
.ds-admin-bar-user { color: #fff; font-weight: 600; }
.ds-admin-bar-logout { color: #ff8a80; text-decoration: none; }
.ds-admin-bar-logout:hover { color: #ff8a80; text-decoration: underline; }
@media (max-width: 575px) {
  .ds-admin-bar-msg, .ds-admin-bar-sep { display: none; }
  .ds-admin-bar-inner { padding: 8px 14px; gap: 10px; }
}

/* Vanilla-JS lightbox for photo galleries + YouTube videos (ds-lightbox.js) */
.ds-lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}
.ds-lightbox-overlay.is-open { display: flex; }
.ds-lightbox-stage { max-width: 90vw; max-height: 90vh; }
.ds-lightbox-stage.is-video {
  width: 90vw;
  max-width: 1000px;
  aspect-ratio: 16 / 9;
}
.ds-lightbox-stage.is-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 4px;
}
.ds-lightbox-stage img {
  max-width: 90vw;
  max-height: 90vh;
  display: block;
  border-radius: 4px;
}
.ds-lightbox-close,
.ds-lightbox-prev,
.ds-lightbox-next {
  position: absolute;
  z-index: 2;
  /* dark disc + white ring + shadow: stays visible over bright/white photos too */
  background: rgba(0, 18, 51, 0.62);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}
.ds-lightbox-close:hover,
.ds-lightbox-prev:hover,
.ds-lightbox-next:hover { background: #571bcd; border-color: #fff; }
.ds-lightbox-counter {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 5px 14px; border-radius: 20px; background: rgba(0, 18, 51, 0.62);
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .5px;
}
.ds-lightbox-counter:empty { display: none; }
.ds-lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
}
.ds-lightbox-prev,
.ds-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
}
.ds-lightbox-prev { left: 16px; }
.ds-lightbox-next { right: 16px; }
@media (max-width: 575px) {
  .ds-lightbox-prev, .ds-lightbox-next { width: 40px; height: 40px; }
  .ds-lightbox-close { top: 10px; right: 10px; width: 38px; height: 38px; }
}

/* Testimonial avatar: name initials when no photo / photo fails to load */
.testimonial5 .testimonial-main-slider .images .img1 .ds-t-initials { display: none; }
.testimonial5 .testimonial-main-slider .images .img1.is-fallback .ds-t-initials {
  display: flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; border-radius: 50%;
  background: #1f7a0c; color: #fff;
  font-size: 20px; font-weight: 700; letter-spacing: .5px; line-height: 1;
  flex-shrink: 0;
}

/* Spec table: "Heading | Item | Item" cells render as a bullet list */
.project-spec-table td .ds-cell-list {
  margin: 6px 0 0; padding-left: 18px; list-style: disc;
  font-weight: 400;
}
.project-spec-table td .ds-cell-list li { list-style: disc; margin: 2px 0; }

