/* =====================================================================
   Schema Pro CodeWP — Frontend Shortcode Styles
   ===================================================================== */

/* -----------------------------------------------------------------------
   FAQ Accordion
----------------------------------------------------------------------- */
.spcw-faq-list {
  max-width: 100%;
  margin: 24px auto;
}

.spcw-faq-heading {
  font-size: 1.25em;
  font-weight: 700;
  margin-bottom: 16px;
  color: inherit;
}

.spcw-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s;
}
.spcw-faq-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.spcw-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1em;
  color: #1e293b;
  gap: 12px;
  user-select: none;
  transition: background 0.15s;
}
.spcw-faq-question:hover {
  background: #f8fafc;
}
.spcw-faq-question[aria-expanded="true"] {
  background: #eef2ff;
  color: #4f46e5;
}

/* Plus/minus icon */
.spcw-faq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  flex-shrink: 0;
  transition: all 0.2s;
  position: relative;
}
.spcw-faq-icon::before,
.spcw-faq-icon::after {
  content: "";
  position: absolute;
  background: #64748b;
  border-radius: 2px;
  transition: all 0.2s;
}
.spcw-faq-icon::before {
  width: 12px;
  height: 2px;
}
.spcw-faq-icon::after {
  width: 2px;
  height: 12px;
}

.spcw-faq-question[aria-expanded="true"] .spcw-faq-icon {
  background: #4f46e5;
}
.spcw-faq-question[aria-expanded="true"] .spcw-faq-icon::before {
  background: #fff;
}
.spcw-faq-question[aria-expanded="true"] .spcw-faq-icon::after {
  background: #fff;
  transform: scaleY(0);
}

/* Answer */
.spcw-faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.spcw-faq-answer.is-open {
  grid-template-rows: 1fr;
}
.spcw-faq-answer-inner {
  overflow: hidden;
  padding: 0 20px;
  font-size: 0.95em;
  line-height: 1.7;
  color: #475569;
}
.spcw-faq-answer.is-open .spcw-faq-answer-inner {
  padding: 4px 20px 18px;
}

/* Non-accordion (plain list) */
.spcw-faq-list:not(.spcw-accordion) .spcw-faq-question {
  cursor: default;
}
.spcw-faq-list:not(.spcw-accordion) .spcw-faq-icon {
  display: none;
}
.spcw-faq-list:not(.spcw-accordion) .spcw-faq-answer {
  display: block;
}
.spcw-faq-list:not(.spcw-accordion) .spcw-faq-answer-inner {
  padding: 0 20px 16px;
}

/* -----------------------------------------------------------------------
   Review / Rating Widget
----------------------------------------------------------------------- */
.spcw-review-widget {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 15px;
  background: #1e293b;
  border-radius: 5px;
  padding: 3px 10px;
}

.spcw-review-label {
  font-weight: 600;
  color: #1e293b;
}

.spcw-stars {
  position: relative;
  display: inline-block;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 2px;
}
.spcw-stars-empty {
  color: #e2e8f0;
}
.spcw-stars-filled {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  overflow: hidden;
  /* color set inline */
}

.spcw-review-value {
  font-weight: 700;
  font-size: 16px;
  color: #1e293b;
}
.spcw-review-count {
  font-size: 13px;
  color: #64748b;
}

/* -----------------------------------------------------------------------
   Dark mode support
----------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  .spcw-faq-item {
    background: #1e293b;
    border-color: #334155;
  }
  .spcw-faq-question {
    color: #f1f5f9;
  }
  .spcw-faq-question:hover {
    background: #0f172a;
  }
  .spcw-faq-question[aria-expanded="true"] {
    background: #1e1b4b;
    color: #a5b4fc;
  }
  .spcw-faq-answer-inner {
    color: #94a3b8;
  }
  .spcw-faq-icon {
    background: #334155;
  }
  .spcw-faq-icon::before,
  .spcw-faq-icon::after {
    background: #94a3b8;
  }
  .spcw-stars-empty {
    color: #334155;
  }
  .spcw-review-value {
    color: #f1f5f9;
  }
}
