/* ==============================================
   GCDC SATISFACTION SURVEY — v1.1 LIGHT THEME
   ============================================== */
:root {
  --s-bg:         #ffffff;
  --s-surface:    #f5f5f5;
  --s-surface2:   #ebebeb;
  --s-border:     rgba(0,0,0,.1);
  --s-text:       #111111;
  --s-muted:      #777777;
  --s-green:      #16a34a;
  --s-yellow:     #b45309;
  --s-red:        #dc2626;
  --s-accent:     #1d4ed8;
  --s-r:          16px;
  --s-r-lg:       24px;
  --s-shadow:     0 2px 16px rgba(0,0,0,.07);
  --s-shadow-lg:  0 8px 32px rgba(0,0,0,.1);
  --s-font:       'Segoe UI', system-ui, -apple-system, sans-serif;
  --s-ease:       .3s cubic-bezier(.4,0,.2,1);
}

/* ── BASE ── */
html, body {
  background: #ffffff !important;
}

.gcdc-survey {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
  background: #ffffff;
  font-family: var(--s-font);
  color: var(--s-text);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

/* ── STEPS ── */
.gcdc-step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(48px);
  transition: opacity var(--s-ease), transform var(--s-ease), visibility var(--s-ease);
  pointer-events: none;
  background: #ffffff;
}

.gcdc-step.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: all;
}

.gcdc-step__inner {
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  position: relative;
}

/* ── HEADER ── */
.gcdc-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.gcdc-logo {
  max-height: 120px;
  max-width: 100%;
  object-fit: contain;
}

.gcdc-title {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 0;
  color: var(--s-text);
}

.gcdc-subtitle {
  font-size: clamp(.95rem, 2vw, 1.2rem);
  color: var(--s-muted);
  margin: 0;
}

/* ── BACK BUTTON ── */
.gcdc-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--s-surface);
  border: 1.5px solid var(--s-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--s-text);
  transition: background .15s, transform .15s;
  box-shadow: var(--s-shadow);
}

.gcdc-back:active { background: var(--s-surface2); transform: scale(.9); }

/* ── BRANDS GRID ── */
.gcdc-brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  width: 100%;
}

.gcdc-no-brands {
  grid-column: 1/-1;
  text-align: center;
  color: var(--s-muted);
  padding: 40px;
}

.gcdc-brand-btn {
  position: relative;
  background: #ffffff;
  border: 2px solid var(--s-border);
  border-radius: var(--s-r);
  padding: 28px 18px 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 160px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  box-shadow: var(--s-shadow);
}

.gcdc-brand-btn:active {
  transform: scale(.95);
  border-color: var(--brand-color, var(--s-accent));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-color, var(--s-accent)) 20%, transparent), var(--s-shadow-lg);
}

.gcdc-brand-btn__stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--brand-color, var(--s-accent));
  border-radius: 4px 4px 0 0;
}

.gcdc-brand-btn__logo {
  display: block;
  width: auto;
  max-height: 68px;
  max-width: 150px;
  object-fit: contain;
}

.gcdc-brand-btn__name {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--s-text);
}

/* ── BRAND INDICATOR ── */
.gcdc-brand-indicator {
  background: var(--s-surface);
  border: 1.5px solid var(--s-border);
  border-radius: 40px;
  padding: 6px 18px;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--s-muted);
}

/* ── PATENTE ── */
.gcdc-patente-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.gcdc-patente-input {
  width: 100%;
  max-width: 480px;
  background: var(--s-surface);
  border: 2px solid var(--s-border);
  border-radius: var(--s-r);
  color: var(--s-text);
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: .15em;
  text-align: center;
  padding: 18px 24px;
  outline: none;
  pointer-events: none;
  transition: border-color .2s, box-shadow .2s;
  caret-color: transparent;
}

.gcdc-patente-input.has-value {
  border-color: var(--s-accent);
  box-shadow: 0 0 0 3px rgba(29,78,216,.12);
}

.gcdc-patente-hint {
  min-height: 1.1em;
  font-size: .85rem;
  color: var(--s-red);
  text-align: center;
}

/* ── KEYBOARD ── */
.gcdc-keyboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 680px;
}

.gcdc-keyboard__row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.gcdc-key {
  flex: 1;
  max-width: 60px;
  min-width: 40px;
  background: #ffffff;
  border: 1.5px solid var(--s-border);
  border-radius: 10px;
  color: var(--s-text);
  font-size: clamp(.8rem, 1.6vw, 1.1rem);
  font-weight: 700;
  padding: 12px 6px;
  cursor: pointer;
  font-family: var(--s-font);
  box-shadow: 0 2px 4px rgba(0,0,0,.06);
  transition: background .12s, transform .1s, color .12s;
}

.gcdc-key:active {
  background: var(--s-accent);
  color: #fff;
  transform: scale(.86);
  box-shadow: none;
}

.gcdc-key--delete {
  max-width: 76px;
  background: #fff5f5;
  color: var(--s-red);
  border-color: rgba(220,38,38,.2);
}

.gcdc-key--delete:active {
  background: var(--s-red);
  color: #fff;
}

/* ── CONTINUE BUTTON ── */
.gcdc-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 44px;
  border-radius: 100px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  border: 2px solid transparent;
}

.gcdc-btn--primary {
  background: var(--s-accent);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(29,78,216,.25);
}

.gcdc-btn--primary:disabled {
  opacity: .3;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.gcdc-btn--primary:not(:disabled):active {
  transform: scale(.96);
  box-shadow: 0 2px 8px rgba(29,78,216,.2);
}

/* ── FACES ── */
.gcdc-faces {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.gcdc-face {
  flex: 1;
  min-width: 200px;
  max-width: 250px;
  background: #ffffff;
  border: 2.5px solid var(--s-border);
  border-radius: var(--s-r-lg);
  padding: 36px 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--s-text);
  box-shadow: var(--s-shadow);
  transition: border-color .2s, box-shadow .2s, transform .15s;
}

.gcdc-face__svg {
  width: clamp(90px, 16vw, 140px);
  height: clamp(90px, 16vw, 140px);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.12));
  transition: transform .15s;
}

.gcdc-face:active { transform: scale(.93); }
.gcdc-face:active .gcdc-face__svg { transform: scale(1.06); }

.gcdc-face--green:active {
  border-color: #22c55e;
  box-shadow: 0 0 0 5px rgba(34,197,94,.18), var(--s-shadow-lg);
}
.gcdc-face--yellow:active {
  border-color: #eab308;
  box-shadow: 0 0 0 5px rgba(234,179,8,.18), var(--s-shadow-lg);
}
.gcdc-face--red:active {
  border-color: #ef4444;
  box-shadow: 0 0 0 5px rgba(239,68,68,.18), var(--s-shadow-lg);
}

.gcdc-face__text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: .01em;
}

.gcdc-face--green .gcdc-face__text  { color: var(--s-green); }
.gcdc-face--yellow .gcdc-face__text { color: var(--s-yellow); }
.gcdc-face--red .gcdc-face__text    { color: var(--s-red); }

/* ── THANKS ── */
.gcdc-step--thanks .gcdc-step__inner {
  gap: 16px;
  text-align: center;
}

.gcdc-thanks__icon {
  font-size: clamp(5rem, 14vw, 9rem);
  line-height: 1;
  animation: popIn .5s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes popIn {
  from { transform: scale(0) rotate(-10deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);  opacity: 1; }
}

.gcdc-thanks__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 0;
  color: var(--s-text);
}

.gcdc-thanks__sub {
  color: var(--s-muted);
  font-size: 1rem;
  margin: 0;
  max-width: 480px;
}

.gcdc-thanks__reset-text {
  color: var(--s-muted);
  font-size: .82rem;
  margin-top: 4px;
}

.gcdc-thanks__timer {
  width: 180px;
  height: 4px;
  background: var(--s-surface2);
  border-radius: 100px;
  overflow: hidden;
}

.gcdc-thanks__timer-bar {
  height: 100%;
  width: 100%;
  background: var(--s-accent);
  border-radius: 100px;
  transform-origin: left center;
}

/* ── LOADING ── */
.gcdc-loading {
  position: absolute;
  inset: 0;
  z-index: 200;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}

.gcdc-loading.is-visible {
  opacity: 1;
  pointer-events: all;
}

.gcdc-loading__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(0,0,0,.08);
  border-top-color: var(--s-accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.gcdc-loading__text {
  font-size: .95rem;
  font-weight: 600;
  color: var(--s-muted);
}

/* ── ADMIN (panel WP) ── */
.gcdc-stats-grid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
}
.gcdc-stat {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px 22px;
  min-width: 130px;
}
.gcdc-stat__num { display: block; font-size: 2rem; font-weight: 800; line-height: 1; }
.gcdc-stat__label { display: block; font-size: .75rem; color: #777; margin-top: 4px; }
.gcdc-stat--green .gcdc-stat__num  { color: #16a34a; }
.gcdc-stat--yellow .gcdc-stat__num { color: #ca8a04; }
.gcdc-stat--red .gcdc-stat__num    { color: #dc2626; }
.gcdc-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 16px; }
.gcdc-badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: .75rem; font-weight: 600; }
.gcdc-badge--green  { background: #dcfce7; color: #166534; }
.gcdc-badge--yellow { background: #fef9c3; color: #713f12; }
.gcdc-badge--red    { background: #fee2e2; color: #991b1b; }
.gcdc-pagination { display: flex; gap: 4px; margin-top: 16px; }
.gcdc-export-card { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 28px; max-width: 600px; }

/* Cuando hay logo, el nombre va más chico debajo como subtítulo */
.gcdc-brand-btn:has(.gcdc-brand-btn__logo) .gcdc-brand-btn__name {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--s-muted);
}

/* ── RESET BUTTON ── */
.gcdc-btn--reset {
    background: var(--s-accent);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(29,78,216,.25);
    transition: opacity .2s, transform .15s, box-shadow .2s;
}

.gcdc-btn--reset:active {
    transform: scale(.95);
    box-shadow: 0 2px 8px rgba(29,78,216,.2);
}

.gcdc-btn--reset:hover {
    opacity: 0.9;
}

/* ── THANKS SELECTION ── */
.gcdc-thanks-selection {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.gcdc-thanks-selection .level-green { color: #16a34a; }
.gcdc-thanks-selection .level-yellow { color: #b45309; }
.gcdc-thanks-selection .level-red { color: #dc2626; }

/* ── THANKS SELECTION CARD ── */
.gcdc-thanks-selection {
    width: 100%;
    max-width: 500px;
    margin: 8px auto 16px;
}

.gcdc-thanks-selection__card {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 20px;
    gap: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.gcdc-thanks-selection__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
}

.gcdc-thanks-selection__label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    font-weight: 600;
}

.gcdc-thanks-selection__value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
}

.gcdc-thanks-selection__divider {
    width: 1px;
    height: 32px;
    background: #e5e7eb;
}

/* Colores para los niveles */
.gcdc-thanks-selection__value.level-green { color: #16a34a; }
.gcdc-thanks-selection__value.level-yellow { color: #b45309; }
.gcdc-thanks-selection__value.level-red { color: #dc2626; }

/* ── RESET BUTTON ── */
.gcdc-btn--reset {
    background: var(--s-accent);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(29,78,216,.25);
    transition: opacity .2s, transform .15s, box-shadow .2s;
    margin-top: 20px;
    padding: 14px 40px;
    font-size: 1.1rem;
}

.gcdc-btn--reset:active {
    transform: scale(.95);
    box-shadow: 0 2px 8px rgba(29,78,216,.2);
}

.gcdc-btn--reset:hover {
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 600px) {
    .gcdc-thanks-selection__card {
        grid-template-columns: 1fr 1fr;
        gap: 8px 12px;
        padding: 16px;
    }
    
    .gcdc-thanks-selection__divider {
        display: none;
    }
    
    .gcdc-thanks-selection__item {
        align-items: flex-start;
        padding: 4px 0;
    }
    
    .gcdc-thanks-selection__label {
        font-size: 0.6rem;
    }
    
    .gcdc-thanks-selection__value {
        font-size: 0.85rem;
    }
}

/* ── RESET BUTTON ── */
.gcdc-btn--reset {
    background: var(--s-accent);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(29,78,216,.25);
    transition: opacity .2s, transform .15s, box-shadow .2s;
    margin-top: 20px;
    padding: 14px 40px;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    border-radius: 100px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    justify-content: center;
}

.gcdc-btn--reset:active {
    transform: scale(.95);
    box-shadow: 0 2px 8px rgba(29,78,216,.2);
}

.gcdc-btn--reset:hover {
    opacity: 0.9;
}

.gcdc-btn--reset:focus {
    outline: 2px solid var(--s-accent);
    outline-offset: 2px;
}