/* ── CyberContactForm ─────────────────────────────────────────────────── */

.cybercontact-wrapper {
  max-width: 680px;
  margin: 0 auto;
  font-family: inherit;
}

/* Honeypot — hidden from users, invisible to screen readers */
.cybercontact-honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}

.cybercontact-title {
  margin: 0 0 1.25rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: inherit;
}

/* ── Field grid ─────────────────────────────────────────────────────── */

.cybercontact-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.cybercontact-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cybercontact-full  { flex: 0 0 100%; }
.cybercontact-half  { flex: 1 1 calc(50% - 0.5rem); min-width: 180px; }

/* ── Labels ─────────────────────────────────────────────────────────── */

.cybercontact-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
}

.cybercontact-required {
  color: #e53e3e;
  margin-left: 2px;
}

/* ── Inputs ─────────────────────────────────────────────────────────── */

.cybercontact-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: auto;
}

.cybercontact-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.cybercontact-input:required:valid {
  border-color: #d1d5db;
}

textarea.cybercontact-input {
  resize: vertical;
  min-height: 85px;
}

select.cybercontact-input {
  cursor: pointer;
}

/* ── Checkbox ───────────────────────────────────────────────────────── */

.cybercontact-type-checkbox {
  justify-content: center;
}

.cybercontact-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1.4;
}

.cybercontact-checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #6366f1;
  cursor: pointer;
}

/* ── Submit row ─────────────────────────────────────────────────────── */

.cybercontact-footer {
  margin-top: 0.25rem;
  width: 100%;
}

.cybercontact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: #6366f1;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.cybercontact-submit:hover {
  filter: brightness(0.88);
}

.cybercontact-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ── Status messages ────────────────────────────────────────────────── */

.cybercontact-message {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  display: none;
}

.cybercontact-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  display: block;
}

.cybercontact-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  display: block;
}

.cybercontact-error ul {
  margin: 0;
  padding-left: 1.25rem;
}

.cybercontact-error ul li {
  margin: 0.2rem 0;
}

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 540px) {
  .cybercontact-half {
    flex: 0 0 100%;
  }
}

/* ── Hover / floating form ──────────────────────────────────────────── */

.ccf-float-btn {
  position: fixed;
  bottom: 24px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45);
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}

.ccf-float-btn:hover {
  background: #4f46e5;
  transform: scale(1.08);
}

.ccf-float-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.ccf-float-btn--right { right: 24px; }
.ccf-float-btn--left  { left: 24px;  }

.ccf-float-panel {
  position: fixed;
  bottom: 90px;
  width: 360px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.16);
  z-index: 99997;
  padding: 14px 20px 20px;
  display: none;
  box-sizing: border-box;
}

.ccf-float-panel--right { right: 24px; }
.ccf-float-panel--left  { left: 24px;  }

.ccf-float-panel.ccf-open { display: block; }

.ccf-float-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #9ca3af;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}

.ccf-float-close:hover { color: #374151; background: #f3f4f6; }

.ccf-float-panel .cybercontact-wrapper {
  max-width: 100%;
}

.ccf-float-panel .cybercontact-title {
  padding-right: 28px;
  margin-bottom: 0.75rem;
}

@media (max-width: 420px) {
  .ccf-float-panel {
    width: calc(100vw - 32px);
    right: 16px !important;
    left: 16px !important;
  }
}
