/* ─────────────────────────────────────────────
   Trivia CO · Card & Component styles
   Used by: reset-password, account-confirmed
   Colors taken from flutter_colombia_co_app/lib/configuration/theme/colors/app_colors.dart (dark tokens)
   ───────────────────────────────────────────── */

.tco-page {
  /* Trivia CO brand */
  --tco-primary:        #FF5FA8; /* Buganvilia */
  --tco-primary-dark:   #E63888;
  --tco-secondary:      #2FE0C4; /* Caribe */
  --tco-accent:         #FFC24D; /* Ocre */

  /* Semantic */
  --tco-success:        #2FE0C4;
  --tco-success-bg:     rgba(47, 224, 196, 0.12);
  --tco-error:          #FF6F65;
  --tco-error-bg:       rgba(255, 111, 101, 0.12);
  --tco-warning:        #FFC24D;

  /* Surfaces (local overrides — scoped to .tco-page, does not affect other brands) */
  --bg:                 #150C29;
  --surface:            #1F1440;
  --border:             #362A5C;
  --border-focus:       #FF5FA8;

  /* Text */
  --text:               #F5F3FA;
  --text-secondary:     #B6AFD0;
  --text-tertiary:      #8E86AE;

  /* Misc */
  --radius:             12px;
  --radius-sm:          8px;
  --shadow:             0 8px 32px rgba(0, 0, 0, 0.4);
  --transition:         0.2s ease;

  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255, 95, 168, 0.14) 0%, transparent 60%),
    var(--bg);
}

/* ── Card ───────────────────────────────────── */

.tco-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: fadeIn 0.3s ease forwards;
}

/* ── Card Header ────────────────────────────── */

.tco-card-header {
  padding: 32px 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.tco-logo-img {
  width: 96px;
  height: auto;
  display: block;
}

.tco-card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.tco-card-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Card Body ──────────────────────────────── */

.tco-card-body {
  padding: 28px 32px 32px;
}

/* ── Form ───────────────────────────────────── */

.tco-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tco-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tco-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── Input ──────────────────────────────────── */

.tco-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.tco-input::placeholder {
  color: var(--text-tertiary);
}

.tco-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 95, 168, 0.18);
}

.tco-input.input-error {
  border-color: var(--tco-error);
  box-shadow: 0 0 0 3px rgba(255, 111, 101, 0.15);
}

/* ── Error Banner ───────────────────────────── */

.tco-error-banner {
  padding: 12px 14px;
  background: var(--tco-error-bg);
  border: 1px solid rgba(255, 111, 101, 0.3);
  border-radius: var(--radius-sm);
  color: #FFC9C4;
  font-size: 14px;
  line-height: 1.5;
}

/* ── Button ─────────────────────────────────── */

.tco-btn {
  width: 100%;
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--tco-primary) 0%, var(--tco-primary-dark) 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 12px rgba(255, 95, 168, 0.3);
  margin-top: 4px;
}

.tco-btn:hover:not(:disabled) {
  opacity: 0.92;
  box-shadow: 0 6px 16px rgba(255, 95, 168, 0.4);
  transform: translateY(-1px);
}

.tco-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 95, 168, 0.3);
}

.tco-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.tco-btn.loading {
  position: relative;
  color: transparent;
}

.tco-btn.loading::after {
  content: '';
  position: absolute;
  top: calc(50% - 9px);
  left: calc(50% - 9px);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.tco-btn-outline {
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.tco-btn-outline:hover {
  border-color: var(--tco-primary);
  color: var(--tco-primary);
}

/* ── State Screens ──────────────────────────── */

.tco-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 8px 0;
}

.tco-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
}

.tco-state-icon.success {
  background: var(--tco-success-bg);
  border: 1px solid rgba(47, 224, 196, 0.3);
  color: var(--tco-success);
}

.tco-state-icon.error {
  background: var(--tco-error-bg);
  border: 1px solid rgba(255, 111, 101, 0.3);
  color: var(--tco-error);
}

.tco-state-icon.loading-icon {
  background: rgba(255, 95, 168, 0.1);
  border: 1px solid rgba(255, 95, 168, 0.2);
}

.tco-state-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.tco-state-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 320px;
}

.tco-state-hint {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ── Loading Spinner ────────────────────────── */

.tco-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 95, 168, 0.2);
  border-top-color: var(--tco-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Footer ─────────────────────────────────── */

.tco-footer {
  padding: 0 32px 24px;
  text-align: center;
}

.tco-footer p {
  font-size: 12px;
  color: var(--text-tertiary);
}

.tco-footer a {
  color: var(--tco-primary);
  text-decoration: none;
}

.tco-footer a:hover {
  text-decoration: underline;
}

/* ── Responsive ─────────────────────────────── */

@media (max-width: 480px) {
  .tco-card-header { padding: 24px 20px 0; }
  .tco-card-body   { padding: 20px 20px 24px; }
  .tco-footer      { padding: 0 20px 20px; }
}
