/* =============================================================
   Renlight Design System — Components
   Requires colors_and_type.css to be loaded first.
   ============================================================= */

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  height: 44px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--dur-hover) var(--ease-out),
              color var(--dur-hover) var(--ease-out),
              box-shadow var(--dur-hover) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              border-color var(--dur-hover) var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-sm { height: 36px; padding: 8px 16px; font-size: 14px; }
.btn-md { height: 44px; padding: 12px 24px; font-size: 15px; }
.btn-lg { height: 52px; padding: 14px 28px; font-size: 16px; }

.btn-primary {
  background: var(--azul-renlight);
  color: var(--branco);
}
.btn-primary:hover {
  background: var(--azul-escuro);
  box-shadow: var(--shadow-md);
  color: var(--branco);
}

.btn-secondary {
  background: var(--branco);
  color: var(--azul-renlight);
  border-color: var(--azul-renlight);
}
.btn-secondary:hover {
  background: var(--azul-claro);
  color: var(--azul-escuro);
  border-color: var(--azul-escuro);
}

.btn-ghost {
  background: transparent;
  color: var(--azul-renlight);
  padding: 8px 4px;
  height: auto;
  border: none;
}
.btn-ghost .arrow { transition: transform var(--dur-hover) var(--ease-out); }
.btn-ghost:hover { color: var(--azul-escuro); }
.btn-ghost:hover .arrow { transform: translateX(4px); }

/* -------- Cards -------- */
.card {
  background: var(--branco);
  border: 1px solid var(--cinza-borda);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-8);
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card-destaque {
  border: 2px solid var(--azul-renlight);
  box-shadow: var(--shadow-md);
}
.card-destaque:hover {
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

.card-feature {
  background: var(--gradient-soft);
  border: none;
}

/* -------- Inputs -------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: var(--fs-body-sm);
  font-weight: 500;
  color: var(--fg-1);
}
.field-caption {
  font-size: var(--fs-caption);
  color: var(--fg-2);
}
.field-error {
  font-size: var(--fs-caption);
  color: var(--erro);
}
.input, .select, .textarea {
  height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--cinza-borda);
  border-radius: var(--radius-md);
  background: var(--branco);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  color: var(--fg-1);
  transition: border-color var(--dur-hover) var(--ease-out),
              box-shadow var(--dur-hover) var(--ease-out);
  width: 100%;
  box-sizing: border-box;
}
.textarea { height: auto; min-height: 96px; padding: 12px 16px; resize: vertical; line-height: var(--lh-body); }
.input::placeholder, .textarea::placeholder { color: var(--cinza-texto); opacity: 0.7; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border: 2px solid var(--azul-renlight);
  padding: 11px 15px; /* compensate for 2px border */
  box-shadow: var(--shadow-glow);
}
.input[aria-invalid="true"], .input.error {
  border-color: var(--erro);
}

/* -------- Badges -------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
}
.badge-info     { background: var(--azul-claro); color: var(--azul-escuro); }
.badge-construcao { background: var(--alerta-bg); color: #92400E; }
.badge-sucesso  { background: var(--sucesso-bg); color: #047857; }
.badge-erro     { background: var(--erro-bg); color: #B91C1C; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* -------- Links (animated underline) -------- */
.link-anim {
  color: var(--azul-renlight);
  text-decoration: none;
  position: relative;
  display: inline-block;
  padding-bottom: 1px;
}
.link-anim::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.link-anim:hover { color: var(--azul-escuro); }
.link-anim:hover::after { transform: scaleX(1); }
