/* Shared contact entry point for the JS landing renderer and classic templates. */
body.dvqc-front .mobile-bar,
body.dvqc-site-shell .dvqc-mobile-bar {
  display: none !important;
}

.dvqc-quick-contact {
  position: fixed;
  z-index: 35;
  right: 12px;
  top: 50%;
  display: grid;
  width: 76px;
  padding: 7px;
  gap: 3px;
  transform: translateY(-50%);
  border: 1px solid #d5e6f6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(12, 51, 92, .18);
  font-family: inherit;
}

.dvqc-quick-contact__heading {
  padding: 6px 1px 4px;
  color: #345978;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
}

.dvqc-quick-contact__item {
  display: flex;
  min-height: 62px;
  padding: 7px 2px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border-radius: 11px;
  color: #075ba8;
  background: #f0f7ff;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}

.dvqc-quick-contact__item svg {
  display: block;
  width: 23px;
  height: 23px;
  flex: none;
}

.dvqc-quick-contact__item--zalo {
  color: #fff;
  background: #0c72d6;
}

.dvqc-quick-contact__item--form {
  color: #006c78;
  background: #e7f8f8;
}

body.dvqc-front .dvqc-quick-contact__item--phone,
body.dvqc-site-shell .dvqc-quick-contact__item--phone { color: #075ba8; }
body.dvqc-front .dvqc-quick-contact__item--zalo,
body.dvqc-site-shell .dvqc-quick-contact__item--zalo { color: #fff; }
body.dvqc-front .dvqc-quick-contact__item--form,
body.dvqc-site-shell .dvqc-quick-contact__item--form { color: #006c78; }

.dvqc-quick-contact__mobile-label { display: none; }

.dvqc-quick-contact.is-near-footer {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.dvqc-quick-contact__item:hover {
  transform: translateX(-2px);
  background: #dceefe;
}

.dvqc-quick-contact__item--zalo:hover { background: #075eae; }
.dvqc-quick-contact__item--form:hover { background: #d0f0f0; }
.dvqc-quick-contact__item:focus-visible { outline: 3px solid #ffb72d; outline-offset: 2px; }

@media (max-width: 1023px) {
  body.dvqc-front,
  body.dvqc-site-shell {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .dvqc-quick-contact {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    width: auto;
    max-width: none;
    padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    transform: none;
    border: 0;
    border-top: 1px solid #dbe8f5;
    border-radius: 0;
    box-shadow: 0 -8px 26px rgba(12, 51, 92, .10);
  }

  .dvqc-quick-contact__heading { display: none; }
  .dvqc-quick-contact__desktop-label { display: none; }
  .dvqc-quick-contact__mobile-label { display: inline; }

  .dvqc-quick-contact__item {
    min-width: 0;
    min-height: 50px;
    padding: 6px 4px;
    flex-direction: row;
    gap: 5px;
    border: 1px solid #d3e4f5;
    font-size: 12px;
    white-space: nowrap;
  }

  .dvqc-quick-contact__item svg { width: 19px; height: 19px; }
  .dvqc-quick-contact__item--zalo { border-color: #0c72d6; }
  .dvqc-quick-contact__item--form { border-color: #b5e4e6; }
  .dvqc-quick-contact__item:hover { transform: none; }
  body.lock .dvqc-quick-contact,
  body.dvqc-drawer-open .dvqc-quick-contact { display: none; }
}

@media (max-width: 350px) {
  .dvqc-quick-contact__item { gap: 3px; font-size: 11px; }
  .dvqc-quick-contact__item svg { width: 17px; height: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .dvqc-quick-contact__item { transition: none; }
}

body.dvqc-contact-open { overflow: hidden; }
body.dvqc-contact-open .dvqc-quick-contact { visibility: hidden; pointer-events: none; }

.dvqc-contact-popup[hidden],
.dvqc-contact-form[hidden],
.dvqc-contact-form__success[hidden] { display: none !important; }

.dvqc-contact-popup {
  position: fixed;
  z-index: 180;
  inset: 0;
  display: flex;
  padding: 16px;
  align-items: center;
  justify-content: center;
  background: rgba(7, 25, 51, .7);
  font-family: inherit;
}

.dvqc-contact-dialog,
.dvqc-contact-dialog * { box-sizing: border-box; }

.dvqc-contact-dialog {
  width: min(100%, 520px);
  max-height: min(92dvh, 790px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #dce9f5;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(4, 24, 52, .28);
  color: #122d50;
}

.dvqc-contact-dialog:focus { outline: none; }
.dvqc-contact-dialog__top {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  padding: 20px 22px 17px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e6eef7;
  background: #fff;
}

.dvqc-contact-dialog__eyebrow {
  color: #0877bd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
}

body .dvqc-contact-dialog h2 {
  margin: 4px 0 3px;
  color: #102b50;
  font-size: clamp(23px, 4vw, 27px);
  font-weight: 800;
  line-height: 1.2;
}

body .dvqc-contact-dialog p { margin: 0; }
body .dvqc-contact-dialog__top p { color: #526c86; font-size: 14px; line-height: 1.45; }

body.dvqc-front .dvqc-contact-dialog__close,
body.dvqc-site-shell .dvqc-contact-dialog__close {
  display: grid;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid #dce8f5;
  border-radius: 50%;
  background: #f5f9fd;
  color: #264d72;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

body .dvqc-contact-dialog__close:hover { background: #e8f3ff; }
.dvqc-contact-dialog__body { padding: 19px 22px 22px; }
.dvqc-contact-dialog__channels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

body .dvqc-contact-dialog .dvqc-contact-dialog__channel {
  display: grid;
  min-height: 76px;
  padding: 11px 12px;
  grid-template-columns: 30px 1fr;
  column-gap: 7px;
  align-content: center;
  border: 1px solid #c9e1f7;
  border-radius: 14px;
  background: #eff7ff;
  color: #075ba8;
  text-align: left;
  text-decoration: none;
}

body .dvqc-contact-dialog .dvqc-contact-dialog__channel--zalo {
  border-color: #0c72d6;
  background: #0c72d6;
  color: #fff;
}

.dvqc-contact-dialog__channel > span {
  grid-row: span 2;
  align-self: center;
  font-size: 25px;
  line-height: 1;
}

.dvqc-contact-dialog__channel strong { align-self: end; font-size: 14px; line-height: 1.25; }
.dvqc-contact-dialog__channel small { align-self: start; font-size: 11px; line-height: 1.4; opacity: .85; }
body .dvqc-contact-dialog .dvqc-contact-dialog__divider {
  margin: 18px 0 14px;
  color: #526c86;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.dvqc-contact-form { display: grid; gap: 12px; }
.dvqc-contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dvqc-contact-form label { display: grid; gap: 6px; color: #244663; font-size: 13px; font-weight: 700; line-height: 1.4; }
.dvqc-contact-form label b[aria-hidden="true"] { color: #c83939; }
.dvqc-contact-form label small { color: #6a8096; font-size: 12px; font-weight: 400; }

.dvqc-contact-popup .dvqc-contact-form input:not([type="checkbox"]),
.dvqc-contact-popup .dvqc-contact-form select,
.dvqc-contact-popup .dvqc-contact-form textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #cadbea;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: #17324f;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

.dvqc-contact-popup .dvqc-contact-form textarea { min-height: 66px; resize: vertical; }
.dvqc-contact-popup .dvqc-contact-form :is(input, select, textarea):focus-visible { border-color: #0877d7; box-shadow: 0 0 0 3px rgba(8, 119, 215, .14); }
.dvqc-contact-form__honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.dvqc-contact-form .dvqc-contact-form__consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: #526c86;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}

.dvqc-contact-form__consent input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: #0866ed; }
body .dvqc-contact-form__consent a { color: #0866ed; text-decoration: underline; }

body.dvqc-front .dvqc-contact-form__submit,
body.dvqc-site-shell .dvqc-contact-form__submit {
  min-height: 48px;
  padding: 10px 16px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(110deg, #0866ed, #008b96);
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
  text-transform: none;
  cursor: pointer;
}

.dvqc-contact-form__submit:disabled { opacity: .65; cursor: wait; }
.dvqc-contact-form__feedback { color: #a12c2c; font-size: 13px; line-height: 1.4; }
.dvqc-contact-form__feedback:empty { display: none; }
.dvqc-contact-form__success {
  padding: 20px;
  border: 1px solid #b6e4d6;
  border-radius: 14px;
  background: #edf9f4;
  color: #155b48;
  line-height: 1.5;
}
.dvqc-contact-form__success strong { display: block; margin-bottom: 5px; font-size: 18px; }

.dvqc-contact-dialog :is(a, button, input, select, textarea):focus-visible { outline: 3px solid #ffb72d; outline-offset: 2px; }

@media (max-width: 600px) {
  .dvqc-contact-popup { padding: 0; align-items: flex-end; }
  .dvqc-contact-dialog {
    width: 100%;
    max-height: 92dvh;
    border: 0;
    border-radius: 22px 22px 0 0;
  }
  .dvqc-contact-dialog__top { padding: 18px 18px 14px; }
  .dvqc-contact-dialog__body { padding: 16px 18px calc(20px + env(safe-area-inset-bottom)); }
  .dvqc-contact-form__row { grid-template-columns: 1fr; }
}

@media (max-width: 350px) {
  .dvqc-contact-dialog__top { padding-inline: 14px; }
  .dvqc-contact-dialog__body { padding-inline: 14px; }
  body .dvqc-contact-dialog .dvqc-contact-dialog__channel { padding: 10px 8px; grid-template-columns: 25px 1fr; }
  .dvqc-contact-dialog__channel strong { font-size: 12px; }
}
