/*
 * Sistema común de iconos de interfaz.
 * Lucide para estados y icons/padel-racket-icon.svg?v=5 para pádel.
 */

.ui-racket-icon {
  display: inline-block;
  flex: 0 0 auto;
  background-color: transparent;
  background-image: url("icons/padel-racket-icon.svg?v=5");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.court-icon.ui-racket-icon {
  width: 20px;
  height: 20px;
  background-color: transparent;
  box-shadow: none;
  filter: invert(1);
}

.booking-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.booking-card-header .ui-racket-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  box-sizing: border-box;
  border-radius: 7px;
  background-color: #ffffff;
  background-size: 25px 25px;
  background-position: 53% 50%;
  background-repeat: no-repeat;
  flex: 0 0 28px;
  align-self: center;
  filter: none;
}

.booking-card .selected-turno::before {
  content: "";
  background: #ffffff url("icons/padel-racket-icon.svg?v=5")
    center / 20px 20px no-repeat;
  border: 1px solid rgba(255, 255, 255, .4);
  box-shadow: 0 2px 7px rgba(15, 23, 42, .18);
}

/* Check Lucide dentro de los indicadores circulares existentes. */
.admin-result-icon,
.booking-success-icon {
  font-size: 0;
  display: grid;
  place-items: center;
}

.admin-result-icon::before,
.booking-success-icon::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  background-color: #ffffff;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%0A%20%20%20%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222.5%22%0A%20%20%20%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22m5%2012%204%204L19%206%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%0A%20%20%20%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222.5%22%0A%20%20%20%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22m5%2012%204%204L19%206%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E");
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Candado Lucide en los turnos ocupados. */
.slot-status--reserved {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.slot-status--reserved::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%0A%20%20%20%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%0A%20%20%20%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%3Crect%20width%3D%2218%22%20height%3D%2211%22%20x%3D%223%22%20y%3D%2210%22%20rx%3D%222%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M7%2010V7a5%205%200%200%201%2010%200v3%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2215.5%22%20r%3D%221%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%0A%20%20%20%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%0A%20%20%20%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%3Crect%20width%3D%2218%22%20height%3D%2211%22%20x%3D%223%22%20y%3D%2210%22%20rx%3D%222%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M7%2010V7a5%205%200%200%201%2010%200v3%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2215.5%22%20r%3D%221%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E");
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* TriangleAlert Lucide en la zona peligrosa de administración. */
.danger-card #maintenanceTitle::before {
  content: "";
  display: inline-block;
  width: 19px;
  height: 19px;
  margin-right: 7px;
  vertical-align: -3px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%0A%20%20%20%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%0A%20%20%20%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22m21.73%2018-8-14a2%202%200%200%200-3.46%200l-8%2014A2%202%200%200%200%204%2021h16a2%202%200%200%200%201.73-3%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M12%209v4%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M12%2017h.01%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%0A%20%20%20%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%0A%20%20%20%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22m21.73%2018-8-14a2%202%200%200%200-3.46%200l-8%2014A2%202%200%200%200%204%2021h16a2%202%200%200%200%201.73-3%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M12%209v4%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M12%2017h.01%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E");
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Check e Info Lucide dentro de los círculos de confirmación. */
#confirmationMessage.message-success::before,
#confirmationMessage.message-info::before {
  content: "";
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  font-family: inherit;
  font-style: normal;
}

#confirmationMessage.message-success::before {
  background-color: #16a34a;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%0A%20%20%20%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.7%22%0A%20%20%20%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22m5%2012%204%204L19%206%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E");
}

#confirmationMessage.message-info::before {
  background-color: #1d4ed8;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%0A%20%20%20%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222.2%22%0A%20%20%20%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M12%2016v-4%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22M12%208h.01%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E");
}

@media (prefers-color-scheme: dark) {
  .court-icon.ui-racket-icon {
    filter: invert(1);
  }

  .booking-card-header .ui-racket-icon,
  .booking-card .selected-turno::before {
    background-color: #ffffff;
  }
}

/* Estados visuales de la leyenda y los turnos */
.slots-legend {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
}

.slots-legend-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 750;
  white-space: nowrap;
}

.slots-legend-item .slots-legend-icon {
  width: 14px;
  height: 14px;
}

.slots-legend-item--free {
  color: #15803d;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.slots-legend-item--selected {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.slots-legend-item--reserved {
  color: #9a3412;
  background: #fff7ed;
  border-color: #fed7aa;
}

.slot-status--free,
.slot-status--selected {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.slot-status--free::before,
.slot-status--selected::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.slot-status--free::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%0A%20%20%20%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%0A%20%20%20%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%0A%20%20%20%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%0A%20%20%20%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E");
}

.slot-status--selected::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%0A%20%20%20%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%0A%20%20%20%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22m8.5%2012%202.3%202.3%204.7-4.7%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%0A%20%20%20%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%0A%20%20%20%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%0A%20%20%20%20%3Cpath%20d%3D%22m8.5%2012%202.3%202.3%204.7-4.7%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E");
}

@media (prefers-color-scheme: dark) {
  .slots-legend-item--free {
    color: #bbf7d0;
    background: rgba(21, 128, 61, .24);
    border-color: rgba(74, 222, 128, .38);
  }

  .slots-legend-item--selected {
    color: #bfdbfe;
    background: rgba(37, 99, 235, .24);
    border-color: rgba(96, 165, 250, .42);
  }

  .slots-legend-item--reserved {
    color: #fed7aa;
    background: rgba(154, 52, 18, .28);
    border-color: rgba(251, 146, 60, .42);
  }
}

.booking-card-header .ui-racket-icon {
  filter: none;
}
