.contact-modal-no-scroll {
  overflow: hidden;
}

.contact-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 20% 20%, rgba(14, 165, 233, 0.14), transparent 55%),
    radial-gradient(900px 600px at 80% 80%, rgba(16, 185, 129, 0.14), transparent 58%),
    rgba(2, 6, 23, 0.58);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.contact-modal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.contact-modal {
  width: min(1100px, 100%);
  max-height: min(92vh, 920px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow:
    0 26px 54px rgba(2, 6, 23, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  overflow: hidden;
  transform: translateY(12px) scale(0.985);
  transition: transform 0.28s ease;
  font-family: "Poppins", "Segoe UI", sans-serif;
}

.contact-modal-overlay.show .contact-modal {
  transform: translateY(0) scale(1);
}

.ctm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(120deg, rgba(226, 232, 240, 0.42), rgba(255, 255, 255, 0.7));
}

.ctm-top-logo {
  height: 34px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.ctm-head-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ctm-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(248, 250, 252, 0.9);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ctm-icon-btn:hover {
  background: #ffffff;
}

.ctm-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(300px, 76vw);
  max-height: 56vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.22);
  padding: 8px;
  display: none;
  z-index: 6;
}

.ctm-menu-popover.show {
  display: block;
}

.ctm-menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #0f172a;
  padding: 8px 9px;
  border-radius: 9px;
  font-size: 13px;
}

.ctm-menu-link:hover {
  background: #f1f5f9;
}

.ctm-menu-link-icon {
  display: inline-flex;
}

.ctm-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #0f172a;
}

.ctm-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(248, 250, 252, 0.9);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ctm-close:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.ctm-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.ctm-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid rgba(14, 165, 233, 0.2);
  background: linear-gradient(130deg, rgba(236, 253, 245, 0.75), rgba(224, 242, 254, 0.75));
  border-radius: 18px;
  padding: 18px;
}

.ctm-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0f766e;
}

.ctm-hero h3 {
  margin: 0;
  font-size: clamp(20px, 1.9vw, 28px);
  line-height: 1.2;
  color: #052e16;
}

.ctm-sub {
  margin: 10px 0 0;
  max-width: 66ch;
  color: #134e4a;
  font-size: 14px;
  line-height: 1.6;
}

.ctm-brand {
  margin: 12px 0 0;
  color: #0f172a;
  font-weight: 700;
}

.ctm-live-status {
  margin: 0;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.09);
  color: #0f172a;
  background: rgba(255, 255, 255, 0.78);
}

.ctm-live-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f59e0b;
}

.ctm-live-status.is-online::before {
  background: #10b981;
}

.ctm-live-status.is-offline::before {
  background: #f59e0b;
}

.ctm-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
}

.ctm-section {
  margin-top: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #ffffff;
  padding: 14px;
}

.ctm-section-head {
  margin-bottom: 10px;
}

.ctm-section-head h4 {
  margin: 0;
  font-size: 16px;
  color: #0f172a;
}

.ctm-section-head p {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748b;
}

.ctm-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.ctm-search-wrap span {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.ctm-search {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 12px;
  font-size: 13px;
}

.ctm-search:focus {
  outline: none;
  border-color: rgba(14, 165, 233, 0.8);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

.ctm-faq-list {
  display: grid;
  gap: 10px;
}

.ctm-faq-item {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.ctm-faq-question {
  width: 100%;
  border: none;
  background: #f8fafc;
  color: #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  gap: 12px;
  cursor: pointer;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
}

.ctm-faq-question:hover {
  background: #f1f5f9;
}

.ctm-faq-chevron {
  display: inline-flex;
  transition: transform 0.2s ease;
}

.ctm-faq-question[aria-expanded="true"] .ctm-faq-chevron {
  transform: rotate(180deg);
}

.ctm-faq-answer {
  padding: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

.ctm-faq-answer p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
}

.ctm-history-list {
  display: grid;
  gap: 10px;
}

.ctm-history-item {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 11px;
  background: linear-gradient(130deg, #ffffff, #f8fafc);
}

.ctm-history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.ctm-history-subject {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.ctm-history-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #f8fafc;
  color: #334155;
}

.ctm-history-status.is-pending {
  color: #92400e;
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(254, 243, 199, 0.6);
}

.ctm-history-status.is-read {
  color: #075985;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(224, 242, 254, 0.7);
}

.ctm-history-status.is-done {
  color: #166534;
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(220, 252, 231, 0.7);
}

.ctm-history-message {
  margin: 7px 0 0;
  color: #334155;
  font-size: 12px;
}

.ctm-history-meta {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 11px;
}

.ctm-footer {
  display: grid;
  gap: 12px;
}

.ctm-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctm-footer-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #ffffff;
}

.ctm-footer-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(120deg, #0ea5e9, #0284c7);
}

.ctm-footer-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.ctm-footer-text {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}

.ctm-footer-info p {
  margin: 0 0 6px;
  font-size: 12px;
  color: #334155;
}

.ctm-footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ctm-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ctm-footer-links a {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: #0f172a;
  background: #f8fafc;
  text-decoration: none;
}

.ctm-footer-links a:hover {
  border-color: rgba(14, 165, 233, 0.55);
  background: #ffffff;
}

.ctm-footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: #0f172a;
  background: #f8fafc;
  text-decoration: none;
}

.ctm-footer-social-link:hover {
  border-color: rgba(14, 165, 233, 0.55);
  background: #ffffff;
}

.ctm-footer-copy {
  margin: 0;
  font-size: 11px;
  color: #64748b;
}

.ctm-empty {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.ctm-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #ffffff;
  padding: 16px;
}

.ctm-card h4 {
  margin: 0;
  font-size: 16px;
  color: #0f172a;
}

.ctm-direct-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ctm-direct-item {
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  background: linear-gradient(110deg, #ffffff, #f8fafc);
  color: #0f172a;
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  padding: 11px;
  font-size: 13px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ctm-direct-item:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 165, 233, 0.55);
}

.ctm-direct-item strong {
  color: #14532d;
}

.ctm-support-email {
  margin: 12px 0 0;
  font-size: 12px;
  color: #475569;
  word-break: break-word;
}

.ctm-form-card {
  position: relative;
}

#contact-modal-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ctm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ctm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ctm-field span {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.ctm-field input,
.ctm-field textarea,
.ctm-field select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ctm-field textarea {
  resize: vertical;
  min-height: 138px;
}

.ctm-field input:focus,
.ctm-field textarea:focus,
.ctm-field select:focus {
  outline: none;
  border-color: rgba(14, 165, 233, 0.8);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

.ctm-field input.is-error,
.ctm-field textarea.is-error,
.ctm-field select.is-error,
.ctm-field.is-error input,
.ctm-field.is-error textarea,
.ctm-field.is-error select {
  border-color: rgba(239, 68, 68, 0.85);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.ctm-full {
  grid-column: 1 / -1;
}

.ctm-counter {
  font-size: 11px;
  color: #64748b;
  align-self: flex-end;
}

.ctm-counter.is-warning {
  color: #b45309;
}

.ctm-counter.is-danger {
  color: #dc2626;
}

.ctm-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #334155;
}

.ctm-consent input[type="checkbox"] {
  margin-top: 2px;
}

.ctm-error {
  min-height: 16px;
  font-size: 11px;
  color: #dc2626;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ctm-error.show {
  opacity: 1;
  transform: translateY(0);
}

.ctm-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.ctm-submit {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(120deg, #0ea5e9, #0284c7);
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.32);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.ctm-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.ctm-submit:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

.ctm-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: ctmSpin 0.7s linear infinite;
}

@keyframes ctmSpin {
  to {
    transform: rotate(360deg);
  }
}

.ctm-submit-state {
  margin: 0;
  font-size: 12px;
  color: #475569;
}

.ctm-submit-state.is-pending {
  color: #854d0e;
}

.ctm-submit-state.is-read {
  color: #0369a1;
}

.ctm-submit-state.is-done {
  color: #166534;
}

.ctm-toast {
  position: absolute;
  right: 18px;
  bottom: 16px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  font-size: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ctm-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.ctm-toast.success {
  background: rgba(5, 150, 105, 0.94);
  border-color: rgba(16, 185, 129, 0.72);
}

.ctm-toast.error {
  background: rgba(185, 28, 28, 0.95);
  border-color: rgba(248, 113, 113, 0.8);
}

.ctm-toast.info {
  background: rgba(3, 105, 161, 0.95);
  border-color: rgba(56, 189, 248, 0.8);
}

@media (max-width: 1000px) {
  .contact-modal-overlay {
    padding: 14px;
  }

  .ctm-grid {
    grid-template-columns: 1fr;
  }

  .ctm-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
    .ctm-top-logo {
      display: none;
    }
  .contact-modal {
    max-height: 95vh;
    border-radius: 16px;
  }

  .ctm-scroll {
    padding: 12px;
  }

  .ctm-hero {
    flex-direction: column;
    gap: 10px;
    padding: 14px;
  }

  .ctm-actions {
    align-items: flex-start;
  }

  .ctm-submit {
    width: 100%;
    justify-content: center;
  }

  .ctm-toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .ctm-history-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
