/* LYF Conversor - Lovable look (2026-05-12) */
/* Paleta: bg #f9f7dc · titleLeft #ef8535 · titleRight #c43c1e · border #763c00 */

.lyf-conversor-wrapper {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #763c00;
  background: #f9f7dc;
  min-height: 100vh;
  --lyf-bg: #f9f7dc;
  --lyf-title-left: #ef8535;
  --lyf-title-right: #c43c1e;
  --lyf-border: #763c00;
  --lyf-box-light: #ffffff;
  --lyf-box-dark: #fcfcfc;
  --lyf-text: #763c00;
  --lyf-orange: #ef8535;
}
.lyf-conversor-wrapper.lyf-dark {
  background: #333;
  --lyf-bg: #333;
  --lyf-box-light: #222;
  --lyf-box-dark: #222;
  --lyf-text: #fff;
  color: #fff;
}
.lyf-conversor-wrapper *, .lyf-conversor-wrapper *::before, .lyf-conversor-wrapper *::after {
  box-sizing: border-box;
}

/* Sticky header */
.lyf-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--lyf-bg);
  padding: 8px 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.lyf-sticky-inner { display: flex; flex-direction: column; gap: 8px; }

/* Mobile: position:sticky no funciona por el overflow del body de Thrive,
   así que usamos JS (lyf-ui.js) que añade .lyf-stuck cuando el bar pasa
   por encima del viewport. Mantenemos el comportamiento sticky natural. */
@media (max-width: 767px) {
  .lyf-sticky.lyf-stuck {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
  }
  .admin-bar .lyf-sticky.lyf-stuck { top: 46px; }
}

/* Input */
.lyf-input-wrap { position: relative; }
.lyf-input {
  width: 100%;
  min-height: 80px;
  font-family: inherit;
  font-size: 18px;
  padding: 12px 44px 12px 14px;
  border: 3px solid var(--lyf-border);
  border-radius: 8px;
  background: var(--lyf-bg);
  color: var(--lyf-text);
  resize: vertical;
  outline: none;
}
.lyf-dark .lyf-input { border-color: #fff; background: #222; color: #fff; }
.lyf-input::placeholder { color: var(--lyf-text); opacity: 0.75; }
.lyf-input.lyf-typing { caret-color: transparent; }

.lyf-case-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: 1px solid var(--lyf-orange);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--lyf-orange);
  line-height: 0;
  transition: background 0.15s;
}
.lyf-case-btn svg { width: 18px; height: 18px; display: block; }
.lyf-case-btn:hover { background: rgba(239,133,53,0.08); }
.lyf-dark .lyf-case-btn { border-color: #fff; color: #fff; }
.lyf-dark .lyf-case-btn:hover { background: rgba(255,255,255,0.08); }

/* Nav row */
.lyf-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.lyf-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  justify-content: center;
  flex: 1;
  padding: 0 8px;
  font-size: 13px;
}
.lyf-nav-btn {
  background: transparent;
  border: 0;
  color: var(--lyf-text);
  cursor: pointer;
  padding: 2px 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.lyf-nav-btn:hover { opacity: 0.65; }
.lyf-nav-sep {
  color: var(--lyf-text);
  opacity: 0.5;
  user-select: none;
}
.lyf-theme-btn {
  background: transparent;
  border: 1px solid var(--lyf-orange);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--lyf-orange);
  flex-shrink: 0;
  line-height: 0;
  transition: background 0.15s;
}
.lyf-theme-btn svg { width: 18px; height: 18px; display: block; }
.lyf-theme-btn:hover { background: rgba(239,133,53,0.08); }
.lyf-dark .lyf-theme-btn { border-color: #fff; color: #fff; }
.lyf-dark .lyf-theme-btn:hover { background: rgba(255,255,255,0.08); }

@media (max-width: 600px) {
  .lyf-nav { font-size: 10px; gap: 4px 6px; padding: 0 4px; }
  .lyf-nav-btn { padding: 4px; line-height: 1.3; }
  .lyf-nav-sep { line-height: 1.3; }
}

/* Groups */
.lyf-groups { padding: 16px 4px 64px; }
.lyf-group { margin-bottom: 24px; padding: 0 4px; }
.lyf-conversor-wrapper h2.lyf-group-title,
.lyf-conversor-wrapper h3.lyf-group-title,
.lyf-conversor-wrapper .lyf-group-title {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--lyf-text) !important;
  line-height: 20px !important;
  padding: 12px 0 0 !important;
  margin: 0 0 24px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  border: 0 !important;
  background: transparent !important;
  scroll-margin-top: 170px;
}

/* Grid */
.lyf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px 12px;
  padding-top: 4px;
}
@media (min-width: 768px) {
  .lyf-grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
}

/* Style box */
.lyf-box {
  position: relative;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid;
  background: var(--lyf-box-light);
  transition: background 0.15s;
}
.lyf-box.lyf-left { border-color: var(--lyf-title-left); }
.lyf-box.lyf-right { border-color: var(--lyf-title-right); background: var(--lyf-box-dark); }
.lyf-dark .lyf-box { background: var(--lyf-box-light); border-color: var(--lyf-text); }

.lyf-box-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.lyf-pill {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  margin: -22px 0 0 -16px;
  display: inline-block;
  white-space: nowrap;
}
.lyf-left .lyf-pill { background: var(--lyf-title-left); }
.lyf-right .lyf-pill { background: var(--lyf-title-right); }

.lyf-actions { display: flex; gap: 4px; }
.lyf-icon-btn {
  background: transparent;
  border: 0;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  color: rgba(118,60,0,0.55);
  transition: background 0.15s, color 0.15s;
  line-height: 0;
}
.lyf-icon-btn:hover { background: var(--lyf-bg); color: #000; }
.lyf-dark .lyf-icon-btn { color: rgba(255,255,255,0.55); }
.lyf-dark .lyf-icon-btn:hover { color: #000; }
.lyf-icon-btn svg { width: 18px; height: 18px; display: block; }
.lyf-icon-btn.lyf-fav-on { color: #eab308; }
.lyf-icon-btn.lyf-fav-on svg { fill: #eab308; }

.lyf-box-text {
  margin-top: 8px;
  font-size: 18px;
  word-break: break-word;
  color: var(--lyf-text);
  min-height: 52px;
  line-height: 1.45;
}
.lyf-dark .lyf-box-text { color: var(--lyf-text); }

/* Toast */
.lyf-toast {
  position: fixed;
  z-index: 100;
  background: #18181b;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-family: Inter, sans-serif;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  pointer-events: none;
  transform: translate(-50%, -120%);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.lyf-toast.lyf-toast-show { opacity: 1; }
.lyf-toast strong { display: block; font-weight: 600; }

/* Empty fav state */
.lyf-empty {
  font-size: 13px;
  opacity: 0.7;
  padding: 8px 4px 0;
  color: var(--lyf-text);
}
