/* Port of ContactSection.astro scoped styles */

.contact-section {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.contact-section--standalone {
  border-top: none;
}

.bg-glow {
  position: absolute;
  top: 20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(27, 84, 216, 0.06) 0%, transparent 70%);
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.contact-split::after {
  content: '';
  position: absolute;
  top: 10%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212, 160, 18, 0.04) 0%, transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.contact-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .contact-split { gap: 24px; }
}

@media (min-width: 1024px) {
  .contact-split {
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
  }
}

.contact-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: static;
}

@media (min-width: 1024px) {
  .contact-left {
    gap: 16px;
    position: sticky;
    top: 100px;
  }
}

.contact-intro {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-heading {
  font-size: clamp(1.1rem, 3vw + 0.4rem, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--heading);
  margin: 0;
}

.contact-sub {
  font-size: var(--fs-body, 1rem);
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* ─── Direct cards ─────────────────────────────────────────── */
.direct-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.direct-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  .direct-card {
    gap: 12px;
    padding: 12px 16px;
    border-radius: 18px;
  }
}

.direct-card:hover {
  transform: translateY(-3px);
  border-color: rgba(27, 84, 216, 0.25);
  background-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
}

.bg-blue { background-color: rgba(27, 84, 216, 0.12); border: 1px solid rgba(27, 84, 216, 0.20); }
.bg-green { background-color: rgba(37, 211, 102, 0.12); border: 1px solid rgba(37, 211, 102, 0.2); }
.bg-gray { background-color: var(--surface-2); border: 1px solid var(--border); }
.icon-blue { color: var(--primary-hover); }
.icon-green { color: var(--success); }
.icon-gray { color: var(--heading); }

.card-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-label {
  font-size: var(--fs-xs, 0.75rem);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-value {
  font-size: var(--fs-small, 0.875rem);
  font-weight: 700;
  color: var(--heading);
}

/* ─── Disclaimer ────────────────────────────────────────────── */
.disclaimer-box {
  border-radius: 14px;
  padding: 14px 16px;
  font-size: var(--fs-small, 0.875rem);
  line-height: 1.6;
  border: 1px solid rgba(27, 84, 216, 0.15);
  background: var(--primary-light);
}

.disclaimer-box .disclaimer-title {
  display: block;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 4px;
}

.disclaimer-box p {
  color: var(--muted);
  margin: 0;
}

/* ─── Form card ────────────────────────────────────────────── */
.form-card {
  padding: 0 !important;
  height: 100%;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.form-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, #4b6fcc 100%);
  border-radius: 20px 20px 0 0;
}

@media (max-width: 480px) {
  .form-header { padding: 16px 18px; }
}

.form-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  flex-shrink: 0;
}

.form-header-text { display: flex; flex-direction: column; gap: 2px; }
.form-header-title { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.2; }
.form-header-sub { font-size: 12px; color: rgba(255, 255, 255, 0.78); line-height: 1.3; }

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.trust-item svg { color: var(--success); flex-shrink: 0; }

.trust-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
}

@media (max-width: 480px) {
  .contact-form { gap: 8px; padding: 14px; }
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 600px) {
  .field-row { flex-direction: row; }
  .field-row .field { flex: 1; min-width: 0; }
}

.field-label { font-size: 14px; font-weight: 600; color: var(--heading); line-height: 1.3; }
.required { color: var(--primary); }
.optional { font-weight: 500; color: var(--muted); font-size: 13px; }

.field-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--heading);
  font-size: 16px;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.field-input:hover:not(:focus) { border-color: rgba(27, 84, 216, 0.2); }
.field-input::placeholder { color: var(--muted); opacity: 0.8; }
.field-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27, 84, 216, 0.12); background-color: var(--surface); }
.field-textarea { min-height: 88px; resize: vertical; line-height: 1.5; }

@media (max-width: 480px) {
  .field-textarea { min-height: 68px; }
}

.upload-input { display: none; }

.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  background-color: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.upload-zone:hover,
.upload-zone:focus-visible {
  outline: none;
  border-color: rgba(27, 84, 216, 0.4);
  background-color: var(--primary-light);
}

.upload-zone.dragover { border-color: var(--primary); background-color: var(--primary-light); }
.upload-zone.has-files { padding: 10px 20px; }

.upload-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: rgba(27, 84, 216, 0.10);
  border: 1px solid rgba(27, 84, 216, 0.18);
  color: var(--primary-hover);
  margin-bottom: 2px;
}

.upload-label { font-size: var(--fs-small, 0.875rem); font-weight: 600; color: var(--heading); }
.upload-sub { font-size: var(--fs-xs, 0.75rem); color: var(--muted); }
.upload-error { margin: 6px 0 0; font-size: var(--fs-xs, 0.75rem); font-weight: 600; color: var(--error); }

.file-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.file-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); font-size: var(--fs-small, 0.875rem); }
.file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); font-weight: 500; }
.file-size { color: var(--muted); font-size: var(--fs-xs, 0.75rem); white-space: nowrap; }
.file-remove { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 50%; border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0; flex-shrink: 0; transition: color 0.15s ease; }
.file-remove:hover { color: var(--heading); }

.form-agreement { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-small, 0.875rem); line-height: 1.5; color: var(--text); }
.checkbox-input { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--border); accent-color: var(--primary-hover); margin-top: 2px; cursor: pointer; }
.checkbox-label { cursor: pointer; color: var(--muted); }
.checkbox-label .legal-link { color: var(--heading); text-decoration: underline; }
.checkbox-label .legal-link:hover { color: var(--primary-hover); }

.submit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  width: 100%;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--primary) 0%, #4b6fcc 100%);
  color: #fff;
  font-size: var(--fs-body, 1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(27, 84, 216, 0.35);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  overflow: hidden;
}

.submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.22) 50%, transparent 60%);
  background-size: 200% 100%;
  background-position: 200% 0;
  transition: background-position 0.5s ease;
  border-radius: 9999px;
}

.submit-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(27, 84, 216, 0.5); }
.submit-btn:hover:not(:disabled)::after { background-position: -200% 0; }
.submit-btn:active:not(:disabled) { transform: translateY(0); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 480px) { .submit-btn { height: 46px; font-size: 15px; } }

/* Success/Error states */
.form-success { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 24px; gap: 20px; animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.form-error {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  text-align: left;
  padding: 14px 20px 18px;
  gap: 4px 12px;
  border-top: 1px solid rgba(220, 38, 38, 0.18);
  background: rgba(220, 38, 38, 0.06);
  animation: fadeInUp 0.25s ease forwards;
}
.success-icon-wrapper, .error-icon-wrapper { display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; border-radius: 50%; margin-bottom: 8px; }
.success-icon-wrapper { background-color: rgba(47, 158, 68, 0.1); border: 2px solid var(--success); color: var(--success); box-shadow: 0 0 20px rgba(47, 158, 68, 0.15); }
.error-icon-wrapper { grid-row: 1 / span 2; width: 34px; height: 34px; margin: 0; background-color: rgba(220, 38, 38, 0.1); border: 1px solid rgba(220, 38, 38, 0.5); color: #DC2626; box-shadow: none; flex-shrink: 0; }
.error-icon-wrapper svg { width: 18px; height: 18px; }
.success-title, .error-title { font-size: var(--fs-h3, 1.25rem); font-weight: 700; color: var(--heading); margin: 0; }
.form-error .error-title { grid-column: 2; font-size: 15px; line-height: 1.3; }
.success-desc, .error-desc { font-size: var(--fs-body, 1rem); line-height: 1.6; color: var(--text); max-width: 360px; margin: 0; }
.form-error .error-desc { grid-column: 2; font-size: 14px; line-height: 1.45; max-width: none; color: var(--muted); }
.retry-btn { margin-top: 8px; padding: 12px 24px; font-size: var(--fs-body, 1rem); font-weight: 600; color: var(--primary); background: transparent; border: 2px solid var(--primary); border-radius: 12px; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
.form-error .retry-btn { grid-column: 3; grid-row: 1 / span 2; margin-top: 0; margin-left: auto; padding: 8px 12px; font-size: 13px; border-width: 1px; border-radius: 9px; flex-shrink: 0; }
.retry-btn:hover { background-color: var(--primary); color: #fff; }

@media (max-width: 520px) {
  .form-error { grid-template-columns: auto minmax(0, 1fr); padding: 14px; }
  .form-error .retry-btn { grid-column: 2; grid-row: 3; width: 100%; margin-left: 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
