/* ============================================================
   Agentic Web Services — Checkout Modal CSS
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────────────────────────────── */
.ctlp-co-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}

/* ── Modal ────────────────────────────────────────────────────────────────────── */
.ctlp-co-modal {
  background: #0d1117;
  border: 1px solid rgba(0,227,170,0.25);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 36px;
  position: relative;
  box-shadow: 0 0 60px rgba(0,227,170,0.08), 0 24px 80px rgba(0,0,0,0.7);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #fff;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,227,170,0.2) transparent;
}
.ctlp-co-modal::-webkit-scrollbar { width: 5px; }
.ctlp-co-modal::-webkit-scrollbar-track { background: transparent; }
.ctlp-co-modal::-webkit-scrollbar-thumb { background: rgba(0,227,170,0.2); border-radius: 3px; }

/* ── Close ────────────────────────────────────────────────────────────────────── */
.ctlp-co-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #666;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
}
.ctlp-co-close:hover { color: #fff; }

/* ── Header / Badge ───────────────────────────────────────────────────────────── */
.ctlp-co-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,227,170,0.1);
  border: 1px solid rgba(0,227,170,0.25);
  border-radius: 30px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #00E3AA;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.ctlp-co-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.ctlp-co-sub {
  font-size: 15px;
  color: #888;
  margin: 0 0 28px;
}

/* ── Auth Buttons ─────────────────────────────────────────────────────────────── */
.ctlp-co-auth-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ctlp-co-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  font-family: 'Inter', sans-serif;
}
.ctlp-co-auth-btn:hover { opacity: 0.85; }

.ctlp-co-auth-google {
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
}

.ctlp-co-auth-telegram {
  background: #0088cc;
  color: #fff;
  border: none;
}

.ctlp-co-auth-divider {
  text-align: center;
  color: #444;
  font-size: 13px;
  position: relative;
  margin: 4px 0;
}
.ctlp-co-auth-divider::before,
.ctlp-co-auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 44%;
  height: 1px;
  background: #222;
}
.ctlp-co-auth-divider::before { left: 0; }
.ctlp-co-auth-divider::after  { right: 0; }

/* ── Inputs ───────────────────────────────────────────────────────────────────── */
.ctlp-co-input {
  width: 100%;
  background: #0d1f17;
  border: 1px solid rgba(0,227,170,0.2);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}
.ctlp-co-input:focus  { border-color: #00E3AA; }
.ctlp-co-input::placeholder { color: #444; }

.ctlp-co-email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Primary Button ───────────────────────────────────────────────────────────── */
.ctlp-co-btn-primary {
  background: linear-gradient(135deg, #00E3AA, #00b884);
  color: #0d1117;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 20px rgba(0,227,170,0.3);
  font-family: 'Inter', sans-serif;
}
.ctlp-co-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(0,227,170,0.45);
}
.ctlp-co-btn-full {
  width: 100%;
  font-size: 16px;
  padding: 16px;
}

/* ── API Row ──────────────────────────────────────────────────────────────────── */
.ctlp-co-api-row { margin-bottom: 24px; }

.ctlp-co-api-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 8px;
}

.ctlp-co-api-optional {
  font-weight: 400;
  color: #555;
  margin-left: 4px;
}

.ctlp-co-credits-link {
  display: inline-block;
  margin-left: 8px;
  color: #4a9eff;
  font-size: 12px;
  text-decoration: none;
  font-weight: 600;
}
.ctlp-co-credits-link:hover { text-decoration: underline; }

/* ── Add-ons Grid ─────────────────────────────────────────────────────────────── */
.ctlp-co-addons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.ctlp-co-addon-cube {
  position: relative;
  background: #0d1f17;
  border: 1px solid rgba(0,227,170,0.12);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: block;
}
.ctlp-co-addon-cube:hover { border-color: rgba(0,227,170,0.3); }

.ctlp-co-addon-cube input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ctlp-co-addon-cube.selected {
  border-color: #00E3AA;
  background: rgba(0,227,170,0.06);
}

.ctlp-co-addon-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ctlp-co-addon-icon  { font-size: 22px; margin-bottom: 4px; }
.ctlp-co-addon-name  { font-size: 13px; font-weight: 700; color: #fff; line-height: 1.3; }
.ctlp-co-addon-desc  { font-size: 11px; color: #666; line-height: 1.4; margin-top: 2px; }
.ctlp-co-addon-price { font-size: 13px; font-weight: 700; color: #00E3AA; margin-top: 6px; }

.ctlp-co-addon-check-mark {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 20px;
  height: 20px;
  background: #00E3AA;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #0d1117;
}
.ctlp-co-addon-cube.selected .ctlp-co-addon-check-mark { display: flex; }

/* ── Summary ──────────────────────────────────────────────────────────────────── */
.ctlp-co-summary {
  background: #0a0e14;
  border: 1px solid rgba(0,227,170,0.15);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.ctlp-co-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.ctlp-co-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #888;
}
.ctlp-co-summary-row.base {
  color: #ccc;
  font-weight: 600;
}

.ctlp-co-summary-divider {
  height: 1px;
  background: rgba(0,227,170,0.1);
  margin: 8px 0;
}

.ctlp-co-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.ctlp-co-summary-total span:last-child { color: #00E3AA; }

/* ── Legal ────────────────────────────────────────────────────────────────────── */
.ctlp-co-legal {
  font-size: 11px;
  color: #444;
  margin-top: 16px;
}
.ctlp-co-legal a { color: #555; text-decoration: underline; }

/* ── Success ──────────────────────────────────────────────────────────────────── */
.ctlp-co-success {
  text-align: center;
  padding: 20px 0;
}

.ctlp-co-success-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: ctlp-success-pop 0.4s ease;
  display: block;
}

@keyframes ctlp-success-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ── GIS button container ─────────────────────────────────────────────────────── */
#ctlpGoogleSignIn > div {
  width: 100% !important;
}
#ctlpGoogleSignIn iframe {
  width: 100% !important;
}

/* ── Mobile ───────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .ctlp-co-modal {
    padding: 28px 20px;
  }
  .ctlp-co-addons-grid {
    grid-template-columns: 1fr;
  }
  .ctlp-co-title {
    font-size: 22px;
  }
}

/* ── Plan Section ─────────────────────────────────────────────────────────────── */
.ctlp-plan-hero {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 4px 0 12px;
  gap: 12px;
}
.ctlp-plan-hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}
.ctlp-plan-hero-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #00E3AA;
  white-space: nowrap;
}
.ctlp-plan-hero-period {
  font-size: 18px;
  font-weight: 500;
  color: #666;
}
.ctlp-plan-desc {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* ── Section Labels ───────────────────────────────────────────────────────────── */
.ctlp-items-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #444;
  padding-bottom: 10px;
  border-bottom: 1px solid #1a1f2a;
  margin-bottom: 0;
}

/* ── Line Items ───────────────────────────────────────────────────────────────── */
.ctlp-items-list {
  margin-bottom: 28px;
}
.ctlp-item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #111722;
}
.ctlp-item-row:last-child { border-bottom: none; }
.ctlp-item-left { flex: 1; min-width: 0; }
.ctlp-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #e8e8e8;
  margin-bottom: 3px;
}
.ctlp-item-desc {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}
.ctlp-item-amount {
  font-size: 12px;
  font-weight: 700;
  color: #00E3AA;
  white-space: nowrap;
  padding-top: 2px;
  min-width: 72px;
  text-align: right;
}

/* ── Coming Soon Row ─────────────────────────────────────────────────────────── */
.ctlp-item-soon-label {
  font-size: 12px;
  font-weight: 500;
  color: #555;
  font-style: italic;
}
.ctlp-item-soon-badge {
  font-size: 10px;
  font-weight: 700;
  color: #555;
  border: 1px solid #2a3040;
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
  min-width: auto;
  text-align: right;
}

/* ── Taxes Note ───────────────────────────────────────────────────────────────── */
.ctlp-taxes-note {
  font-size: 11px;
  color: #333;
  margin-top: 8px;
  text-align: center;
}

/* ── Mobile additions ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .ctlp-plan-hero-name { font-size: 20px; }
  .ctlp-plan-hero-price { font-size: 28px; }
  .ctlp-item-row { gap: 10px; }
  .ctlp-item-amount { min-width: 58px; }
}

/* ── Addon Rows ───────────────────────────────────────────────────────────────── */
.ctlp-addon-list { margin-bottom: 28px; }

.ctlp-addon-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #111722;
  cursor: pointer;
  user-select: none;
}
.ctlp-addon-row:last-child { border-bottom: none; }
.ctlp-addon-row:hover .ctlp-addon-tick-box { border-color: rgba(0,227,170,0.4); }

.ctlp-addon-desc {
  font-size: 12px;
  color: #fff;
  line-height: 1.5;
  margin-top: 3px;
}

.ctlp-addon-price-tag {
  font-size: 14px;
  font-weight: 700;
  color: #00E3AA;
  margin-top: 6px;
}

.ctlp-addon-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 0;
  flex-shrink: 0;
}

.ctlp-addon-tick-box {
  position: relative;
  width: 24px;
  height: 24px;
  border: 2px solid #2a3040;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  background: transparent;
}
.ctlp-addon-row.selected .ctlp-addon-tick-box {
  background: #00E3AA;
  border-color: #00E3AA;
}
.ctlp-addon-tick-box input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.ctlp-addon-tick-check {
  display: none;
  color: #0d1117;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.ctlp-addon-row.selected .ctlp-addon-tick-check { display: block; }

.ctlp-addon-status {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
  min-width: 56px;
}
.ctlp-addon-status::after {
  content: 'Not Added';
  color: #cc4444;
}
.ctlp-addon-row.selected .ctlp-addon-status::after {
  content: 'Included';
  color: #00E3AA;
}
