/* ============================================================
   NoviOcean Contact Form — v2.0.0 Styles
   ============================================================ */

.nocn-contact-wrap {
  --nocn-navy:       #0a2540;
  --nocn-blue:       #0ea5e9;
  --nocn-blue-dk:    #0284c7;
  --nocn-blue-lt:    #e0f2fe;
  --nocn-ink:        #0f172a;
  --nocn-text:       #334155;
  --nocn-muted:      #64748b;
  --nocn-muted-2:    #94a3b8;
  --nocn-border:     #e2e8f0;
  --nocn-border-hv:  #cbd5e1;
  --nocn-input-bg:   #ffffff;
  --nocn-card-bg:    #ffffff;
  --nocn-page-bg:    transparent;
  --nocn-req:        #ef4444;
  --nocn-success-bg: #ecfdf5;
  --nocn-success-fg: #065f46;
  --nocn-success-bd: #a7f3d0;
  --nocn-error-bg:   #fef2f2;
  --nocn-error-fg:   #991b1b;
  --nocn-error-bd:   #fecaca;
  --nocn-radius:     10px;
  --nocn-radius-lg:  16px;
  --nocn-shadow:     0 10px 40px -10px rgba(10, 37, 64, 0.12);

  display: flex;
  justify-content: center;
  padding: 32px 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
  width: 100%;
}

.nocn-contact-wrap *,
.nocn-contact-wrap *::before,
.nocn-contact-wrap *::after {
  box-sizing: border-box;
}

/* -------- Card -------- */
.nocn-contact-card {
  width: 100%;
  max-width: 720px;
  background: var(--nocn-card-bg);
  border-radius: var(--nocn-radius-lg);
  box-shadow: var(--nocn-shadow);
  padding: 36px 40px;
  position: relative;
}

/* -------- Form layout -------- */
.nocn-contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nocn-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.nocn-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* -------- Labels -------- */
.nocn-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--nocn-navy);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nocn-req {
  color: var(--nocn-req);
  font-weight: 700;
}

.nocn-hint {
  font-weight: 400;
  color: var(--nocn-muted-2);
  font-size: 12px;
  margin-left: 2px;
}

/* -------- Input wrap (with icon) -------- */
.nocn-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.nocn-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--nocn-muted-2);
  pointer-events: none;
  z-index: 1;
  transition: color 0.2s ease;
}

.nocn-input-wrap input,
.nocn-input-wrap select {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1px solid var(--nocn-border);
  border-radius: var(--nocn-radius);
  background: var(--nocn-input-bg);
  color: var(--nocn-ink);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.nocn-input-wrap input::placeholder {
  color: var(--nocn-muted-2);
  opacity: 1;
}

.nocn-input-wrap input:hover,
.nocn-input-wrap select:hover {
  border-color: var(--nocn-border-hv);
}

.nocn-input-wrap input:focus,
.nocn-input-wrap select:focus {
  border-color: var(--nocn-blue);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.nocn-input-wrap input:focus ~ .nocn-input-icon,
.nocn-input-wrap:focus-within .nocn-input-icon {
  color: var(--nocn-blue);
}

/* -------- Select (with chevron) -------- */
.nocn-select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--nocn-muted);
  border-bottom: 2px solid var(--nocn-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  transition: border-color 0.2s ease;
}

.nocn-select-wrap:focus-within::after {
  border-color: var(--nocn-blue);
}

.nocn-select-wrap select {
  padding-left: 16px; /* no icon inside country/industry, so reclaim the space */
  padding-right: 40px;
  cursor: pointer;
}

.nocn-select-wrap select:invalid {
  color: var(--nocn-muted-2);
}

.nocn-select-wrap option {
  color: var(--nocn-ink);
}

/* -------- Phone row (dial code + number) -------- */
.nocn-phone-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
}

.nocn-dial-wrap {
  position: relative;
}

.nocn-dial-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--nocn-muted);
  border-bottom: 2px solid var(--nocn-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.nocn-dial-select {
  width: 100%;
  padding: 12px 32px 12px 14px;
  border: 1px solid var(--nocn-border);
  border-radius: var(--nocn-radius);
  background: var(--nocn-input-bg);
  color: var(--nocn-ink);
  font-size: 14px;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

/* Flag rendering for country dropdown */
.nocn-select-wrap select,
.nocn-select-wrap option {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', inherit;
}

.nocn-dial-select:hover { border-color: var(--nocn-border-hv); }
.nocn-dial-select:focus {
  border-color: var(--nocn-blue);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

/* -------- Textarea (with character counter) -------- */
.nocn-textarea-wrap {
  position: relative;
}

.nocn-textarea-wrap textarea {
  width: 100%;
  padding: 12px 14px 26px;
  border: 1px solid var(--nocn-border);
  border-radius: var(--nocn-radius);
  background: var(--nocn-input-bg);
  color: var(--nocn-ink);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 90px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.nocn-textarea-wrap textarea::placeholder {
  color: var(--nocn-muted-2);
  opacity: 1;
}

.nocn-textarea-wrap textarea:hover { border-color: var(--nocn-border-hv); }
.nocn-textarea-wrap textarea:focus {
  border-color: var(--nocn-blue);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.nocn-char-counter {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 11px;
  color: var(--nocn-muted-2);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.nocn-char-counter.is-near-limit { color: #f59e0b; }
.nocn-char-counter.is-at-limit   { color: var(--nocn-req); }

/* -------- Honeypot -------- */
.nocn-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* -------- Submit button (smaller, blue, interactive) -------- */
.nocn-submit-row {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.nocn-submit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 28px;
  background: linear-gradient(135deg, var(--nocn-blue) 0%, var(--nocn-blue-dk) 100%);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 4px 14px -3px rgba(14, 165, 233, 0.5);
  min-width: 120px;
  overflow: hidden;
}

/* Subtle shine sweep on hover */
.nocn-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 100%
  );
  transition: left 0.6s ease;
}

.nocn-submit-btn:hover:not(:disabled)::before {
  left: 100%;
}

.nocn-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -4px rgba(14, 165, 233, 0.6);
  background: linear-gradient(135deg, var(--nocn-blue-dk) 0%, var(--nocn-blue) 100%);
}

.nocn-submit-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px -2px rgba(14, 165, 233, 0.5);
}

.nocn-submit-btn:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.35);
  outline-offset: 2px;
}

.nocn-submit-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

.nocn-btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nocn-submit-btn:hover:not(:disabled) .nocn-btn-icon {
  transform: translateX(2px) translateY(-2px);
}

.nocn-btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: nocn-spin 0.7s linear infinite;
}

.nocn-submit-btn.is-loading .nocn-btn-icon   { display: none; }
.nocn-submit-btn.is-loading .nocn-btn-spinner { display: inline-block; }

@keyframes nocn-spin { to { transform: rotate(360deg); } }

/* -------- Status message -------- */
.nocn-form-status {
  display: none;
  padding: 12px 16px;
  border-radius: var(--nocn-radius);
  font-size: 14px;
  text-align: center;
  margin-top: 4px;
  line-height: 1.5;
}

.nocn-form-status.is-visible {
  display: block;
  animation: nocn-fadein 0.3s ease;
}

.nocn-form-status.is-success {
  background: var(--nocn-success-bg);
  color: var(--nocn-success-fg);
  border: 1px solid var(--nocn-success-bd);
}

.nocn-form-status.is-error {
  background: var(--nocn-error-bg);
  color: var(--nocn-error-fg);
  border: 1px solid var(--nocn-error-bd);
}

@keyframes nocn-fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -------- Mobile -------- */
@media (max-width: 640px) {
  .nocn-contact-card {
    padding: 24px 20px;
  }
  .nocn-row-2 {
    grid-template-columns: 1fr;
  }
  .nocn-phone-row {
    grid-template-columns: 150px 1fr;
  }
}

@media (max-width: 420px) {
  .nocn-phone-row {
    grid-template-columns: 1fr;
  }
}

/* -------- Respect reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  .nocn-submit-btn,
  .nocn-submit-btn::before,
  .nocn-btn-icon,
  .nocn-input-icon,
  .nocn-form-status {
    transition: none !important;
    animation: none !important;
  }
}
