/* ============================================================
   MULTICOTIZADOR BTG — Base Reset + Tipografía + Utilidades
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body-m);
  color: var(--color-body);
  background: var(--color-bg-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-title);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); font-weight: 600; }
h4 { font-size: var(--text-h4); font-weight: 600; }

p { line-height: 1.6; }

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

img, svg { display: block; max-width: 100%; }
ul, ol  { list-style: none; }

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; }

/* ── Tipografía utilitaria ── */
.font-display   { font-family: var(--font-display); }
.font-body      { font-family: var(--font-body); }

.text-h1        { font-family: var(--font-display); font-size: var(--text-h1);      font-weight: 700; color: var(--color-title); line-height: 1.2; }
.text-h2        { font-family: var(--font-display); font-size: var(--text-h2);      font-weight: 700; color: var(--color-title); line-height: 1.2; }
.text-h3        { font-family: var(--font-display); font-size: var(--text-h3);      font-weight: 600; color: var(--color-title); line-height: 1.2; }
.text-h4        { font-family: var(--font-display); font-size: var(--text-h4);      font-weight: 600; color: var(--color-title); line-height: 1.2; }
.text-body-l    { font-size: var(--text-body-l); }
.text-body-m    { font-size: var(--text-body-m); }
.text-body-s    { font-size: var(--text-body-s); }
.text-caption   { font-size: var(--text-caption); }
.text-xs        { font-size: var(--text-xs); }

.text-bold      { font-weight: 700; }
.text-semibold  { font-weight: 600; }
.text-normal    { font-weight: 400; }
.text-black     { font-weight: 900; }

.text-center    { text-align: center; }
.text-right     { text-align: right; }
.text-left      { text-align: left; }
.text-upper     { text-transform: uppercase; letter-spacing: 0.06em; }
.text-nowrap    { white-space: nowrap; }
.text-ellipsis  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-tabular   { font-variant-numeric: tabular-nums; }

.text-title     { color: var(--color-title); }
.text-body      { color: var(--color-body); }
.text-muted     { color: var(--color-muted); }
.text-accent    { color: var(--color-accent); }
.text-primary   { color: var(--color-primary); }
.text-success   { color: var(--color-success); }
.text-warning   { color: var(--color-warning); }
.text-error     { color: var(--color-error); }
.text-white     { color: #fff; }

/* ── Layout flex/grid utilitario ── */
.flex           { display: flex; }
.flex-col       { display: flex; flex-direction: column; }
.inline-flex    { display: inline-flex; }
.grid           { display: grid; }
.block          { display: block; }
.inline-block   { display: inline-block; }

.items-start    { align-items: flex-start; }
.items-center   { align-items: center; }
.items-end      { align-items: flex-end; }
.items-stretch  { align-items: stretch; }
.justify-start  { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end    { justify-content: flex-end; }
.justify-between{ justify-content: space-between; }
.justify-around { justify-content: space-around; }
.flex-1         { flex: 1; }
.flex-none      { flex: none; }
.flex-wrap      { flex-wrap: wrap; }
.gap-1          { gap: var(--sp-1); }
.gap-2          { gap: var(--sp-2); }
.gap-3          { gap: var(--sp-3); }
.gap-4          { gap: var(--sp-4); }
.gap-5          { gap: var(--sp-5); }
.gap-6          { gap: var(--sp-6); }

/* ── Spacing ── */
.mt-1 { margin-top: var(--sp-1); } .mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.mb-1 { margin-bottom: var(--sp-1); } .mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); } .mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); } .mb-6 { margin-bottom: var(--sp-6); }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.p-1  { padding: var(--sp-1); }  .p-2  { padding: var(--sp-2); }
.p-3  { padding: var(--sp-3); }  .p-4  { padding: var(--sp-4); }
.p-5  { padding: var(--sp-5); }  .p-6  { padding: var(--sp-6); }

/* ── Size ── */
.w-full  { width: 100%; }
.h-full  { height: 100%; }
.min-w-0 { min-width: 0; }

/* ── Visibility ── */
.hidden          { display: none !important; }
.invisible       { visibility: hidden; }
.sr-only         { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── Position ── */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }

/* ── Overflow ── */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }

/* ── Border radius ── */
.rounded-sm  { border-radius: var(--radius-sm); }
.rounded     { border-radius: var(--radius-default); }
.rounded-md  { border-radius: var(--radius-md); }
.rounded-card{ border-radius: var(--radius-card); }
.rounded-full{ border-radius: var(--radius-pill); }

/* ── Background ── */
.bg-white   { background: var(--color-bg-white); }
.bg-surface { background: var(--color-bg-surface); }

/* ── Transición ── */
.transition { transition: var(--transition); }

/* ── Skeleton shimmer ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--radius-default);
}

/* ── Scrollbar personalizado ── */
::-webkit-scrollbar               { width: 5px; height: 5px; }
::-webkit-scrollbar-track         { background: transparent; }
::-webkit-scrollbar-thumb         { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover   { background: #c2c8d0; }

/* ── Focus ring ── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--color-border);
  border: none;
  width: 100%;
}

/* ── Responsive helpers ── */
.hide-mobile  { display: block; }
.show-mobile  { display: none; }

@media (max-width: 767px) {
  .hide-mobile  { display: none !important; }
  .show-mobile  { display: block !important; }
  .hide-desktop { display: none !important; }
}

@media (min-width: 768px) {
  .hide-desktop { display: block; }
}
