/*
 * r_campaignmanager — cards widget styles.
 *
 * Prefixo `rcm-` em todas as classes para evitar colisão com o blockcampaigns
 * antigo (campaign-card, date-badge, etc.) durante a coexistência.
 */

/* ===================== Desktop / tablet ===================== */

.rcm-cards-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: stretch;
  justify-content: center;
  margin-bottom: 1rem;
}

.rcm-card {
  --blue: #0b3f67;
  --blue-2: #0f5a8f;
  --shadow: 0 2px 10px rgba(0, 0, 0, .08);

  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  border-radius: 10px;
  min-width: 300px;
  max-width: 300px;
  background: var(--blue);
  color: #fff;
  text-decoration: none !important;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.rcm-card:hover {
  transform: scale(1.01);
  background: var(--blue-2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

/* Variant por tipo de campanha — usa o nosso enum (normal/highlight/outlet).
   Por defeito todos azuis; outlet em vermelho para destacar visualmente. */
.rcm-card--highlight {
  background: #5a2ea6;
}
.rcm-card--highlight:hover {
  background: #6c3ec0;
}
.rcm-card--outlet {
  background: #b81919;
}
.rcm-card--outlet:hover {
  background: #d12121;
}

/* Estado seleccionado — quando ?campaign=<uuid> bate com este card.
   Vermelho com prioridade sobre os variants --normal/--highlight/--outlet
   (declarado depois com maior especificity para garantir override). */
.rcm-card.rcm-card--selected {
  background: #b81919;
  box-shadow: 0 4px 14px rgba(184, 25, 25, .25);
}
.rcm-card.rcm-card--selected:hover {
  background: #d12121;
}
.rcm-card.rcm-card--selected .rcm-badge-day--blue {
  background: #b63737;
}

.rcm-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-right: 1px solid rgba(255, 255, 255, .2);
  margin-right: 12px;
  text-align: center;
  min-width: 92px;
}

.rcm-badge-top {
  font-size: .9rem;
  font-weight: 700;
  opacity: .95;
  line-height: 1;
  margin-bottom: 6px;
}

.rcm-badge-day {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.35rem;
  margin: 2px 0 6px 0;
}

.rcm-badge-day--blue {
  background: #377fb6;
}

.rcm-card--outlet .rcm-badge-day--blue {
  background: #b63737;
}
.rcm-card--highlight .rcm-badge-day--blue {
  background: #7a4dc0;
}

.rcm-badge-bottom {
  font-size: .95rem;
  font-weight: 700;
  opacity: .95;
  line-height: 1;
}

.rcm-card-body {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: start;
  text-align: start;
  width: 100%;
}

.rcm-card-title {
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
  margin-bottom: 6px;
}

.rcm-card-sub {
  font-size: 14px;
  line-height: 1.2;
  opacity: .95;
}

/* ===================== Mobile slider ===================== */
/* Replica do pattern do blockcampaigns: < 535px esconde a grid e mostra
   o slider que clona os cards via JS. */
@media (max-width: 534px) {
  #rcmCardsWrapper {
    display: none !important;
  }

  #rcmCardsCarouselMobile {
    display: block !important;
  }

  #rcmCardsCarouselMobile .rcm-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 0 14px 0;
  }

  #rcmCardsCarouselMobile .slick-list {
    margin: 0 -7px;
  }

  #rcmCardsCarouselMobile .slick-slide {
    padding: 0 7px;
    box-sizing: border-box;
  }

  #rcmCardsCarouselMobile .rcm-card:hover {
    transform: none;
  }

  .rcm-card {
    display: flex !important;
  }
}
