/* =============================================
   ÓPTICA EYE STUDIO - Frontend Styles
   Paleta: Azul profundo + Blanco + Teal
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --oes-primary:   #0A2342;
  --oes-accent:    #00B4D8;
  --oes-teal:      #0077B6;
  --oes-light:     #F0F8FF;
  --oes-border:    #D0E8F5;
  --oes-text:      #1A2E40;
  --oes-muted:     #6B8CA8;
  --oes-white:     #ffffff;
  --oes-radius:    16px;
  --oes-shadow:    0 8px 40px rgba(0,100,180,0.12);
}

/* ─── Wrapper ─── */
.oes-wrapper {
  font-family: 'DM Sans', sans-serif;
  max-width: 780px;
  margin: 0 auto 48px;
  background: var(--oes-white);
  border-radius: 24px;
  box-shadow: var(--oes-shadow);
  overflow: hidden;
  color: var(--oes-text);
}

/* ─── Header ─── */
.oes-header {
  background: linear-gradient(135deg, var(--oes-primary) 0%, var(--oes-teal) 100%);
  color: var(--oes-white);
  text-align: center;
  padding: 48px 32px 36px;
  position: relative;
}
.oes-iris-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  color: var(--oes-accent);
  filter: drop-shadow(0 0 18px rgba(0,180,216,0.5));
}
.oes-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.oes-subtitle {
  font-size: 15px;
  opacity: 0.8;
  margin: 0;
  font-weight: 300;
}

/* ─── Steps ─── */
.oes-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 24px 32px;
  background: var(--oes-light);
  border-bottom: 1px solid var(--oes-border);
}
.oes-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.4;
  transition: opacity 0.3s;
}
.oes-step.active, .oes-step.done { opacity: 1; }
.oes-step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--oes-border);
  color: var(--oes-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
  transition: all 0.3s;
}
.oes-step.active .oes-step-num {
  background: var(--oes-accent);
  color: var(--oes-white);
  box-shadow: 0 0 0 4px rgba(0,180,216,0.2);
}
.oes-step.done .oes-step-num {
  background: var(--oes-primary);
  color: var(--oes-white);
}
.oes-step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--oes-muted);
}
.oes-step.active .oes-step-label { color: var(--oes-primary); font-weight: 600; }
.oes-step-line {
  flex: 1;
  height: 2px;
  background: var(--oes-border);
  min-width: 60px;
  margin: 0 8px;
  margin-bottom: 18px;
}

/* ─── Panels ─── */
.oes-panel {
  padding: 36px 40px;
  animation: oesFadeIn 0.35s ease;
}
@keyframes oesFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Camera ─── */
.oes-camera-area {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 16px;
  border-radius: var(--oes-radius);
  overflow: hidden;
  background: #0A1628;
  aspect-ratio: 4/3;
}
#oes-video, #oes-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.oes-camera-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.oes-eye-guide {
  width: 78%;
  opacity: 0.7;
}
.oes-camera-tips {
  text-align: center;
  font-size: 13px;
  color: var(--oes-muted);
  margin-bottom: 20px;
}
.oes-camera-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.oes-or-divider {
  text-align: center;
  color: var(--oes-muted);
  font-size: 13px;
  margin: 16px 0;
}
.oes-upload-label {
  display: block;
  text-align: center;
  color: var(--oes-teal);
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  font-size: 14px;
  margin-bottom: 24px;
}

/* ─── Buttons ─── */
.oes-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}
.oes-btn-primary {
  background: var(--oes-primary);
  color: var(--oes-white);
}
.oes-btn-primary:hover { background: var(--oes-teal); }
.oes-btn-secondary {
  background: var(--oes-accent);
  color: var(--oes-white);
}
.oes-btn-secondary:hover { opacity: 0.88; }
.oes-btn-ghost {
  background: transparent;
  color: var(--oes-primary);
  border-color: var(--oes-border);
}
.oes-btn-ghost:hover { border-color: var(--oes-accent); color: var(--oes-accent); }
.oes-btn-cta {
  background: linear-gradient(135deg, var(--oes-accent), var(--oes-teal));
  color: var(--oes-white);
  font-size: 16px;
  padding: 14px 32px;
  box-shadow: 0 4px 20px rgba(0,180,216,0.35);
}
.oes-btn-cta:hover { box-shadow: 0 6px 28px rgba(0,180,216,0.5); transform: translateY(-1px); }
.oes-btn-full { width: 100%; justify-content: center; margin-top: 8px; }

/* ─── Simulador ─── */
.oes-sim-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.oes-eye-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #0A1628;
  box-shadow: 0 4px 20px rgba(0,50,100,0.18);
}
.oes-eye-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.oes-color-overlay {
  position: absolute;
  inset: 0;
  mix-blend-mode: multiply;
  transition: background-color 0.4s ease, opacity 0.4s;
  pointer-events: none;
}
.oes-frame-label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.4);
  padding: 3px 10px;
  border-radius: 20px;
}
.oes-color-picker h4 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  margin: 0 0 16px;
  color: var(--oes-primary);
}
.oes-colors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.oes-color-swatch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 2px solid var(--oes-border);
  border-radius: 10px;
  background: var(--oes-white);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.oes-color-swatch:hover { border-color: var(--oes-accent); transform: scale(1.02); }
.oes-color-swatch.selected {
  border-color: var(--oes-accent);
  background: rgba(0,180,216,0.06);
  box-shadow: 0 0 0 3px rgba(0,180,216,0.15);
}
.oes-swatch-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--swatch-color);
  border: 2px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.oes-swatch-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--oes-text);
}
.oes-intensity {
  border-top: 1px solid var(--oes-border);
  padding-top: 16px;
}
.oes-intensity label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--oes-muted);
  margin-bottom: 8px;
}
.oes-intensity input[type=range] {
  width: 100%;
  accent-color: var(--oes-accent);
  cursor: pointer;
}
.oes-intensity-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--oes-muted);
  margin-top: 4px;
}
.oes-sim-selected {
  text-align: center;
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--oes-muted);
}
.oes-sim-selected strong {
  color: var(--oes-teal);
  font-weight: 600;
}

/* ─── Formulario ─── */
.oes-form-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--oes-light);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.oes-form-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  border: 3px solid var(--oes-accent);
  flex-shrink: 0;
}
.oes-form-color-badge {
  display: inline-block;
  background: var(--oes-primary);
  color: var(--oes-white);
  font-size: 13px;
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 500;
  margin: 0 0 6px;
}
.oes-form-hint {
  font-size: 13px;
  color: var(--oes-muted);
  margin: 0;
}
.oes-form { display: flex; flex-direction: column; gap: 16px; }
.oes-field { display: flex; flex-direction: column; gap: 6px; }
.oes-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--oes-primary);
}
.oes-field input,
.oes-field select,
.oes-field textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  padding: 11px 16px;
  border: 2px solid var(--oes-border);
  border-radius: 10px;
  color: var(--oes-text);
  background: var(--oes-white);
  transition: border-color 0.2s;
  outline: none;
}
.oes-field input:focus,
.oes-field select:focus,
.oes-field textarea:focus {
  border-color: var(--oes-accent);
  box-shadow: 0 0 0 3px rgba(0,180,216,0.12);
}
.oes-field textarea { min-height: 90px; resize: vertical; }
.oes-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--oes-muted);
}
.oes-privacy input { margin-top: 2px; accent-color: var(--oes-accent); }

/* ─── Msgs ─── */
.oes-msg { padding: 12px 16px; border-radius: 10px; margin-top: 16px; font-size: 14px; }
.oes-msg-error { background: #FFF0F0; color: #C0392B; border: 1px solid #FADBD8; }

/* ─── Success ─── */
.oes-success {
  text-align: center;
  padding: 24px 0;
}
.oes-success-icon { font-size: 56px; margin-bottom: 16px; }
.oes-success h3 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--oes-primary);
  margin: 0 0 12px;
}
.oes-success p { color: var(--oes-text); margin: 0 0 8px; }
.oes-success-sub { font-size: 14px; color: var(--oes-muted); margin-bottom: 28px !important; }

/* ─── Panel btns ─── */
.oes-panel-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .oes-panel { padding: 24px 20px; }
  .oes-sim-layout { grid-template-columns: 1fr; }
  .oes-steps { padding: 16px 12px; }
  .oes-step-line { min-width: 24px; }
  .oes-title { font-size: 22px; }
}
