/**
 * 24H Content Widgets — Frontend Styles
 *
 * All rules scoped under .fc-widget to prevent
 * interference with header, footer, sidebar, or Elementor components.
 *
 * Mobile-first with breakpoint at 768px.
 *
 * @package 24H_Content_Widgets
 */

/* ═══════════════════════════════════════════════════════════════════
   Brand tokens
   ═══════════════════════════════════════════════════════════════════ */

.fc-widget {
  --fc-dark-blue: #022D53;
  --fc-blue: #0761AF;
  --fc-light-blue: #E4F1FC;
  --fc-gold: #FFC850;
  --fc-text: #212529;
  --fc-text-light: #6c757d;
  --fc-bg-light: #F5F7FA;
  --fc-border: #DEE2E6;
  --fc-success: #16A34A;
  --fc-danger: #DC2626;
  --fc-radius: 8px;
  --fc-shadow: 0 1px 3px rgba(2, 45, 83, 0.08);
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  margin: 2rem 0;
  color: var(--fc-text);
  line-height: 1.6;
  box-sizing: border-box;
}

.fc-widget *,
.fc-widget *::before,
.fc-widget *::after {
  box-sizing: inherit;
}


/* ═══════════════════════════════════════════════════════════════════
   FAQ Accordion
   ═══════════════════════════════════════════════════════════════════ */

.fc-faq {
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  box-shadow: var(--fc-shadow);
}

.fc-faq__title {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fc-dark-blue);
  background: var(--fc-bg-light);
  border-bottom: 1px solid var(--fc-border);
}

.fc-faq__list {
  margin: 0;
  padding: 0;
}

.fc-faq__item {
  border-bottom: 1px solid var(--fc-border);
}

.fc-faq__item:last-child {
  border-bottom: none;
}

.fc-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--fc-dark-blue);
  cursor: pointer;
  list-style: none;
  transition: background-color 0.15s ease;
}

.fc-faq__q:hover {
  background: var(--fc-bg-light);
}

/* Remove default marker */
.fc-faq__q::-webkit-details-marker {
  display: none;
}

.fc-faq__q::marker {
  content: '';
}

/* Chevron */
.fc-faq__q::after {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--fc-blue);
  border-bottom: 2px solid var(--fc-blue);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.fc-faq__item[open] > .fc-faq__q::after {
  transform: rotate(-135deg);
}

.fc-faq__a {
  padding: 0 1.25rem 1rem;
  color: var(--fc-text);
  font-size: 0.95rem;
}

.fc-faq__a > div {
  margin: 0;
}


/* ═══════════════════════════════════════════════════════════════════
   Table
   ═══════════════════════════════════════════════════════════════════ */

.fc-table {
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  box-shadow: var(--fc-shadow);
  padding: 0;
}

.fc-table__caption {
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--fc-dark-blue);
  background: var(--fc-bg-light);
  border-bottom: 1px solid var(--fc-border);
}

.fc-table__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.fc-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.fc-table th,
.fc-table td {
  padding: 0.625rem 0.875rem;
  text-align: left;
  vertical-align: top;
  border: none;
}

.fc-table thead th {
  font-weight: 700;
  color: #fff;
  background: var(--fc-dark-blue);
  white-space: nowrap;
}

/* Striped variant */
.fc-table--striped tbody tr:nth-child(even) {
  background: var(--fc-bg-light);
}

/* Bordered variant */
.fc-table--bordered th,
.fc-table--bordered td {
  border: 1px solid var(--fc-border);
}

/* Plain variant — minimal */
.fc-table--plain tbody tr {
  border-bottom: 1px solid var(--fc-border);
}

.fc-table--plain tbody tr:last-child {
  border-bottom: none;
}


/* ═══════════════════════════════════════════════════════════════════
   Box evidenza
   ═══════════════════════════════════════════════════════════════════ */

.fc-box {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--fc-radius);
  border-left: 4px solid;
}

/* Type variants */
.fc-box--info {
  background: var(--fc-light-blue);
  border-left-color: var(--fc-blue);
}

.fc-box--warning {
  background: #FFF8E1;
  border-left-color: var(--fc-gold);
}

.fc-box--success {
  background: #F0FDF4;
  border-left-color: var(--fc-success);
}

.fc-box--danger {
  background: #FEF2F2;
  border-left-color: var(--fc-danger);
}

.fc-box__icon {
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1.5;
}

.fc-box--info .fc-box__icon { color: var(--fc-blue); }
.fc-box--warning .fc-box__icon { color: #D97706; }
.fc-box--success .fc-box__icon { color: var(--fc-success); }
.fc-box--danger .fc-box__icon { color: var(--fc-danger); }

.fc-box__body {
  flex: 1;
  min-width: 0;
}

.fc-box__title {
  margin: 0 0 0.25rem;
  font-weight: 700;
  font-size: 1rem;
}

.fc-box--info .fc-box__title { color: var(--fc-dark-blue); }
.fc-box--warning .fc-box__title { color: #92400E; }
.fc-box--success .fc-box__title { color: #166534; }
.fc-box--danger .fc-box__title { color: #991B1B; }

.fc-box__content {
  font-size: 0.95rem;
  color: var(--fc-text);
}

.fc-box__content p:last-child {
  margin-bottom: 0;
}


/* ═══════════════════════════════════════════════════════════════════
   Pros / Cons
   ═══════════════════════════════════════════════════════════════════ */

.fc-proscons {
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  box-shadow: var(--fc-shadow);
}

.fc-proscons__title {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fc-dark-blue);
  background: var(--fc-bg-light);
  border-bottom: 1px solid var(--fc-border);
}

.fc-proscons__grid {
  display: grid;
  grid-template-columns: 1fr;
}

.fc-proscons__pros,
.fc-proscons__cons {
  padding: 1rem 1.25rem;
}

.fc-proscons__pros {
  border-bottom: 1px solid var(--fc-border);
}

.fc-proscons__pros h4,
.fc-proscons__cons h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.fc-proscons__pros h4 {
  color: var(--fc-success);
}

.fc-proscons__cons h4 {
  color: var(--fc-danger);
}

.fc-proscons__pros ul,
.fc-proscons__cons ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fc-proscons__pros li,
.fc-proscons__cons li {
  padding: 0.375rem 0 0.375rem 1.5rem;
  position: relative;
  font-size: 0.95rem;
}

.fc-proscons__pros li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--fc-success);
  font-weight: 700;
}

.fc-proscons__cons li::before {
  content: '\2717';
  position: absolute;
  left: 0;
  color: var(--fc-danger);
  font-weight: 700;
}

/* Desktop: 2-column grid */
@media (min-width: 768px) {
  .fc-proscons__grid {
    grid-template-columns: 1fr 1fr;
  }

  .fc-proscons__pros {
    border-bottom: none;
    border-right: 1px solid var(--fc-border);
  }
}


/* ═══════════════════════════════════════════════════════════════════
   Steps (Stepper numerato)
   ═══════════════════════════════════════════════════════════════════ */

.fc-steps {
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  overflow: hidden;
  box-shadow: var(--fc-shadow);
}

.fc-steps__title {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fc-dark-blue);
  background: var(--fc-bg-light);
  border-bottom: 1px solid var(--fc-border);
}

.fc-steps__list {
  margin: 0;
  padding: 1rem 1.25rem;
  list-style: none;
  counter-reset: step-counter;
}

.fc-steps__item {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-bottom: 1.5rem;
}

.fc-steps__item:last-child {
  padding-bottom: 0;
}

/* Vertical connector line */
.fc-steps__item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--fc-border);
}

/* Numbered circle */
.fc-steps__num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--fc-blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.fc-steps__body {
  flex: 1;
  min-width: 0;
  padding-top: 0.375rem;
}

.fc-steps__step-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fc-dark-blue);
}

.fc-steps__text {
  font-size: 0.95rem;
  color: var(--fc-text);
}

.fc-steps__text p:last-child {
  margin-bottom: 0;
}


/* ═══════════════════════════════════════════════════════════════════
   Print styles
   ═══════════════════════════════════════════════════════════════════ */

@media print {
  .fc-faq__item {
    display: block;
  }

  .fc-faq__item[open] > .fc-faq__a,
  .fc-faq__a {
    display: block;
  }

  .fc-faq__q::after {
    display: none;
  }

  .fc-table__scroll {
    overflow: visible;
  }

  .fc-proscons__grid {
    grid-template-columns: 1fr 1fr;
  }
}
