/* --- Base reset scoped --- */
.wcds-wrap, .wcds-wrap * {
  box-sizing: border-box;
}

.wcds-wrap {
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  max-width: 560px;
  margin: 0 auto;
}

.wcds-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.wcds-title {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.wcds-current {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wcds-current-label { opacity: .8; }

.wcds-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}

@media (max-width: 680px) {
  .wcds-row { grid-template-columns: 1fr; }
}

.wcds-label {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  padding-top: 8px;
}

.wcds-date {
  width: 100%;
  max-width: 360px;
  padding: 12px 14px;
  font-size: 18px;
  line-height: 1.2;
  border-radius: 10px;
}

/* --- Slots grid: bello e chiaro --- */
.wcds-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.wcds-slot {
  border: 2px solid #e3e3e3;
  border-radius: 14px;
  padding: 14px 12px;
  background: #fff;
  cursor: pointer;
  width: 100%;
  display: flex;
  flex-direction: column;          /* time sopra, badge sotto */
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  transition: transform .06s ease, border-color .15s ease, box-shadow .15s ease;
}

.wcds-slot:hover {
  transform: translateY(-1px);
  border-color: #111;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}

.wcds-slot-time {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .2px;
}

.wcds-slot-badge {
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  padding: 6px 8px;
  border-radius: 999px;
  background: #f3f3f3;
  border: 1px solid #e1e1e1;
  opacity: .85;
}

.wcds-slot.is-selected {
  border-color: #111;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.wcds-slot.is-disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.wcds-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.wcds-confirm {
  padding: 14px 18px !important;
  border-radius: 12px !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}

.wcds-msg {
  margin-top: 12px;
  font-size: 14px;
  min-height: 20px;
}

.wcds-msg.is-ok { color: #0a7a2f; }
.wcds-msg.is-err { color: #b00020; }
.wcds-msg.is-info { opacity: .85; }

.wcds-empty {
  padding: 12px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px dashed #e5e5e5;
}

/* checkout box */
.wcds-checkout-box {
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  padding: 14px;
  margin: 14px 0;
  background: #fff;
}

/* ===== WCDS: layout slot "compatto" 5/6 per riga ===== */

/* forza il box a non essere microscopico dentro il popup */
.wcds-wrap{
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

/* griglia: 6 colonne di default, 5 su schermi medi, poi scende */
.wcds-slots{
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch !important;
}

/* responsive: se lo spazio è poco */
@media (max-width: 820px){
  .wcds-slots{ grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}
@media (max-width: 640px){
  .wcds-slots{ grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 480px){
  .wcds-slots{ grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 360px){
  .wcds-slots{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* slot compatti: tutta la tessera è cliccabile e chiara */
.wcds-slot{
  width: 100% !important;
  min-width: 0 !important;
  height: 56px !important;
  padding: 8px 6px !important;
  border-radius: 12px !important;
  border: 2px solid #e7e7e7 !important;
  background: #fff !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;

  cursor: pointer !important;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  transition: transform .06s ease, border-color .15s ease, box-shadow .15s ease;
}

.wcds-slot:hover{
  transform: translateY(-1px);
  border-color: #111 !important;
  box-shadow: 0 10px 20px rgba(0,0,0,.08);
}

.wcds-slot.is-selected{
  border-color: #111 !important;
  box-shadow: 0 12px 22px rgba(0,0,0,.12);
}

/* testo orario bello leggibile ma compatto */
.wcds-slot-time{
  font-size: 16px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
}

/* badge capienza piccolo */
.wcds-slot-badge{
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  padding: 4px 7px !important;
  border-radius: 999px !important;
  background: #f3f3f3 !important;
  border: 1px solid #e5e5e5 !important;
  opacity: .9 !important;
}

/* slot disabilitato */
.wcds-slot.is-disabled{
  opacity: .45 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* rendi più chiaro "clicca uno slot": aggiungiamo un bordo al contenitore */
.wcds-row .wcds-slots{
  padding: 4px;
  border-radius: 12px;
}

/* bottone conferma più "serio" ma non gigante */
.wcds-confirm{
  padding: 12px 16px !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

