/* ═══════════════════════════════════════════════════════
   CONTACT HUB — Reusable modal component
   People's Industry Investments
   ═══════════════════════════════════════════════════════ */

/* ── Overlay ── */
.ch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 12, 28, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0,.6,.4,1);
}
.ch-overlay.ch--open {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal shell ── */
.ch-modal {
  background: #0a1628;
  border: 1px solid rgba(201,168,76,.22);
  border-radius: 20px;
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  transform: translateY(32px) scale(.97);
  transition: transform 0.32s cubic-bezier(0,.6,.4,1), opacity 0.32s cubic-bezier(0,.6,.4,1);
  opacity: 0;
  position: relative;
  box-shadow:
    0 32px 80px rgba(0,0,0,.6),
    0 0 0 1px rgba(201,168,76,.08) inset,
    0 1px 0 rgba(255,255,255,.06) inset;
}
.ch-overlay.ch--open .ch-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Gold top accent line */
.ch-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c9a84c 30%, #e0b95c 60%, transparent);
}

/* ── Header ── */
.ch-header {
  padding: 28px 28px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.ch-header__text {}
.ch-eyebrow {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #c9a84c;
  margin-bottom: 6px;
}
.ch-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}
.ch-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s, color .18s, transform .18s;
  font-size: 1.1rem;
  line-height: 1;
}
.ch-close:hover {
  background: rgba(201,168,76,.18);
  color: #c9a84c;
  transform: rotate(90deg);
}

/* ── Views (options / form / chat / success) ── */
.ch-view {
  display: none;
}
.ch-view.ch-view--active {
  display: block;
}

/* ── Options view ── */
.ch-options {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ch-option {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .18s;
  position: relative;
  overflow: hidden;
}
.ch-option::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .2s;
}
.ch-option:hover {
  background: rgba(201,168,76,.1);
  border-color: rgba(201,168,76,.3);
  transform: translateX(3px);
  text-decoration: none;
}
.ch-option:hover::after {
  opacity: 1;
}
.ch-option:active {
  transform: translateX(1px) scale(.99);
}

.ch-option__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(201,168,76,.12);
  border: 1px solid rgba(201,168,76,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.ch-option:hover .ch-option__icon {
  background: rgba(201,168,76,.2);
}
.ch-option__icon svg {
  color: #c9a84c;
}

.ch-option__body {
  flex: 1;
}
.ch-option__label {
  font-size: .95rem;
  font-weight: 600;
  color: #ffffff;
  display: block;
  margin-bottom: 2px;
}
.ch-option__sub {
  font-size: .78rem;
  color: rgba(255,255,255,.48);
  display: block;
}

.ch-option__arrow {
  color: rgba(255,255,255,.3);
  flex-shrink: 0;
  transition: color .2s, transform .2s;
}
.ch-option:hover .ch-option__arrow {
  color: #c9a84c;
  transform: translateX(3px);
}

/* Live badge */
.ch-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .68rem;
  font-weight: 600;
  color: #34d399;
  letter-spacing: .04em;
  margin-left: 8px;
  vertical-align: middle;
}
.ch-live-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 2px rgba(52,211,153,.3);
  animation: ch-pulse 2s infinite;
}
@keyframes ch-pulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(52,211,153,.3); }
  50% { box-shadow: 0 0 0 5px rgba(52,211,153,.1); }
}

/* Divider between options */
.ch-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,.06);
  margin: 0;
}

/* ── Message form view ── */
.ch-form-view {
  padding: 0 28px 28px;
}
.ch-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  cursor: pointer;
  margin-bottom: 20px;
  padding: 0;
  background: none;
  border: none;
  transition: color .18s;
}
.ch-back:hover { color: #c9a84c; }

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

.ch-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ch-field label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.ch-field input,
.ch-field select,
.ch-field textarea {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: .88rem;
  font-family: 'Inter', system-ui, sans-serif;
  color: #ffffff;
  transition: border-color .18s, background .18s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}
.ch-field input::placeholder,
.ch-field textarea::placeholder {
  color: rgba(255,255,255,.25);
}
.ch-field input:focus,
.ch-field select:focus,
.ch-field textarea:focus {
  border-color: rgba(201,168,76,.55);
  background: rgba(201,168,76,.06);
}
.ch-field select option {
  background: #0a1628;
  color: #fff;
}
.ch-field textarea {
  resize: vertical;
  min-height: 90px;
}

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

.ch-submit {
  background: linear-gradient(135deg, #c9a84c 0%, #e0b95c 100%);
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-size: .9rem;
  font-weight: 700;
  font-family: 'Inter', system-ui, sans-serif;
  color: #0a1628;
  cursor: pointer;
  transition: opacity .18s, transform .18s;
  letter-spacing: .02em;
  margin-top: 4px;
}
.ch-submit:hover { opacity: .92; transform: translateY(-1px); }
.ch-submit:active { transform: translateY(0); }
.ch-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ── Success view ── */
.ch-success {
  padding: 28px;
  text-align: center;
}
.ch-success__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(52,211,153,.12);
  border: 1px solid rgba(52,211,153,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.ch-success__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
}
.ch-success__body {
  font-size: .88rem;
  color: rgba(255,255,255,.55);
  line-height: 1.7;
  max-width: 320px;
  margin: 0 auto 24px;
}
.ch-success__close {
  background: rgba(201,168,76,.12);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 10px;
  padding: 12px 28px;
  font-size: .88rem;
  font-weight: 600;
  color: #c9a84c;
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  transition: background .18s;
}
.ch-success__close:hover {
  background: rgba(201,168,76,.22);
}

/* ── Chat view ── */
.ch-chat-view {
  padding: 0 28px 28px;
}
.ch-chat-box {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  overflow: hidden;
}
.ch-chat-header {
  padding: 14px 18px;
  background: rgba(201,168,76,.1);
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 12px;
}
.ch-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a84c, #e0b95c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .82rem;
  color: #0a1628;
  flex-shrink: 0;
}
.ch-chat-info {}
.ch-chat-name {
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.ch-chat-status {
  font-size: .72rem;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ch-chat-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
}

.ch-chat-messages {
  padding: 18px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ch-msg {
  display: flex;
  gap: 10px;
  max-width: 88%;
}
.ch-msg--agent {
  align-self: flex-start;
}
.ch-msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.ch-msg__bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: .83rem;
  line-height: 1.55;
}
.ch-msg--agent .ch-msg__bubble {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.88);
  border-bottom-left-radius: 4px;
}
.ch-msg--user .ch-msg__bubble {
  background: rgba(201,168,76,.18);
  color: #fff;
  border-bottom-right-radius: 4px;
  border: 1px solid rgba(201,168,76,.2);
}
.ch-msg__time {
  font-size: .65rem;
  color: rgba(255,255,255,.3);
  margin-top: 4px;
  align-self: flex-end;
}

.ch-chat-input-row {
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,.06);
  align-items: flex-end;
}
.ch-chat-input-row input {
  flex: 1;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px;
  padding: 10px 16px;
  font-size: .84rem;
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  outline: none;
  transition: border-color .18s;
}
.ch-chat-input-row input::placeholder { color: rgba(255,255,255,.3); }
.ch-chat-input-row input:focus { border-color: rgba(201,168,76,.45); }
.ch-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a84c, #e0b95c);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity .18s, transform .18s;
}
.ch-send-btn:hover { opacity: .88; transform: scale(1.05); }
.ch-send-btn:active { transform: scale(.97); }

.ch-chat-note {
  font-size: .72rem;
  color: rgba(255,255,255,.3);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}
.ch-chat-note a { color: rgba(201,168,76,.7); }

/* ── Call view ── */
.ch-call-view {
  padding: 8px 28px 28px;
  text-align: center;
}
.ch-call-pulse {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(52,211,153,.1);
  border: 2px solid rgba(52,211,153,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  animation: ch-ring 2.4s ease-in-out infinite;
}
@keyframes ch-ring {
  0%,100% { box-shadow: 0 0 0 0 rgba(52,211,153,.25); }
  50% { box-shadow: 0 0 0 18px rgba(52,211,153,0); }
}
.ch-call-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: .02em;
  margin-bottom: 6px;
}
.ch-call-sub {
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  margin-bottom: 24px;
}
.ch-call-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  border-radius: 50px;
  padding: 14px 32px;
  font-size: .95rem;
  font-weight: 700;
  font-family: 'Inter', system-ui, sans-serif;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .18s, transform .18s;
  box-shadow: 0 8px 24px rgba(34,197,94,.25);
}
.ch-call-btn:hover { opacity: .9; transform: translateY(-1px); text-decoration: none; color: #fff; }
.ch-call-hours {
  font-size: .75rem;
  color: rgba(255,255,255,.3);
  margin-top: 16px;
}

/* ── Mobile ── */
@media (max-width: 540px) {
  .ch-overlay { align-items: flex-end; padding: 0; }
  .ch-modal {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .ch-overlay.ch--open .ch-modal {
    transform: translateY(0);
  }
  .ch-form-row { grid-template-columns: 1fr; }
  .ch-header { padding: 22px 20px 0; }
  .ch-options { padding: 18px 20px 20px; }
  .ch-form-view,
  .ch-chat-view,
  .ch-call-view { padding-left: 20px; padding-right: 20px; }
}
