/* Shared quote popup on all site pages except Contact. */
.cmd-whatsapp-float {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 990;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #25d366;
  font-size: 32px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
  animation: cmd-wa-bounce 2s infinite, cmd-wa-pulse 2s infinite;
  transition: background .3s;
}
.cmd-whatsapp-float:hover { color: #fff; background: #20ba5a; }
.cmd-whatsapp-float:focus-visible { outline: 3px solid #043e59; outline-offset: 3px; }
@keyframes cmd-wa-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}
@keyframes cmd-wa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .7); }
  70% { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
@media (max-width: 768px) {
  .cmd-whatsapp-float { left: 15px; bottom: 15px; width: 55px; height: 55px; font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .cmd-whatsapp-float { animation: none; }
}
.cmd-popup {
      position: fixed;
      inset: 0;
      z-index: 99999;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
      background: rgba(4, 18, 29, 0.72);
      backdrop-filter: blur(4px);
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.35s ease, visibility 0.35s ease;
    }
    .cmd-popup.is-open { opacity: 1; visibility: visible; }

    .cmd-popup-box {
      position: relative;
      display: flex;
      width: 100%;
      max-width: 880px;
      max-height: calc(100vh - 32px);
      max-height: calc(100dvh - 32px);
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: thin;
      scrollbar-color: #027a8b transparent;
      background: #ffffff;
      border-radius: 16px;
      box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
      transform: translateY(30px) scale(0.97);
      transition: transform 0.4s cubic-bezier(.2, .8, .2, 1);
    }
    /* Slim visible scrollbar so visitors can tell the form scrolls on short screens */
    .cmd-popup-box::-webkit-scrollbar { width: 6px; }
    .cmd-popup-box::-webkit-scrollbar-thumb { background: #027a8b; border-radius: 6px; }
    .cmd-popup.is-open .cmd-popup-box { transform: none; }

    .cmd-popup-close {
      position: absolute;
      top: 14px;
      right: 14px;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 34px;
      height: 34px;
      padding: 0;
      border: 0;
      border-radius: 50%;
      background: #eef6f7;
      color: #04121d;
      font-size: 14px;
      cursor: pointer;
      transition: background 0.2s, color 0.2s, transform 0.2s;
    }
    .cmd-popup-close i { line-height: 1; }
    .cmd-popup-close:hover { background: #007888; color: #fff; transform: rotate(90deg); }

    /* Left brand panel */
    .cmd-popup-brand {
      flex: 0 0 40%;
      padding: 40px 32px;
      color: #e2e8f0;
      background:
        radial-gradient(circle at 20% 0%, rgba(0, 210, 238, 0.25), transparent 55%),
        linear-gradient(160deg, #04121d 0%, #0a2e3d 55%, #027a8b 100%);
      display: flex;
      flex-direction: column;
    }
    .cmd-popup-brand img { max-width: 190px; margin-bottom: 28px; }
    .cmd-popup-brand h3 {
      color: #ffffff;
      font-size: 26px;
      font-weight: 700;
      line-height: 1.25;
      margin-bottom: 12px;
    }
    .cmd-popup-brand h3 span { color: #00d2ee; }
    .cmd-popup-brand p { font-size: 15px; line-height: 1.6; margin-bottom: 24px; }
    .cmd-popup-contact { list-style: none; padding: 0; margin: auto 0 0; }
    .cmd-popup-contact li { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
    .cmd-popup-contact i {
      flex: 0 0 38px;
      height: 38px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      background: rgba(0, 210, 238, 0.15);
      color: #00d2ee;
      font-size: 17px;
    }
    .cmd-popup-contact a { color: #ffffff; font-size: 15px; word-break: break-all; }
    .cmd-popup-contact a:hover { color: #007888; }

    /* Right form panel */
    .cmd-popup-form { flex: 1; padding: 40px 32px 32px; }
    .cmd-popup-form h4 {
      font-size: 22px;
      font-weight: 700;
      color: #04121d;
      margin-bottom: 4px;
    }
    .cmd-popup-form .sub { color: #5b6b76; font-size: 14px; margin-bottom: 20px; }
    .cmd-popup-form .form-control {
      height: auto;
      padding: 11px 14px;
      margin-bottom: 14px;
      border: 1px solid #d6e2e6;
      border-radius: 8px;
      font-size: 15px;
      box-shadow: none;
    }
    .cmd-popup-form .form-control:focus {
      border-color: #027a8b;
      box-shadow: 0 0 0 3px rgba(2, 122, 139, 0.15);
    }
    .cmd-popup-form .cmd-popup-captcha { margin-bottom: 14px; transform-origin: 0 0; }
    .cmd-popup-submit {
      width: 100%;
      padding: 12px;
      border: 0;
      border-radius: 8px;
      background: linear-gradient(90deg, #027a8b, #00a9c0);
      color: #ffffff;
      font-size: 16px;
      font-weight: 600;
      letter-spacing: 0.3px;
      transition: filter 0.2s, transform 0.2s;
    }
    .cmd-popup-submit:hover { filter: brightness(1.08); transform: translateY(-1px); }

    body.cmd-popup-lock { overflow: hidden; }

    @media (max-width: 767px) {
      .cmd-popup { padding: 12px; }
      .cmd-popup-box { flex-direction: column; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
      /* Keep both halves full height so the box scrolls instead of squashing the form */
      .cmd-popup-box > * { flex-shrink: 0; }
      /* On the dark header the close button is a light glass circle */
      .cmd-popup-close {
        top: 12px;
        right: 12px;
        width: 30px;
        height: 30px;
        font-size: 12px;
        background: rgba(255, 255, 255, 0.18);
        color: #ffffff;
      }
      .cmd-popup-brand { flex: none; padding: 16px 56px 14px 18px; }
      .cmd-popup-brand img { max-width: 105px; margin-bottom: 10px; }
      .cmd-popup-brand h3 { font-size: 17px; margin-bottom: 4px; }
      .cmd-popup-brand p { display: none; }
      .cmd-popup-contact { display: flex; flex-wrap: wrap; gap: 0 16px; }
      .cmd-popup-contact li { margin-top: 6px; gap: 8px; }
      .cmd-popup-contact i { flex-basis: 26px; height: 26px; font-size: 12px; }
      .cmd-popup-contact a { font-size: 13px; }
      .cmd-popup-form { padding: 16px 18px 18px; }
      .cmd-popup-form h4 { font-size: 18px; }
      .cmd-popup-form .sub { font-size: 13px; margin-bottom: 12px; }
      .cmd-popup-form .form-control { padding: 8px 12px; margin-bottom: 10px; font-size: 14px; }
      .cmd-popup-form textarea.form-control { height: 64px; }
      .cmd-popup-form .cmd-popup-captcha { transform: scale(0.85); margin-bottom: 0; height: 68px; }
      .cmd-popup-submit { padding: 10px; font-size: 15px; }
    }
