/* =============================================================
   Groeniek - Contact Overlay
   ============================================================= */

.co-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.co-overlay[hidden] { display: none }

.co-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,14,26,.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Panel - mobile: slides up from bottom */
.co-panel {
  position: relative;
  z-index: 1;
  background: var(--card, #fefdfb);
  width: 100%;
  max-height: 95dvh;
  max-height: 95vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 40px rgba(0,0,0,.2);
}

/* Desktop: centered card */
@media (min-width: 640px) {
  .co-overlay { align-items: center }
  .co-panel {
    width: 560px;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 60px rgba(0,0,0,.24);
  }
}

/* ---- Header ---- */
.co-header {
  background: var(--groeniek-blue, hsl(220 70% 18%));
  color: #fff;
  padding: 20px 24px 18px;
  position: relative;
}

.co-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  border: none;
  background: rgba(255,255,255,.12);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  padding: 0;
}
.co-close:hover { background: rgba(255,255,255,.24) }

.co-context-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: hsl(45 20% 80%);
  margin-bottom: 4px;
}

.co-context-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  max-width: 400px;
  padding-right: 44px;
}

.co-context-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
}

.co-context-tag {
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,.15);
  color: #fff;
  border-radius: 3px;
  padding: 3px 8px;
}
.co-context-tag.yellow {
  background: var(--groeniek-yellow, hsl(42 100% 55%));
  color: hsl(220 70% 18%);
}

/* ---- Body / Form ---- */
.co-body { padding: 20px 24px 0 }

.co-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.co-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.co-field.full { grid-column: 1 / -1 }

.co-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg, hsl(220 60% 10%));
}

.co-field input,
.co-field select,
.co-field textarea {
  border: 1px solid var(--border-strong, hsl(220 15% 75%));
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 16px; /* prevent iOS auto-zoom */
  font-family: inherit;
  color: var(--fg, hsl(220 60% 10%));
  background: #fff;
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .15s;
  -webkit-appearance: none;
  appearance: none;
}

.co-field input:focus,
.co-field select:focus,
.co-field textarea:focus {
  outline: none;
  border-color: var(--groeniek-blue, hsl(220 70% 18%));
  box-shadow: 0 0 0 3px hsl(220 70% 18% / .1);
}

.co-field input.co-invalid,
.co-field select.co-invalid {
  border-color: hsl(0 72% 45%);
}

.co-err {
  font-size: 12px;
  color: hsl(0 72% 45%);
  display: none;
}
.co-err.visible { display: block }

/* Submit */
.co-submit-row { grid-column: 1 / -1; margin-top: 4px }

.co-btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  background: var(--groeniek-blue, hsl(220 70% 18%));
  color: #fff;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  min-height: 52px;
  transition: background .15s;
}
.co-btn-submit:hover  { background: var(--groeniek-blue-dark, hsl(222 80% 12%)) }
.co-btn-submit:disabled { opacity: .65; cursor: not-allowed }

/* ---- Alt contact (bellen / WhatsApp) ---- */
.co-alt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border, hsl(45 15% 85%));
  margin-top: 16px;
}

.co-alt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong, hsl(220 15% 75%));
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg, hsl(220 60% 10%));
  background: #fff;
  text-decoration: none;
  min-height: 44px;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.co-alt-btn:hover {
  border-color: var(--groeniek-blue, hsl(220 70% 18%));
  color: var(--groeniek-blue, hsl(220 70% 18%));
}
.co-alt-btn svg { flex-shrink: 0 }

/* Privacy note */
.co-privacy {
  font-size: 12px;
  color: var(--fg-muted, hsl(220 20% 40%));
  text-align: center;
  padding: 0 24px 18px;
  line-height: 1.5;
}

/* ---- Success screen ---- */
.co-success {
  padding: 36px 24px 32px;
  text-align: center;
}

.co-success-icon {
  width: 56px;
  height: 56px;
  background: hsl(155 70% 32%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.co-success-icon svg { color: #fff }

.co-success h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 22px;
  color: var(--fg, hsl(220 60% 10%));
  margin-bottom: 10px;
}

.co-success p {
  font-size: 15px;
  color: var(--fg-muted, hsl(220 20% 40%));
  margin-bottom: 22px;
  line-height: 1.55;
}

.co-success .co-alt {
  border: 1px solid var(--border, hsl(45 15% 85%));
  border-radius: 6px;
  padding: 14px;
  margin-top: 0;
}

/* ---- Animations ---- */
@media (prefers-reduced-motion: no-preference) {
  .co-panel { animation: co-slide-up .22s cubic-bezier(.22,1,.36,1) }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 640px) {
  .co-panel { animation: co-fade-scale .2s cubic-bezier(.22,1,.36,1) }
}

@keyframes co-slide-up {
  from { transform: translateY(28px); opacity: 0 }
  to   { transform: translateY(0);    opacity: 1 }
}
@keyframes co-fade-scale {
  from { transform: scale(.97); opacity: 0 }
  to   { transform: scale(1);   opacity: 1 }
}

/* Scroll lock when overlay is open */
body.co-open { overflow: hidden }
