/* ============================================================
   Feature Cards – front-end & TinyMCE editor styles
   File: tinymce/feature-cards.css

   ✏️  OVERRIDE TOKENS in your child theme's style.css:

   .wr-feature-cards {
       --wr-fc-cols:           2;
       --wr-fc-gap:            28px;
       --wr-fc-radius:         16px;
       --wr-fc-shadow:         0 2px 16px rgba(0,0,0,.07);
       --wr-fc-img-ratio:      52%;
       --wr-fc-title-color:    #111827;
       --wr-fc-title-size:     1.35rem;
       --wr-fc-text-color:     #374151;
       --wr-fc-text-size:      0.95rem;
       --wr-fc-icon-color:     #1d3c8f;
       --wr-fc-item-gap:       14px;
   }
   ============================================================ */

.wr-feature-cards {
  --wr-fc-cols:        2;
  --wr-fc-gap:         28px;
  --wr-fc-radius:      16px;
  --wr-fc-shadow:      0 2px 16px rgba(0, 0, 0, .07);
  --wr-fc-img-ratio:   52%;
  --wr-fc-title-color: #171717;
  --wr-fc-title-size:  1.5rem;
  --wr-fc-text-color:  #404040;
  --wr-fc-text-size:   0.95rem;
  --wr-fc-icon-color:  #171717;
  --wr-fc-item-gap:    14px;

  display:               grid;
  grid-template-columns: repeat(var(--wr-fc-cols), 1fr);
  gap:                   var(--wr-fc-gap);
}

/* ── Card ────────────────────────────────────────────────────── */

.wr-fc-card {
  background:     #fafafa;
  border-radius:  var(--wr-fc-radius);
  overflow:       hidden;
  display:        flex;
  flex-direction: column;
}

/* ── Image ───────────────────────────────────────────────────── */

.wr-fc-card-image {
  position:    relative;
  width:       100%;
  padding-top: var(--wr-fc-img-ratio);
  overflow:    hidden;
  background:  #e8e8e8;
}

.wr-fc-card-img {
  position:      absolute;
  inset:         0;
  width:         100%;
  height:        100%;
  object-fit:    cover;
  display:       block;
  border-radius: var(--wr-fc-radius) var(--wr-fc-radius) 0 0;
}

.wr-fc-card-img--placeholder {
  position:        absolute;
  inset:           0;
  display:         flex;
  align-items:     center;
  justify-content: center;
  background:      #d1d5db;
  border-radius:   var(--wr-fc-radius) var(--wr-fc-radius) 0 0;
  font-size:       0.8rem;
  color:           #6b7280;
}

/* ── Badge ───────────────────────────────────────────────────── */

.wr-fc-badge {
  position:        absolute;
  top:             14px;
  left:            14px;
  font-size:       0.875rem;
  font-weight:     500;
  line-height: 1.25rem;
  padding:         0.25rem 0.5rem;
  border-radius:   20px;
  display:         inline-flex;
  align-items:     center;
  gap:             6px;
  backdrop-filter: blur(4px);
}

.wr-fc-badge .wr-fc-badge-icon {
  color: #183153;
  font-size: 1rem;
  line-height: 1.25rem;
}

/* ── Card body ───────────────────────────────────────────────── */

.wr-fc-card-body {
  padding: 22px 24px 24px;
  flex:    1;
}

.wr-fc-card-title {
  font-size:   var(--wr-fc-title-size);
  font-weight: 700;
  color:       var(--wr-fc-title-color);
  margin:      0 0 18px 0;
  padding:     0;
  line-height: 1.25;
  border:      none;
}

/* ── Checklist ───────────────────────────────────────────────── */

.wr-fc-list {
  list-style: none;
  margin:     0;
  padding:    0;
  display: flex;
  flex-direction: column;
  gap:         0.75rem;
}

.wr-fc-item {
  display:     flex;
  align-items: flex-start;
  margin: 0;
  gap: 0.75rem;
  font-size:   var(--wr-fc-text-size);
  color:       var(--wr-fc-text-color);
  line-height: 1.75rem;
}

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

.wr-fc-item .wr-fc-item-icon {
  color:      var(--wr-fc-icon-color);
  font-size:  1rem;
  flex-shrink: 0;
  margin-top:  6px;
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 700px) {
  .wr-feature-cards {
    --wr-fc-cols: 1;
  }
}

/* ── TinyMCE editor-only styles ──────────────────────────────── */

.mce-content-body .wr-feature-cards {
  outline:        2px dashed transparent;
  outline-offset: 4px;
  transition:     outline-color 0.15s ease;
  cursor:         pointer;
}

.mce-content-body .wr-feature-cards:hover {
  outline-color: #2271b1;
}

.mce-content-body .wr-feature-cards::before {
  content:        'Click toolbar button to edit · Double-click to open';
  display:        block;
  background:     #2271b1;
  color:          #fff;
  font-size:      11px;
  font-family:    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight:    600;
  padding:        4px 10px;
  border-radius:  4px;
  margin-bottom:  6px;
  width:          fit-content;
  opacity:        0;
  pointer-events: none;
  transition:     opacity 0.15s ease;
}

.mce-content-body .wr-feature-cards:hover::before {
  opacity: 1;
}

.mce-content-body .wr-feature-cards *,
.wr-feature-cards[contenteditable="false"] * {
  pointer-events: none;
  user-select:    none;
  cursor:         default;
}

.mce-content-body .wr-feature-cards,
.wr-feature-cards[contenteditable="false"] {
  pointer-events: all;
  cursor:         pointer;
}
