/* P140 — Skin WhatsApp (solo presentación). Se activa con html.tp-skin-wa (TP_P140_SKIN_WA=1). */
/* Paleta clásica de WhatsApp Web: cabecera #075e54 / #008069, burbujas #d9fdd3 / #fff, fondo beige. */

html.tp-skin-wa {
  --wa-teal-dark: #075e54;
  --wa-teal: #008069;
  --wa-teal-mid: #00a884;
  --wa-green: #25d366;
  --wa-bubble-out: #d9fdd3;
  --wa-bubble-in: #ffffff;
  --wa-sug: #fff4d6;
  --wa-sug-borde: #e8c56b;
  --wa-sombra: #e9edef;
  --wa-bg: #eae6df;
  --wa-bg-chat: #efeae2;
  --wa-panel: #f0f2f5;
  --wa-texto: #111b21;
  --wa-meta: #667781;
  --wa-tick: #53bdeb;
  --wa-fuente: "Segoe UI", "Helvetica Neue", Helvetica, "Noto Sans", Arial, sans-serif;
}

/* ---------- Base de los paneles (tp_tema) ---------- */
html.tp-skin-wa body.tp-tema,
html.tp-skin-wa body.tp-p1,
html.tp-skin-wa body.tp-p2,
html.tp-skin-wa body.tp-p3,
html.tp-skin-wa body.tp-p4,
html.tp-skin-wa body.tp-p5 {
  --tp-c1: #008069;
  --tp-c2: #075e54;
  --tp-linea: #00a884;
  --tp-anillo: rgba(0, 128, 105, .2);
  --tp-fondo: #eae6df;
  --tp-texto: #111b21;
  --tp-suave: #667781;
  --tp-thead: #008069;
  font-family: var(--wa-fuente) !important;
  background-color: #eae6df !important;
  background-image:
    radial-gradient(rgba(7, 94, 84, .04) 1px, transparent 1px) !important;
  background-size: 18px 18px !important;
  color: #111b21;
}

html.tp-skin-wa body {
  font-family: var(--wa-fuente);
}

/* ---------- Cabeceras ---------- */
html.tp-skin-wa .tp-hdr,
html.tp-skin-wa .header-tp,
html.tp-skin-wa .navbar-juridico,
html.tp-skin-wa .header-form,
html.tp-skin-wa #tp-master-nav-iso {
  background: linear-gradient(90deg, #075e54 0%, #008069 100%) !important;
  color: #fff !important;
  border-bottom: 3px solid #00a884 !important;
  box-shadow: 0 1px 3px rgba(11, 20, 26, .18) !important;
}

html.tp-skin-wa .tp-hdr h5,
html.tp-skin-wa .tp-hdr .tp-hdr-h,
html.tp-skin-wa .header-tp h5,
html.tp-skin-wa .header-form h5,
html.tp-skin-wa .navbar-juridico h5,
html.tp-skin-wa .navbar-juridico,
html.tp-skin-wa .navbar-juridico a,
html.tp-skin-wa .navbar-juridico span,
html.tp-skin-wa .navbar-juridico small {
  color: #fff !important;
}

html.tp-skin-wa .tp-hdr small,
html.tp-skin-wa .tp-hdr .tp-hdr-sub,
html.tp-skin-wa .header-tp small {
  color: rgba(255, 255, 255, .88) !important;
}

/* ---------- Tarjetas y bloques ---------- */
html.tp-skin-wa .card,
html.tp-skin-wa .card-custom,
html.tp-skin-wa .card-form,
html.tp-skin-wa .tp-guia,
html.tp-skin-wa .alert {
  border-radius: 10px !important;
}

html.tp-skin-wa .card,
html.tp-skin-wa .card-custom,
html.tp-skin-wa .card-form {
  background: #fff !important;
  border: 0 !important;
  box-shadow: 0 1px 3px rgba(11, 20, 26, .08), 0 4px 14px rgba(11, 20, 26, .04) !important;
}

html.tp-skin-wa .tp-guia,
html.tp-skin-wa .alert-primary {
  background: #f0f2f5 !important;
  border: 1px solid #e9edef !important;
  color: #111b21 !important;
}

/* ---------- Botones ---------- */
html.tp-skin-wa .btn,
html.tp-skin-wa .p110-btn,
html.tp-skin-wa button.p110-iconbtn {
  border-radius: 8px !important;
  font-weight: 600;
  font-family: inherit;
}

html.tp-skin-wa .btn-tp,
html.tp-skin-wa .btn-success,
html.tp-skin-wa .btn-primary,
html.tp-skin-wa .btn-confirm,
html.tp-skin-wa .p110-btn.p110-ok,
html.tp-skin-wa .bg-tierra {
  background-color: #008069 !important;
  background-image: none !important;
  border-color: #008069 !important;
  color: #fff !important;
}

html.tp-skin-wa .btn-tp:hover,
html.tp-skin-wa .btn-success:hover,
html.tp-skin-wa .btn-primary:hover,
html.tp-skin-wa .btn-confirm:hover,
html.tp-skin-wa .p110-btn.p110-ok:hover {
  background-color: #075e54 !important;
  border-color: #075e54 !important;
  color: #fff !important;
}

html.tp-skin-wa .btn-outline-success,
html.tp-skin-wa .btn-outline-primary {
  color: #008069 !important;
  border-color: #008069 !important;
}

html.tp-skin-wa .btn-outline-success:hover,
html.tp-skin-wa .btn-outline-primary:hover {
  background: #008069 !important;
  color: #fff !important;
}

html.tp-skin-wa .text-tierra,
html.tp-skin-wa .text-success {
  /* no forzar todos los text-success (estados de cuenta) */
}

html.tp-skin-wa .form-control:focus,
html.tp-skin-wa .form-select:focus,
html.tp-skin-wa .p110-input:focus,
html.tp-skin-wa input:focus,
html.tp-skin-wa select:focus,
html.tp-skin-wa textarea:focus {
  border-color: #00a884 !important;
  box-shadow: 0 0 0 3px rgba(0, 168, 132, .22) !important;
  outline: none;
}

/* ---------- Tablas y listas ---------- */
html.tp-skin-wa thead th,
html.tp-skin-wa .table thead th,
html.tp-skin-wa .table-custom th,
html.tp-skin-wa .table-custom thead th {
  background: #008069 !important;
  background-color: #008069 !important;
  color: #fff !important;
  font-weight: 600 !important;
  letter-spacing: .02em;
  border-color: #075e54 !important;
}

html.tp-skin-wa tbody tr:hover,
html.tp-skin-wa .table tbody tr:hover {
  background-color: #f5f6f6 !important;
}

html.tp-skin-wa tbody td,
html.tp-skin-wa .table td,
html.tp-skin-wa .table-custom td {
  color: #111b21;
  border-color: #f0f2f5 !important;
  font-size: 13px;
}

html.tp-skin-wa .pagination .page-item.active .page-link,
html.tp-skin-wa .page-item.active .page-link {
  background-color: #008069 !important;
  border-color: #008069 !important;
  color: #fff !important;
}

html.tp-skin-wa .page-link {
  color: #008069 !important;
}

/* ---------- Chat Línea 1 (mejora de burbujas, colitas, sugerencias) ---------- */
html.tp-skin-wa #p109n-chats {
  font-family: var(--wa-fuente);
  --v: #00a884;
  --vo: #008069;
  --g: #667781;
  --bd: #e9edef;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(11, 20, 26, .1);
}

html.tp-skin-wa #p109n-chats .p110-top {
  background: linear-gradient(90deg, #075e54, #008069) !important;
  color: #fff !important;
}

html.tp-skin-wa #p109n-chats .p110-der-col,
html.tp-skin-wa #p109n-chats .p110-hilo,
html.tp-skin-wa .p110-der-col {
  background-color: #efeae2 !important;
  background-image:
    radial-gradient(rgba(7, 94, 84, .07) 1.2px, transparent 1.2px) !important;
  background-size: 16px 16px !important;
}

html.tp-skin-wa #p109n-chats .p110-izq {
  background: #fff !important;
}

html.tp-skin-wa #p109n-chats .p110-busca {
  background: #f0f2f5 !important;
}

html.tp-skin-wa #p109n-chats .p110-chat:hover {
  background: #f5f6f6 !important;
}

html.tp-skin-wa #p109n-chats .p110-activo {
  background: #e9edef !important;
}

html.tp-skin-wa #p109n-chats .p110-tab-on {
  background: #d9fdd3 !important;
  color: #075e54 !important;
}

html.tp-skin-wa .p110-b-fila {
  display: flex;
  margin: 3px 8px;
}

html.tp-skin-wa .p110-b {
  position: relative;
  max-width: 76%;
  padding: 6px 9px 4px !important;
  font-size: 14.2px;
  line-height: 1.35;
  box-shadow: 0 1px .5px rgba(11, 20, 26, .13);
  color: #111b21;
}

html.tp-skin-wa .p110-lado-izq .p110-b,
html.tp-skin-wa .p110-b-cli {
  background: #fff !important;
  border-radius: 0 8px 8px 8px !important;
}

html.tp-skin-wa .p110-lado-izq .p110-b::after,
html.tp-skin-wa .p110-lado-izq .p110-b-cli::after {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 8px;
  height: 13px;
  background: #fff;
  clip-path: polygon(100% 0, 0 0, 100% 80%);
}

html.tp-skin-wa .p110-lado-der .p110-b,
html.tp-skin-wa .p110-b-env {
  background: #d9fdd3 !important;
  border-radius: 8px 0 8px 8px !important;
}

html.tp-skin-wa .p110-lado-der .p110-b::after,
html.tp-skin-wa .p110-lado-der .p110-b-env::after {
  content: "";
  position: absolute;
  top: 0;
  right: -8px;
  width: 8px;
  height: 13px;
  background: #d9fdd3;
  clip-path: polygon(0 0, 100% 0, 0 80%);
}

/* Sugerencias del bot / sombra: ámbar, distintas de un envío real */
html.tp-skin-wa .p110-b-sug {
  background: #fff4d6 !important;
  border: 1px solid #e8c56b !important;
  border-radius: 8px !important;
  box-shadow: none;
}

html.tp-skin-wa .p110-lado-der .p110-b-sug::after {
  background: #fff4d6;
}

html.tp-skin-wa .p110-sug-cab {
  color: #8a6d3b !important;
  font-weight: 700;
}

html.tp-skin-wa .p110-pend {
  border: 1.5px dashed #d4a017 !important;
}

html.tp-skin-wa .p110-b-pie {
  text-align: right !important;
  font-size: 11px !important;
  color: #667781 !important;
  margin-top: 3px;
  letter-spacing: .01em;
}

/* Checks ya presentes en el pie (✓✓) */
html.tp-skin-wa .p110-b-env .p110-b-pie {
  color: #53bdeb !important;
}

/* Separadores de fecha (los inserta p140_skin.js) */
html.tp-skin-wa .p140-fecha {
  display: block;
  width: max-content;
  max-width: 80%;
  margin: 10px auto;
  background: rgba(255, 255, 255, .55);
  color: #54656f;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(11, 20, 26, .08);
}

/* ---------- Formulario de reserva / venta ---------- */
html.tp-skin-wa .btn-confirm {
  background-color: #008069 !important;
  color: #fff !important;
}

html.tp-skin-wa #tp-master-nav-iso a {
  background: rgba(255, 255, 255, .14) !important;
  border-color: rgba(255, 255, 255, .25) !important;
  color: #fff !important;
  border-radius: 8px !important;
}

html.tp-skin-wa body:has(.card-form) {
  background-color: #eae6df !important;
}

/* ---------- Portal público (tierrapropia.com.py / :8001) ---------- */
html.tp-skin-wa[lang] body {
  /* no forzar fondo beige en el portal de marketing: se define más abajo si aplica */
}

/* Hero y barras oscuras del portal → verde WhatsApp, sin desarmar el layout */
html.tp-skin-wa .bg-tp-emerald,
html.tp-skin-wa .bg-emerald-800,
html.tp-skin-wa .bg-emerald-900,
html.tp-skin-wa .bg-green-800,
html.tp-skin-wa .bg-green-900,
html.tp-skin-wa [class*="bg-[#0"],
html.tp-skin-wa [class*="bg-[#052"],
html.tp-skin-wa [class*="bg-[#074"] {
  /* selectores de utilidad arbitraria por si aparecen; el resto va por clases reales */
}

html.tp-skin-wa .text-tp-emerald {
  color: #008069 !important;
}

html.tp-skin-wa a.text-tp-emerald:hover,
html.tp-skin-wa .hover\:text-tp-emerald:hover {
  color: #075e54 !important;
}

/* Cabecera / hero del portal: si usan fondos verde bosque, unificar a WA */
html.tp-skin-wa header,
html.tp-skin-wa nav.bg-white + section,
html.tp-skin-wa section.bg-gradient-to-b,
html.tp-skin-wa [class*="from-emerald"],
html.tp-skin-wa [class*="from-green"] {
  /* se refuerza en el bloque específico si hace falta */
}

/* Botones verdes del portal */
html.tp-skin-wa a[class*="bg-emerald"],
html.tp-skin-wa button[class*="bg-emerald"],
html.tp-skin-wa a[class*="bg-green-"],
html.tp-skin-wa button[class*="bg-green-"],
html.tp-skin-wa .bg-tp-emerald {
  background-color: #008069 !important;
}

html.tp-skin-wa a[class*="bg-emerald"]:hover,
html.tp-skin-wa button[class*="bg-emerald"]:hover,
html.tp-skin-wa .bg-tp-emerald:hover {
  background-color: #075e54 !important;
}

/* Tarjetas de fracciones: cabecera verde WA */
html.tp-skin-wa [class*="rounded"][class*="overflow-hidden"] > [class*="bg-emerald"],
html.tp-skin-wa [class*="rounded"][class*="overflow-hidden"] > [class*="bg-green"] {
  background-color: #075e54 !important;
}

/* No recortar los botones naranjas de WhatsApp del portal (CTA de contacto). */


/* ---------- Portal: tokens tp-emerald / emerald-* hacia la paleta WA ---------- */
html.tp-skin-wa .bg-tp-emerald { background-color: #008069 !important; }
html.tp-skin-wa .text-tp-emerald { color: #008069 !important; }
html.tp-skin-wa .hover\:text-tp-emerald:hover { color: #075e54 !important; }
html.tp-skin-wa .focus\:ring-tp-emerald:focus { --tw-ring-color: rgb(0 128 105 / 1) !important; }

html.tp-skin-wa .bg-emerald-950 { background-color: #075e54 !important; }
html.tp-skin-wa .bg-emerald-600,
html.tp-skin-wa .bg-emerald-500 { background-color: #008069 !important; }
html.tp-skin-wa .hover\:bg-emerald-700:hover,
html.tp-skin-wa .hover\:bg-emerald-800:hover { background-color: #075e54 !important; }
html.tp-skin-wa .text-emerald-700,
html.tp-skin-wa .text-emerald-800,
html.tp-skin-wa .text-emerald-950 { color: #075e54 !important; }

/* El portal conserva Poppins en marketing; no se fuerza Segoe UI aquí. */
html.tp-skin-wa body:has(> nav) .bg-emerald-950,
html.tp-skin-wa section.bg-emerald-950,
html.tp-skin-wa div.bg-emerald-950 {
  background-color: #075e54 !important;
}
