/* Contenedor principal con ancho máximo */
.tdh-container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

/* Fila de encabezado y datos */
.tdh-header,
.tdh-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Encabezado personalizado */
.tdh-header {
    background-color: #742384;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Columnas */
.tdh-col {
    flex: 1;
    text-align: center;
    font-size: 14px;
    min-width: 60px;
}

/* Fila de datos */
.tdh-row {
    background: #f9f9f9;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Botón principal (CALCULAR) */
.tdh-button {
    background-color: #742384;
    color: white;
    padding: 6px 10px; /* Reducido para que quepa bien */
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    font-size: 12px;
    transition: background-color 0.3s ease;
    display: inline-block;
    max-width: 100px;
    width: auto;
    white-space: nowrap; /* 🔥 clave para que no se rompa */
    text-align: center;
    box-sizing: border-box;
}

.tdh-col.tdh-action {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.tdh-button:hover {
    background-color: #5d1c6c;
}

/* Botón "Mejor" */
.tdh-sort-button {
    background-color: #10cbb4;
    border: none;
    color: white;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 4px;
    transition: background-color 0.3s ease;
}

.tdh-sort-button:hover {
    background-color: #0db5a2;
}

/* Responsividad en móvil */
@media (max-width: 768px) {
    .tdh-header,
    .tdh-row {
        flex-wrap: nowrap;
        font-size: 13px;
        padding: 10px 5px;
    }

    .tdh-col {
        font-size: 13px;
        padding: 4px;
    }

    .tdh-button {
        font-size: 12px;
        padding: 6px 10px;
    }
}

.tdh-logo {
    max-height: 32px;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}


/* Contenedor para calculadora  */
.tdh-calculator-card {
    max-width: 360px;
    margin: 20px auto;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px #0001;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.tdh-calc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.tdh-calc-logo {
    width: 120px;
    height: auto;
}

.tdh-calc-rates span {
    display: block;
    font-size: 14px;
    color: #333;
}

.tdh-calc-body label {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #444;
}

.tdh-calc-body input {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    margin-top: 4px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.tdh-calc-swap {
    font-size: 22px;
    text-align: center;
    margin: 10px 0;
}

.tdh-calc-body .tdh-button {
    margin-top: 14px;
    width: 100%;
}


.tdh-calc-input-group {
    display: flex;
    align-items: center;
    margin-top: 4px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.tdh-calc-input-group span {
    padding: 0 10px;
    font-weight: bold;
    background: #eee;
    font-size: 16px;
    border-right: 1px solid #ccc;
}

.tdh-calc-input-group input {
    flex: 1;
    border: none;
    padding: 8px;
    font-size: 16px;
    outline: none;
}


.tdh-calc-swap {
    width: 44px;
    height: 44px;
    background-color: #0db5a2;
    color: #fff;
    font-size: 20px;
    line-height: 44px;
    text-align: center;
    border-radius: 50%;
    margin: 16px auto;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    user-select: none;
}

.tdh-calc-swap:hover {
    background-color: #0aa291;
    transform: rotate(180deg);
}


.tdh-external-button {
    display: block;
    width: 100%;
    margin-top: 12px;
    background-color: #0db5a2;
    color: #fff;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    font-size: 15px;
    transition: background-color 0.3s ease;
    border: none;
}

.tdh-external-button:hover,
.tdh-external-button:focus,
.tdh-external-button:active {
    background-color: #742384;
    color: #fff;
}





/* Contenedor de etiquetas debajo del logo */
.tdh-agency-info {
    margin-top: 4px;
}

.tdh-tags {
    margin-top: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

/* Estilo general para tags: más pequeños y compactos */
.tdh-tag {
    font-size: 8px;            /* Antes: 9px */
    line-height: 2;            /* Compacta altura */
    padding: 1px 4px;          /* Antes: 1px 2px */
    border-radius: 3px;
    display: inline-block;
    background: #eee;
    color: #333;
    white-space: nowrap;       /* Evita salto de línea */
}

/* Estilos por tipo */
/* 🌟 Popular */
.tdh-tag--popular {
    background-color: #fff3cd; /* amarillo suave */
    color: #856404;
}

/* 🔒 Regulada */
.tdh-tag--regulada {
    background-color: #cce5ff; /* azul claro */
    color: #004085;
}

/* ❤️ Favorita */
.tdh-tag--favorita {
    background-color: #ffe5d0; /* naranja pastel */
    color: #bd5d00;
}

/* 🏛️ Oficial */
.tdh-tag--oficial {
    background-color: #d4edda; /* verde claro */
    color: #155724;
}

/* ⚖️ Promedio */
.tdh-tag--promedio {
    background-color: #d1ecf1; /* celeste suave */
    color: #0c5460;
}

/* 🧪 Mercado */
.tdh-tag--mercado {
    background-color: #ede7f6; /* violeta claro */
    color: #4a148c;
}


/* 🧾 Tributario */
.tdh-tag--tributario {
    background-color: #f8f9fa; /* gris muy claro */
    color: #6c757d;            /* gris oscuro */
    border: 1px solid #dee2e6; /* opcional: sutil borde */
}


.tdh-agency-schedule {
  font-size: 9px;
  color: #666;
  margin-top: 2px;
  line-height: 1.1;
}



.tdh-location-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: #5c2d91;
  text-decoration: underline;
  padding: 2px 4px;
  line-height: 1.3;
}

.tdh-location-link:hover {
  color: #4a1f80;
  text-decoration: none;
}


/*aaaaaaaa*/

.tdh-last-updated {
  margin-bottom: 12px;
  font-size: 14px;
  color: #444;
  white-space: nowrap;   /* ✅ evita salto de línea */
  overflow-x: auto;
  overflow-y: hidden;
  display: block;
}

/* Solo aplica scroll horizontal en móviles pequeños */
@media (max-width: 360px) {
  .tdh-last-updated {
    overflow-x: auto;
  }
}



/* boton secundario */

.tdh-button-secondary {
    background-color: #10cbb4;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    margin-top: 6px;
    transition: background-color 0.3s ease;
}

.tdh-button-secondary:hover {
    background-color: #0aa99f;
    color: white;
}
/* Contenedor para centrar el botón */
.tdh-ver-mas-container {
    text-align: center;
    margin-top: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* Estilo del botón centrado */
.tdh-button.ver-mas {
    background-color: #7c3aed;
    color: #fff;
    padding: 10px 18px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
    max-width: 100%;
}

.tdh-button.ver-mas:hover {
    background-color: #5b21b6;
}




/* Botón modo Compra/Venta, se apoya en tu palette */
.tdh-mode-btn{
  margin:10px 0 14px;
  padding:8px 18px;
  border:none;border-radius:6px;
  background:#6f2dbd;color:#fff;font-weight:600;cursor:pointer
}
.tdh-mode-btn.activo{background:#27ae60}
