/**
 * Promtel FAQ Accordion Styles
 * Modern, accessible, smooth accordion matching Promtel design system
 */

.promtel-faq-wrapper {
  width: 100%;
  box-sizing: border-box;
}

.promtel-faq-accordion {
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* FAQ Item */
.promtel-faq-item {
  width: 100%;
  box-sizing: border-box;
  border-bottom: 1px solid #e5e7eb;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

/* Heading wrapper reset */
.promtel-faq-title-wrap {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  display: block;
}

/* Header Button - high specificity to cleanly reset Elementor global button styles */
button.promtel-faq-header,
.promtel-faq-wrapper button.promtel-faq-header,
.promtel-faq-accordion .promtel-faq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 24px 0;
  background: transparent;
  background-color: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  gap: 20px;
  user-select: none;
  outline: none;
  box-sizing: border-box;
  margin: 0;
  color: inherit;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

button.promtel-faq-header:focus-visible,
.promtel-faq-accordion .promtel-faq-header:focus-visible {
  outline: 2px solid var(--c-color4, #0a142d);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Question Title */
.promtel-faq-title {
  font-family: var(--f-family, "Figtree", sans-serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--c-color4, #0a142d);
  margin: 0;
  flex: 1 1 auto;
  transition: color 0.2s ease;
}

.promtel-faq-header:hover .promtel-faq-title {
  color: var(--c-color4, #0a142d);
}

.promtel-faq-item.is-active .promtel-faq-title {
  color: var(--c-color4, #0a142d);
}

/* Icon / Chevron */
.promtel-faq-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.promtel-faq-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--c-color4, #0a142d);
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.2s ease;
}

.promtel-faq-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
}

.promtel-faq-icon i {
  font-size: 18px;
  line-height: 1;
}

/* Rotate icon 180deg when active by default */
.promtel-faq-item.is-active .promtel-faq-icon {
  transform: rotate(180deg);
}

/* If a separate active icon is provided */
.promtel-faq-icon-active {
  display: none;
}
.promtel-faq-item.is-active
  .promtel-faq-has-active-icon
  .promtel-faq-icon-normal {
  display: none;
}
.promtel-faq-item.is-active
  .promtel-faq-has-active-icon
  .promtel-faq-icon-active {
  display: inline-flex;
  transform: none;
}

/* Icon Left alignment */
.promtel-faq-icon-left .promtel-faq-header {
  flex-direction: row-reverse;
  justify-content: flex-end;
}
.promtel-faq-icon-left .promtel-faq-title {
  flex: 1 1 auto;
}

/* Accordion Body: smooth grid rows transition */
.promtel-faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.promtel-faq-item.is-active .promtel-faq-body {
  grid-template-rows: 1fr;
  margin-top: -12px;
}

/* Content inner container */
.promtel-faq-content-inner {
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  padding-bottom: 0px;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    padding-bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.promtel-faq-item.is-active .promtel-faq-content-inner {
  opacity: 1;
  visibility: visible;
  padding-bottom: 24px;
}

/* Content typography */
.promtel-faq-content {
  font-family: var(--f-family, "Figtree", sans-serif);
  font-size: 15px;
  line-height: 1.65;
  color: var(--c-color1, #4b516b);
}

.promtel-faq-content p {
  margin: 0 0 1em 0;
}

.promtel-faq-content p:last-child {
  margin-bottom: 0;
}

.promtel-faq-content a {
  color: var(--c-color4, #0a142d);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.promtel-faq-content a:hover {
  color: var(--c-color2, #5aeb9c);
}

.promtel-faq-content ul,
.promtel-faq-content ol {
  padding-left: 20px;
  margin: 0 0 1em 0;
}

.promtel-faq-content li {
  margin-bottom: 0.5em;
}

.promtel-faq-item:first-child .promtel-faq-header {
  padding-top: 0px !important;
}

/* Responsive */
@media (max-width: 767px) {
  .promtel-faq-header {
    padding: 18px 0;
    gap: 14px;
  }
  .promtel-faq-title {
    font-size: 17.5px;
  }
  .promtel-faq-content {
    font-size: 14.5px;
    line-height: 1.6;
  }
  .promtel-faq-item.is-active .promtel-faq-content-inner {
    padding-bottom: 20px;
  }
}
