/* ---------------------------------------------
   DiPStrategy -- CTA Section
   style/cta.css
   --------------------------------------------- */

.cta-section {
  background: #080808;
  padding: 56px 56px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Subtle pattern overlay */
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/pattern-01.png');
  background-repeat: repeat;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

/* --- INNER --- */
.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

/* --- LABEL --- */
.cta-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #DEFF2D;
  margin-bottom: 14px;
}

.cta-label-star {
  width: 14px;
  height: 14px;
  animation: spin 12s linear infinite;
  flex-shrink: 0;
}

/* --- HEADLINE --- */
.cta-headline {
  font-family: 'Montserrat', sans-serif;
  font-weight: 200;
  font-size: clamp(22px, 2.8vw, 38px);
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.cta-headline strong {
  font-weight: 900;
  color: #DEFF2D;
}

/* --- DESC --- */
.cta-desc {
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.4);
  margin-bottom: 28px;
}

/* --- FORM -- single row --- */
.cta-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.cta-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: none;
  border-right: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 14px 18px;
  color: rgba(255,255,255,0.88);
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  outline: none;
  transition: background 0.2s;
  min-width: 0;
}

.cta-input::placeholder { color: rgba(255,255,255,0.22); }
.cta-input:focus { background: rgba(255,255,255,0.09); }

.cta-textarea {
  grid-column: 1 / -1;
  min-height: 108px;
  resize: vertical;
  border-right: none;
  line-height: 1.45;
}

.cta-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  grid-column: 1 / -1;
  background: #DEFF2D;
  border: none;
  padding: 14px 24px;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #080808;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.cta-submit:hover { background: #f0ff50; }
.cta-submit svg { width: 18px; height: 18px; flex-shrink: 0; }

.cta-submit:disabled {
  cursor: wait;
  opacity: 0.78;
}

.cta-form::after {
  content: attr(data-status-text);
  display: none;
  grid-column: 1 / -1;
  padding: 10px 14px;
  background: rgba(255,80,80,0.12);
  color: rgba(255,255,255,0.78);
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

.cta-form[data-status="error"]::after {
  display: block;
}

/* --- NOTIFY BAR (running text + status badges) --- */
.cta-notify {
  border: 1px solid rgba(222,255,45,0.2);
  border-radius: 8px;
  background: rgba(222,255,45,0.06);
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  margin-bottom: 8px;
  height: 40px;
}

.cta-notify[hidden] { display: none; }

.cta-notify-ticker-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  /* fade edges */
  mask-image: linear-gradient(to right, transparent 0%, #000 48px, #000 calc(100% - 48px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 48px, #000 calc(100% - 48px), transparent 100%);
}

.cta-notify-ticker {
  display: flex;
  height: 100%;
  align-items: center;
  white-space: nowrap;
  animation: ctaTicker 22s linear infinite;
}

.cta-notify-ticker-text {
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #DEFF2D;
  padding-right: 80px;
  flex-shrink: 0;
}

@keyframes ctaTicker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.cta-notify-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  flex-shrink: 0;
  border-left: 1px solid rgba(255,255,255,0.08);
  height: 100%;
}

.cta-notify-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Barlow', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  white-space: nowrap;
}

.cta-notify-badge--ok {
  background: rgba(34,197,94,0.15);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.25);
}

.cta-notify-badge--fail {
  background: rgba(248,113,113,0.12);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.2);
}

.cta-notify-badge svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

/* --- FORM HIDE (saat sudah submit) --- */
.cta-form.is-hidden {
  display: none;
}

.cta-chat {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  text-align: left;
}

.cta-chat[hidden] {
  display: none;
}

.cta-chat-window {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding: 18px;
}

.cta-chat-message {
  max-width: 82%;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

.cta-chat-message--visitor {
  align-self: flex-end;
  background: #DEFF2D;
  color: #080808;
}

.cta-chat-message--assistant {
  align-self: flex-start;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.84);
}

.cta-chat-form {
  display: grid;
  grid-template-columns: 1fr 48px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.cta-chat-input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  padding: 14px 16px;
}

.cta-chat-input::placeholder {
  color: rgba(255,255,255,0.24);
}

.cta-chat-submit {
  border: 0;
  background: #DEFF2D;
  color: #080808;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cta-chat-submit svg {
  width: 18px;
  height: 18px;
}

/* --- NOTE --- */
.cta-note {
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 11px;
  color: rgba(255,255,255,0.18);
  margin-top: 12px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .cta-section { padding: 48px 24px; }
  .cta-form    { grid-template-columns: 1fr; border-radius: 10px; }
  .cta-input   { border-right: none; }
  .cta-submit  { justify-content: center; }
}
