/* =====================================
   FAQ Block Styles
   ===================================== */

/* FAQ Block Container */
.ps-faqs {
  margin: 2rem 0;
}

/* Header Styles (similar to feature grid) */
.ps-faqs__header {
  text-align: center;
  margin-bottom: 3rem;
}

.ps-faqs__heading {
  font-size: 2.5rem;
  font-weight: 700;
  color: #4d1278;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.ps-faqs__subheading {
  font-size: 1.125rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* FAQ Items Container */
.ps-faqs__container {
  margin: 0 auto;
  gap: 1rem;
  display: flex;
  flex-direction: column;
}

/* FAQ Item */
.ps-faq-item {
  justify-content: space-between;
  opacity: 1;
  border-radius: 40px;
  padding: 24px;
  background: #ffffff;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  border: 1px solid #e5e7eb;
}

/* FAQ Item Active State */
.ps-faq-item.active {
  border: 2px solid var(--secondary-300, #a08bff);
  box-shadow: 0px 0px 12px 8px #c5baff52;
}

/* FAQ Header */
.ps-faq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  text-align: left;
}

/* FAQ Question */
.ps-faq-question {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 100%;
  letter-spacing: 0%;
  color: #111113;
  margin: 0;
  flex: 1;
  padding-right: 1rem;
}

/* FAQ Icon */
.ps-faq-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
}

/* Icon rotation when active */
.ps-faq-item.active .ps-faq-icon {
  transform: rotate(180deg);
}

/* SVG Icon Styles */
.ps-faq-icon svg {
  width: 24px;
  height: 24px;
  transition: opacity 0.2s ease;
}

.ps-faq-icon-closed {
  opacity: 1;
}

.ps-faq-icon-open {
  opacity: 0;
  position: absolute;
}

.ps-faq-item.active .ps-faq-icon-closed {
  opacity: 0;
}

.ps-faq-item.active .ps-faq-icon-open {
  opacity: 1;
}

/* FAQ Answer */
.ps-faq-answer {
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid #f3f4f6;
  color: #4b5563;
  line-height: 1.6;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: max-height, opacity, margin-top, padding-top;
  text-align: left;
}

.ps-faq-answer.open {
  margin-top: 1rem;
  padding-top: 1rem;
  opacity: 1;
  max-height: 1000px;
}

.ps-faq-answer p {
  margin: 0 0 1rem 0;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .ps-faqs__heading {
    font-size: 2rem;
  }

  .ps-faqs__subheading {
    font-size: 1rem;
  }

  .ps-faq-item {
    padding: 20px;
  }

  .ps-faq-question {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .ps-faqs__heading {
    font-size: 1.75rem;
  }

  .ps-faq-item {
    padding: 16px;
  }

  .ps-faq-question {
    font-size: 16px;
  }
}

/* Editor Specific Styles */
.block-editor .ps-faqs {
  margin: 1rem 0;
}

.block-editor .ps-faq-item {
  pointer-events: none; /* Disable interaction in editor */
}

.block-editor .ps-faq-header {
  cursor: default;
}
.block-editor-block-list__block[data-type='ps5-theme/faq-block'] {
  max-width: 100% !important;
}
