/* Contact form modal — matches katalog.css design language (var(--accent), border-radius:16px, blur backdrop) */

.cm-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cm-overlay[data-open="true"] {
  opacity: 1;
}

.cm-dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--card-bg, #14161b);
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  padding: 32px 28px;
  color: var(--text, #e5e7eb);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(16px);
  transition: transform 0.2s ease;
}
.cm-overlay[data-open="true"] .cm-dialog {
  transform: translateY(0);
}

.cm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  border-radius: 9px;
  opacity: 0.6;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.cm-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
}

.cm-title {
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 700;
}
.cm-intro {
  margin: 0 0 22px 0;
  opacity: 0.75;
  font-size: 14px;
  line-height: 1.55;
}

.cm-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cm-label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
}
.cm-label sup {
  color: var(--accent, #37bfb5);
  margin-left: 3px;
}

.cm-input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.14));
  border-radius: 10px;
  color: inherit;
  font: inherit;
  font-size: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cm-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}
.cm-input:focus {
  outline: none;
  border-color: var(--accent, #37bfb5);
  background: rgba(255, 255, 255, 0.06);
}
.cm-input[aria-invalid="true"] {
  border-color: #e0556d;
}

.cm-textarea {
  resize: vertical;
  min-height: 110px;
  font-family: inherit;
}

.cm-error {
  font-size: 12px;
  color: #e0556d;
  min-height: 0;
  display: none;
}
.cm-error.is-shown {
  display: block;
}

.cm-field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  opacity: 0.8;
}
.cm-field--checkbox input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--accent, #37bfb5);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.cm-checkbox-label {
  line-height: 1.45;
}
.cm-checkbox-label a {
  color: var(--accent, #37bfb5);
  text-decoration: underline;
}

.cm-submit {
  margin-top: 8px;
  width: 100%;
  padding: 14px 22px;
  background: var(--accent, #37bfb5);
  color: #0a0a0a;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.cm-submit:hover {
  background: var(--accent-hover, #2ea69d);
}
.cm-submit:active {
  transform: translateY(1px);
}
.cm-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cm-form-error {
  margin: 4px 0 0 0;
  padding: 10px 12px;
  font-size: 13px;
  color: #e0556d;
  background: rgba(224, 85, 109, 0.08);
  border: 1px solid rgba(224, 85, 109, 0.3);
  border-radius: 8px;
}

.cm-success {
  text-align: center;
  padding: 12px 8px 4px;
}
.cm-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  font-size: 32px;
  font-weight: 700;
  color: #0a0a0a;
  background: var(--accent, #37bfb5);
  border-radius: 50%;
}
.cm-success-message {
  margin: 8px 0 22px 0;
  opacity: 0.8;
  font-size: 14px;
}

@media (max-width: 560px) {
  .cm-dialog {
    padding: 24px 18px;
    border-radius: 14px;
  }
  .cm-title {
    font-size: 20px;
  }
}
