/* ==========================================================
   kaattrguide – Guía por grupo de atributos (drawer lateral)
   modules/kaattrguide/views/css/front.css
   ========================================================== */

.kag-block {
  margin: -4px 0 14px;
}

.kag-link {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  color: #2c6c8c;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}

.kag-link:hover,
.kag-link:focus-visible {
  color: #1c4a61;
}

/* ---------- Modal / drawer ---------- */
.kag-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.kag-modal[hidden] {
  display: none;
}

.kag-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  opacity: 0;
  transition: opacity .3s ease-in-out;
}

.kag-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 512px;
  max-width: 100%;
  background: #faf9f7;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  opacity: 0;
  transition: transform .5s ease-in-out, opacity .5s ease-in-out;
}

/* Estado abierto (clase añadida por JS) */
.kag-modal.is-active .kag-overlay {
  opacity: 1;
}

.kag-modal.is-active .kag-panel {
  transform: translateX(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .kag-overlay,
  .kag-panel {
    transition: none;
  }
}

/* ---------- Cabecera ---------- */
.kag-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 24px;
  background: #f2f0ed;
}

.kag-header-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #333;
}

.kag-close {
  padding: 0;
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: #333;
  cursor: pointer;
}

/* ---------- Cuerpo ---------- */
.kag-body {
  flex: 1 1 auto;
  padding: 26px 28px 28px;
  overflow-y: auto;
}

.kag-title {
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: 300;
  line-height: 1.3;
  text-transform: none;
  color: #222;
}

.kag-images {
  margin: 0 auto 28px;
  max-width: 300px;
}

.kag-images img {
  display: block;
  width: 100%;
  height: auto;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.kag-images img + img {
  margin-top: 12px;
}

.kag-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid #e3e0dc;
}

.kag-item:last-child {
  border-bottom: 0;
}

.kag-badge {
  display: flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #cfd6d9;
  font-size: 12px;
  color: #3d3935;
}

.kag-item-text {
  flex: 1 1 0%;
  min-width: 0;
}

.kag-question {
  margin: 3px 0 10px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  text-transform: none;
  color: #111;
}

.kag-answer {
  font-size: 13px;
  line-height: 1.6;
  color: #5f5a55;
}

.kag-answer p {
  margin: 0 0 10px;
}

.kag-answer p:last-child {
  margin-bottom: 0;
}

.kag-answer strong,
.kag-answer b {
  font-weight: 500;
  color: #111;
}

.kag-answer ul {
  margin: 0;
  padding-left: 16px;
}

.kag-answer li {
  margin-bottom: 2px;
}

.kag-help {
  margin-top: 28px;
  padding: 20px;
  border-radius: 8px;
  background: #efedea;
  font-size: 13px;
  line-height: 1.6;
  color: #5f5a55;
}

.kag-help p {
  margin: 0 0 12px;
}

.kag-help p:last-child {
  margin-bottom: 0;
}

.kag-help strong {
  font-weight: 500;
  color: #111;
}

.kag-help a {
  color: #3d3935;
  font-weight: 500;
  text-decoration: none;
}

.kag-help a:hover {
  text-decoration: underline;
}

/* ---------- Pie ---------- */
.kag-footer {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 18px 24px;
  background: #f2f0ed;
}

.kag-ok {
  padding: 12px 28px;
  border: 0;
  border-radius: 30px;
  background: #525c63;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.kag-ok:hover,
.kag-ok:focus-visible {
  background: #3d454b;
}

/* Bloquea el scroll de la página con el drawer abierto */
body.kag-open {
  overflow: hidden;
}

@media (max-width: 575px) {
  .kag-panel {
    width: 100%;
  }

  .kag-body {
    padding: 22px 18px;
  }
}

/* Idiomas de derecha a izquierda: el panel sale por la izquierda */
html[dir="rtl"] .kag-panel {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

html[dir="rtl"] .kag-modal.is-active .kag-panel {
  transform: translateX(0);
}