/* ============================================================
   Aastha HMS — Companion EULA / Terms Gate
   companion_eula.css
   ============================================================ */

#eula-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(160deg, #0f172a 0%, #134e4a 100%);
  display: flex; flex-direction: column;
  overflow-y: auto;
  font-family: 'Inter', sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Header */
.eula-header {
  padding: 1.25rem 1.25rem 0.5rem;
  text-align: center;
  flex-shrink: 0;
}
.eula-logo-row {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 0.4rem;
}
.eula-logo-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; box-shadow: 0 4px 16px rgba(13,148,136,.4);
}
.eula-app-name {
  font-size: 1.3rem; font-weight: 800; color: #fff;
  letter-spacing: -0.5px;
}
.eula-app-sub {
  font-size: 0.72rem; color: #94a3b8; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.eula-badge-row {
  display: flex; justify-content: center; gap: 6px;
  flex-wrap: wrap; margin-top: 0.5rem;
}
.eula-badge {
  padding: 3px 10px; border-radius: 20px; font-size: 0.68rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,.15);
}
.eula-badge-green  { background: rgba(34,197,94,.15); color: #4ade80; }
.eula-badge-blue   { background: rgba(59,130,246,.15); color: #60a5fa; }
.eula-badge-yellow { background: rgba(234,179,8,.15);  color: #fbbf24; }

/* Progress steps */
.eula-steps {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; padding: 0.75rem 1.25rem;
  flex-shrink: 0;
}
.eula-step {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  border: 2px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.4);
  transition: all .3s;
}
.eula-step.active { border-color: #0d9488; color: #0d9488; background: rgba(13,148,136,.12); }
.eula-step.done   { border-color: #22c55e; color: #22c55e; background: rgba(34,197,94,.12); }
.eula-step-line   { flex: 1; max-width: 40px; height: 1px; background: rgba(255,255,255,.15); }

/* Scroll content pane */
.eula-content {
  flex: 1; overflow-y: auto;
  padding: 0 1.25rem 1rem;
  -webkit-overflow-scrolling: touch;
}

.eula-section-title {
  font-size: 1rem; font-weight: 800; color: #fff;
  margin: 1rem 0 0.6rem;
  display: flex; align-items: center; gap: 8px;
}
.eula-section-title .eula-step-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(13,148,136,.3); border: 1.5px solid #0d9488;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: #0d9488;
}

.eula-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 1rem;
  margin-bottom: 0.75rem;
}
.eula-card p, .eula-card li {
  font-size: 0.82rem; color: #cbd5e1; line-height: 1.65; margin-bottom: 0.4rem;
}
.eula-card ul { padding-left: 1.2rem; margin: 0.4rem 0; }
.eula-card strong { color: #f1f5f9; }
.eula-card .eula-warn {
  color: #fbbf24; font-weight: 600;
}
.eula-card .eula-red {
  color: #f87171; font-weight: 600;
}
.eula-card .eula-green {
  color: #4ade80; font-weight: 600;
}

/* Scroll indicator */
.eula-scroll-hint {
  text-align: center; font-size: 0.72rem; color: #64748b;
  padding: 0.4rem 0 0.2rem;
  animation: pulse-opacity 2s ease-in-out infinite;
}
@keyframes pulse-opacity { 0%,100%{opacity:1} 50%{opacity:.4} }

/* Checkbox rows */
.eula-checkboxes { padding: 0 1.25rem; flex-shrink: 0; }

.eula-check-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,.04);
  border: 1.5px solid rgba(255,255,255,.08);
  border-radius: 10px; margin-bottom: 0.6rem;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.eula-check-row:hover  { border-color: rgba(13,148,136,.4); background: rgba(13,148,136,.06); }
.eula-check-row.checked { border-color: #0d9488; background: rgba(13,148,136,.1); }

.eula-check-box {
  width: 20px; height: 20px; border-radius: 5px;
  border: 2px solid rgba(255,255,255,.3);
  flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; transition: all .2s;
  font-size: 0.8rem; color: transparent;
}
.eula-check-row.checked .eula-check-box {
  background: #0d9488; border-color: #0d9488;
  color: #fff;
}

.eula-check-label { flex: 1; }
.eula-check-label strong { font-size: 0.82rem; color: #f1f5f9; display: block; margin-bottom: 2px; }
.eula-check-label span { font-size: 0.72rem; color: #94a3b8; line-height: 1.5; }

/* Footer action bar */
.eula-footer {
  padding: 0.9rem 1.25rem;
  padding-bottom: calc(0.9rem + env(safe-area-inset-bottom));
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,.07);
}
.eula-progress-bar-wrap {
  height: 4px; background: rgba(255,255,255,.1);
  border-radius: 4px; margin-bottom: 0.85rem; overflow: hidden;
}
.eula-progress-bar {
  height: 100%; background: linear-gradient(90deg, #0d9488, #22c55e);
  border-radius: 4px; transition: width .4s ease;
  width: 0%;
}
.eula-accept-btn {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  border: none; border-radius: 12px;
  color: #fff; font-size: 1rem; font-weight: 800;
  cursor: pointer; letter-spacing: -0.2px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 6px 20px rgba(13,148,136,.4);
}
.eula-accept-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.eula-accept-btn:not(:disabled):active { transform: scale(.98); }

.eula-decline-link {
  display: block; text-align: center;
  font-size: 0.72rem; color: #64748b;
  margin-top: 0.6rem; text-decoration: none;
  cursor: pointer;
}
.eula-decline-link:hover { color: #94a3b8; }

/* Lang selector in EULA */
.eula-lang-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center;
  padding: 0.5rem 1.25rem 0;
}
.eula-lang-btn {
  padding: 4px 12px; border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,.15);
  background: transparent; color: #94a3b8;
  font-size: 0.72rem; cursor: pointer;
  transition: all .2s;
}
.eula-lang-btn.active, .eula-lang-btn:hover {
  border-color: #0d9488; color: #0d9488;
  background: rgba(13,148,136,.1);
}
