/* ============================================================
   Surf Courses – front-end & TinyMCE editor styles
   File: tinymce/surf-courses.css

   Layout: image fixed on the left, full accordion on the right.

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

   .wr-sc-wrap {
       --wr-sc-img-col-width:  340px;
       --wr-sc-gap:            28px;
       --wr-sc-radius:         12px;
       --wr-sc-border:         #e5e7eb;
       --wr-sc-shadow:         0 1px 4px rgba(0,0,0,.06);
       --wr-sc-img-radius:     12px;
       --wr-sc-title-color:    #111827;
       --wr-sc-title-size:     1.1rem;
       --wr-sc-text-color:     #374151;
       --wr-sc-text-size:      0.95rem;
       --wr-sc-price-color:    #1a7fa0;
       --wr-sc-price-size:     1.2rem;
       --wr-sc-check-color:    #374151;
   }
   ============================================================ */

.wr-sc-wrap {
  --wr-sc-img-col-width: 340px;
  --wr-sc-gap:           2rem;
  --wr-sc-radius:        12px;
  --wr-sc-border:        #E5E5E5;
  --wr-sc-shadow:        0 1px 4px rgba(0, 0, 0, .06);
  --wr-sc-img-radius:    12px;
  --wr-sc-title-color:   #171717;
  --wr-sc-title-size:    1.5rem;
  --wr-sc-text-color:    #374151;
  --wr-sc-text-size:     1rem;
  --wr-sc-price-color:   #0F4C81;
  --wr-sc-price-size:    1.5rem;
  --wr-sc-check-color:   #171717;

  display:               grid;
  grid-template-columns: var(--wr-sc-img-col-width) 1fr;
  gap:                   var(--wr-sc-gap);
  align-items:           start;
  margin-bottom:         24px;
}

/* ── Section heading (spans both columns) ───────────────────── */

.wr-sc-heading {
  grid-column:  1 / -1;
  font-size:    2.25rem;
  font-weight:  700;
  color:        var(--wr-sc-title-color);
  margin:       0;
  padding:      0;
  line-height:  2.75rem;
  border:       none;
}

/* ── Left column: image (sticky while scrolling cards) ───────── */

.wr-sc-image-col {
  position: sticky;
  top:      24px;
}

.wr-sc-image-wrap {
  position:      relative;
  border-radius: var(--wr-sc-img-radius);
  overflow:      hidden;
}

.wr-sc-img {
  width:         100%;
  height:        auto;
  display:       block;
  border-radius: var(--wr-sc-img-radius);
  object-fit:    cover;
}

.wr-sc-img-placeholder {
  width:           100%;
  aspect-ratio:    3 / 4;
  background:      #e5e7eb;
  border-radius:   var(--wr-sc-img-radius);
  display:         flex;
  align-items:     center;
  justify-content: center;
  color:           #9ca3af;
  font-size:       0.85rem;
}

/* ── Badge (overlaid on image) ───────────────────────────────── */

.wr-sc-badge {
  position:       absolute;
  top:            1rem;
  left:           1rem;
  display:        inline-flex;
  align-items:    center;
  gap:            0.25rem;
  padding:        0.125rem 0.5rem;
  border-radius:  1rem;
  font-size:      0.875rem;
  font-weight:    500;
  text-transform: uppercase;
  line-height:    1.25rem;
}

.wr-sc-badge--optional {
  background: #EBF5F5;
  color:      #0F4C81;
  border:     1px solid #99C5F1;
}

.wr-sc-badge--inklusive {
  background: #dcfce7;
  color:      #15803d;
  border:     1px solid #bbf7d0;
}

.wr-sc-badge .wr-sc-badge-icon {
  font-size: 1rem;
  color: #183153;
}

/* ── Right column: accordion ─────────────────────────────────── */

.wr-sc-accordion-col {
  display:        flex;
  flex-direction: column;
  gap:            0;
}

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

.wr-sc-card {
  border:           1px solid var(--wr-sc-border);
  border-radius:    var(--wr-sc-radius);
  background:       #fff;
  overflow:         hidden;
  margin-bottom:    10px;
}

.wr-sc-card.wr-sc-card--open {
  border-color: #171717;
}

.wr-sc-card:last-child {
  margin-bottom: 0;
}

/* ── Header ──────────────────────────────────────────────────── */

.wr-sc-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         0.75rem 1.5rem;
  cursor:          pointer;
  user-select:     none;
}

.wr-sc-header:hover {
  background: #fafafa;
}

.wr-sc-header-title {
  display:     flex;
  align-items: baseline;
  gap:         4px;
  flex-wrap:   wrap;
}

.wr-sc-title {
  font-size:   var(--wr-sc-title-size);
  font-weight: 700;
  color:       var(--wr-sc-title-color);
  line-height: 1.3;
}

.wr-sc-duration {
  font-size:   var(--wr-sc-title-size);
  font-weight: 400;
  color:       var(--wr-sc-title-color);
}

.wr-sc-toggle {
  flex-shrink:     0;
  width:           3rem;
  height:          3rem;
  border:          0;
  border-radius:   0.625rem;
  background:      #fafafa;
  cursor:          pointer;
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       1.3rem;
  color:           var(--wr-sc-title-color);
  line-height:     1;
  padding:         0;
  transition:      background 0.15s;
}

.wr-sc-toggle:hover {
  background: #f3f4f6;
}

/* ── Body ────────────────────────────────────────────────────── */

.wr-sc-body {
  max-height: 0;
  overflow:   hidden;
  transition: max-height 0.35s ease;
}

.wr-sc-card--open .wr-sc-body {
  max-height: 2000px;
}

.wr-sc-body-inner {
  display:        flex;
  flex-direction: column;
  gap:            16px;
  padding:        0 1.5rem 1.25rem;
}

/* ── Description ─────────────────────────────────────────────── */

.wr-sc-desc {
  font-size:   var(--wr-sc-text-size);
  color:       var(--wr-sc-text-color);
  line-height: 1.65;
  margin:      0;
  padding:     0;
}

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

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

.wr-sc-checklist-item {
  display:     flex;
  align-items: flex-start;
  gap:         10px;
  font-size:   var(--wr-sc-text-size);
  color:       #525252;
  line-height: 1.5rem;
  margin: 0;
}

.wr-sc-checklist-item .wr-sc-check-icon {
  flex-shrink: 0;
  margin-top:  3px;
  font-size:   1rem;
  color:       var(--wr-sc-check-color);
}

/* ── Price ───────────────────────────────────────────────────── */

.wr-sc-price {
  display:     flex;
  align-items: baseline;
  gap:         4px;
}

.wr-sc-price-amount {
  font-size:   var(--wr-sc-price-size);
  font-weight: 700;
  color:       var(--wr-sc-price-color);
  line-height: 2rem;
}

.wr-sc-price-suffix {
  font-size: 1.125rem;
  color:     var(--wr-sc-price-color);
  line-height: 1.875rem;
}

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

@media (max-width: 700px) {
  .wr-sc-wrap {
    grid-template-columns: 1fr;
  }

  .wr-sc-image-col {
    position: static;
  }
}

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

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

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

.mce-content-body .wr-sc-wrap::before {
  content:        'Double-click or use toolbar to edit';
  display:        block;
  grid-column:    1 / -1;
  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;
}

.mce-content-body .wr-sc-wrap:hover::before {
  opacity: 1;
}

/* Show all card bodies expanded in editor */
.mce-content-body .wr-sc-body {
  max-height: none !important;
  overflow:   visible !important;
}

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

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