/* Amaz Drilldown - Frontend (v1.2.2) */
.adcp {
  font-family: var(--adcp-font);
  font-size: var(--adcp-size);
  line-height: var(--adcp-leading);
  color: var(--adcp-text);
  max-width: var(--adcp-maxw);
  margin-top: var(--adcp-mt);
  margin-bottom: var(--adcp-mb);
}
.adcp__box{
  background: var(--adcp-bg);
  border: var(--adcp-border-w) solid var(--adcp-border);
  border-radius: var(--adcp-radius);
  padding: var(--adcp-pad);
  box-shadow: var(--adcp-shadow);
}
.adcp__header{
  font-size: var(--adcp-title);
  font-weight: var(--adcp-title-weight);
  margin: 0 0 12px;
  color: var(--adcp-text);
}
.adcp__alldepts{
  display:inline-block;
  margin: 0 0 8px;
  font-weight: var(--adcp-all-weight);
  font-size: var(--adcp-all-size);
  color: var(--adcp-all-color);
  text-decoration:none;
  margin-left: var(--adcp-all-indent); /* supports negative to nudge left */
  padding-top: var(--adcp-all-pt);
  padding-bottom: var(--adcp-all-pb);
  text-transform: var(--adcp-all-transform);
  transition: color var(--adcp-transition) ease;
}
.adcp__alldepts:hover{ color: var(--adcp-all-hover); }
.adcp__alldepts.is-active{ color: var(--adcp-active); }

.adcp__back{
  display:inline-block;
  margin: 0 0 10px;
  color: var(--adcp-back-link);
  text-decoration:none;
}
.adcp__back:hover{ filter: brightness(0.9); }

.adcp__parent-title{
  font-size: var(--adcp-parent-title);
  font-weight: var(--adcp-parent-title-weight);
  margin: 0 0 8px;
}

.adcp__list{
  list-style:none;
  margin:0;
  padding:0;
  position: relative;
}
.adcp--div-line .adcp__item{ border-top: var(--adcp-divider); }
.adcp--div-line .adcp__item:first-child{ border-top: none; }

.adcp__link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: var(--adcp-vpad-top) var(--adcp-hpad) var(--adcp-vpad-bot);
  color: var(--adcp-text);
  text-decoration:none;
  border-radius: 8px;
  transition: background var(--adcp-transition) ease, color var(--adcp-transition) ease;
  font-weight: var(--adcp-item-weight);
  width: 100%;
  box-sizing: border-box;
  line-height: var(--adcp-item-lh);
}
.adcp__name{ line-height: var(--adcp-item-lh); }

/* CHILD VIEW: prevent intersection & avoid hover overlap with left guideline */
.adcp--div-line .adcp__list--children .adcp__item{ position: relative; border-top: none; }
.adcp--div-line .adcp__list--children .adcp__item::after{ content:""; position:absolute; top:0; left: calc(var(--adcp-hpad) + var(--adcp-child-indent)); right:0; border-top: var(--adcp-divider); }
.adcp--div-line .adcp__list--children .adcp__item:first-child::after{ content:none; }

.adcp__list--children .adcp__link{
  margin-left: var(--adcp-child-indent); /* shift the clickable block to start after the guideline */
  padding-left: var(--adcp-hpad);
}

/* left guideline in child view */
.adcp__list--children::before{
  content: "";
  position: absolute;
  left: var(--adcp-hpad);
  top: var(--adcp-left-rule-inset);
  bottom: var(--adcp-left-rule-inset);
  width: var(--adcp-left-rule-width);
  background: var(--adcp-left-rule-color);
  border-radius: 2px;
}
.adcp__link:hover{
  background: var(--adcp-hover-bg);
}
.adcp__name{
  color: var(--adcp-text);
}
.adcp__count{
  color: var(--adcp-count);
  margin-left: 6px;
  font-weight: 500;
  font-size: 0.95em;
}

.adcp__chev{
  color: var(--adcp-arrow-color);
  transition: transform var(--adcp-transition) ease;
  font-size: var(--adcp-chev-size);
  line-height: 1;
}
.adcp__link:hover .adcp__chev{
  transform: translateX(2px);
  color: var(--adcp-link-hover);
}

.adcp__item.is-active > .adcp__link .adcp__name{
  color: var(--adcp-active);
  font-weight: var(--adcp-active-weight);
}

/* RTL support */
.rtl .adcp__link{
  flex-direction: row-reverse;
}
.rtl .adcp__chev{
  transform: rotate(180deg);
}
.rtl .adcp__link:hover .adcp__chev{
  transform: rotate(180deg) translateX(2px);
}
/* RTL: mirror indents, guideline, and offset divider */
.rtl .adcp__list--children .adcp__link{
  margin-right: var(--adcp-child-indent);
  padding-right: var(--adcp-hpad);
  margin-left: 0;
  padding-left: var(--adcp-hpad);
}
.rtl .adcp__list--children::before{
  left: auto;
  right: var(--adcp-hpad);
}
.rtl .adcp__list--children .adcp__item::after{
  left: auto;
  right: calc(var(--adcp-hpad) + var(--adcp-child-indent));
}
/* v1.2.3 — optional CSS gates; PHP already controls output */
.adcp__list--root  .adcp__chev{ display: inline-block; }
.adcp__list--children .adcp__chev{ display: inline-block; }


/* v1.2.4 — prevent hover shadow overlap with the left guideline and center content */
.adcp__link{
  border-radius: var(--adcp-row-radius);
  box-shadow: none;
}
.adcp__link:hover{
  box-shadow: var(--adcp-hover-shadow);
}

.adcp__list--children .adcp__link{
  margin-left: calc(var(--adcp-child-indent) + var(--adcp-hover-gap-left));
  padding-left: var(--adcp-hpad);
}

/* ensure perfect vertical centering within each row */
.adcp__item{ display:block; }
.adcp__link{ align-items: var(--adcp-align); }
.adcp__name, .adcp__chev{ align-self: center; }

/* v1.3.0 row alignment variables */
.adcp__link{ min-height: var(--adcp-item-minh); }


/* v1.4.0 — Shadow divider mode (no intersections; soft bottom rule) */
.adcp--div-shadow .adcp__item{ position: relative; }
.adcp--div-shadow .adcp__item::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  box-shadow: 0 var(--adcp-div-y) var(--adcp-div-blur) var(--adcp-div-spread) var(--adcp-divider-color);
}
.adcp--div-shadow .adcp__item:last-child::after{ content: none; }

/* Offset shadow so it doesn't touch the vertical guideline on child view */
.adcp--div-shadow .adcp__list--children .adcp__item::after{
  left: calc(var(--adcp-hpad) + var(--adcp-child-indent));
}

/* None mode: remove any borders/shadows */
.adcp--div-none .adcp__item{ border-top: none !important; }
.adcp--div-none .adcp__item::after{ content: none !important; }

.rtl .adcp--div-line .adcp__list--children .adcp__item::after{
  left: auto;
  right: calc(var(--adcp-hpad) + var(--adcp-child-indent));
}
.rtl .adcp--div-shadow .adcp__list--children .adcp__item::after{
  left: auto;
  right: calc(var(--adcp-hpad) + var(--adcp-child-indent));
}


/* v1.5.0 — Bottom-fill divider mode */
.adcp--div-bottomfill .adcp__item{ position: relative; }
.adcp--div-bottomfill .adcp__item::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--adcp-bfill-h);
  background: var(--adcp-bfill-color);
  border-bottom-left-radius: var(--adcp-bfill-radius);
  border-bottom-right-radius: var(--adcp-bfill-radius);
  z-index: 0;
}
.adcp--div-bottomfill .adcp__item:last-child::after{ content: none; }

/* Offset for child list so it doesn't touch the vertical guideline */
.adcp--div-bottomfill .adcp__list--children .adcp__item::after{
  left: calc(var(--adcp-hpad) + var(--adcp-child-indent) + var(--adcp-bfill-inset));
}

/* Keep the hover layer above the bottom fill */
.adcp__link{ position: relative; z-index: 1; }

/* RTL offset mirror */
.rtl .adcp--div-bottomfill .adcp__list--children .adcp__item::after{
  left: auto;
  right: calc(var(--adcp-hpad) + var(--adcp-child-indent) + var(--adcp-bfill-inset));
}
