/* Yamibellezaa · componentes y estados compartidos (web, cursos y panel).
   Avisos, mensajes flotantes, vacíos, carga, campos con error, progreso, etiquetas y cristal. */

/* Cristal: el mismo de las tarjetas del home */
.y-glass { position: relative; border-radius: var(--y-r-lg); background: var(--y-glass); color: var(--y-ink); box-shadow: var(--y-shadow-2), inset 0 1px 0 rgba(255, 255, 255, 0.18); backdrop-filter: var(--y-blur); -webkit-backdrop-filter: var(--y-blur); }
.y-glass-light { position: relative; border-radius: var(--y-r-lg); background: radial-gradient(circle at 18% 0%, rgba(184, 150, 114, 0.13), transparent 38%), rgba(255, 252, 247, 0.9); color: var(--y-cacao); box-shadow: 0 30px 110px rgba(84, 67, 56, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.74); backdrop-filter: var(--y-blur); -webkit-backdrop-filter: var(--y-blur); }

/* Botón del pilar (dorado de Cursos por defecto) */
.btn-pillar { background: var(--pillar, var(--y-pillar-cursos)); color: var(--y-night); box-shadow: 0 16px 42px rgba(17, 17, 17, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.32); }
.btn-pillar:hover { filter: brightness(1.07); }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 14px; }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn:active:not([disabled]) { transform: scale(0.97); }

/* Etiquetas */
.y-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 13px; border-radius: var(--y-r-pill); background: rgba(255, 255, 255, 0.13); color: rgba(247, 241, 234, 0.86); font-size: 12px; font-weight: 700; line-height: 1; width: max-content; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16); }
.y-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.y-chip.is-plain::before { display: none; }
.y-chip.is-sage { background: rgba(158, 169, 147, 0.24); color: #dde4d3; }
.y-chip.is-gold { background: rgba(188, 162, 129, 0.26); color: #f1e2c8; }
.y-chip.is-rose { background: rgba(184, 154, 146, 0.26); color: #f0ddd7; }
.y-chip.is-mauve { background: rgba(164, 147, 166, 0.26); color: #eadcec; }

/* Avisos dentro de la página */
.y-banner { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 16px; border-radius: 18px; font-size: 14px; line-height: 1.55; text-align: left; }
.y-banner > svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.y-banner b, .y-banner strong { font-weight: 600; }
.y-banner > :last-child:empty { display: none; }
.y-banner .y-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.y-banner.is-info { background: rgba(188, 162, 129, 0.2); color: var(--y-warn-ink); }
.y-banner.is-ok { background: rgba(120, 128, 113, 0.2); color: var(--y-ok-ink); }
.y-banner.is-err { background: rgba(184, 154, 146, 0.3); color: var(--y-err-ink); }
.y-banner.is-dark { background: rgba(255, 255, 255, 0.1); color: var(--y-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.y-banner.is-dark.is-err { background: rgba(184, 154, 146, 0.18); color: #f3d9d2; }
.y-banner { animation: yFadeIn 220ms ease both; }

/* Mensaje flotante */
.y-toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 90; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 12px 14px 12px 18px; border-radius: var(--y-r-pill); background: rgba(33, 26, 23, 0.95); color: var(--y-ink); font-size: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.14); animation: yToastIn 280ms var(--y-ease) both; }
.y-toast.is-err { background: rgba(122, 47, 37, 0.96); }
.y-toast button { background: none; border: 0; color: var(--y-champagne-soft); font: 700 13px var(--y-font-sans); cursor: pointer; padding: 6px 4px; }
@keyframes yToastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Vacío */
.y-empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 40px 28px; }
.y-empty .y-flower { width: 34px; height: 34px; color: var(--y-champagne); }
.y-empty h2, .y-empty h3 { margin: 0; font: 500 32px/1.05 var(--y-font-serif); }
.y-empty p { margin: 0; max-width: 380px; font-size: 14px; line-height: 1.65; opacity: 0.74; }

/* Flor de la marca como icono */
.y-flower { display: inline-block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; flex: none; }

/* Cargando */
.y-skel { display: block; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05)); background-size: 220% 100%; animation: ySkel 1.6s ease-in-out infinite; }
.y-skel.is-light { background-image: linear-gradient(90deg, rgba(33, 26, 23, 0.06), rgba(33, 26, 23, 0.12), rgba(33, 26, 23, 0.06)); }

/* Barra de progreso en champagne */
.y-pbar { height: 6px; border-radius: var(--y-r-pill); background: rgba(255, 255, 255, 0.14); overflow: hidden; width: 100%; }
.y-pbar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--y-champagne), var(--y-champagne-soft)); transform-origin: left center; animation: yBarGrow 1100ms var(--y-ease) both; }
.y-pbar.is-light { background: rgba(33, 26, 23, 0.1); }
.y-pmeta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 600; color: var(--y-muted-dark); }

/* Campos con su mensaje al lado */
.y-field-msg { display: flex; gap: 6px; align-items: center; margin: 8px 0 0; font-size: 12px; font-weight: 600; line-height: 1.5; color: var(--y-err); }
.y-field-msg a, .y-field-msg button { color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; cursor: pointer; }
.is-invalid, input.is-invalid, textarea.is-invalid, select.is-invalid { border-color: #b3402e !important; box-shadow: 0 0 0 4px rgba(179, 64, 46, 0.12) !important; }

/* Medidor de contraseña */
.y-strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.y-strength i { height: 4px; border-radius: var(--y-r-pill); background: rgba(33, 26, 23, 0.12); transition: background var(--y-dur-fast) ease; }
.y-strength i.on { background: var(--y-ok); }

/* Tarjetas que se elevan solo con ratón */
@media (hover: hover) and (pointer: fine) {
  .y-lift { transition: transform 260ms var(--y-ease), box-shadow 260ms var(--y-ease); }
  .y-lift:hover { transform: translateY(-6px); box-shadow: var(--y-shadow-3); }
  .y-lift img { transition: transform 900ms ease; }
  .y-lift:hover img { transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .y-banner, .y-toast, .y-pbar > i, .y-skel { animation: none !important; }
  .y-lift, .y-lift img { transition: none !important; }
  .y-lift:hover, .y-lift:hover img { transform: none !important; }
}
