/* Material Design - Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
  /* Dark Theme Colors */
  --primary-color: #bb86fc;
  --primary-variant: #3700b3;
  --secondary-color: #03dac6;
  --background-color: #121212;
  --surface-color: #1e1e1e;
  --card-color: #2d2d2d;
  --error-color: #cf6679;

  /* Text Colors */
  --text-primary: rgba(255, 255, 255, 0.87);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-disabled: rgba(255, 255, 255, 0.38);
  --text-hint: rgba(255, 255, 255, 0.38);

  /* Elevation & Effects */
  --elevation-0: none;
  --elevation-1: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --elevation-2: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --elevation-3: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --elevation-4: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* UI Elements */
  --border-radius: 4px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  
  /* Overlays */
  --overlay-1: rgba(255, 255, 255, 0.05);
  --overlay-2: rgba(255, 255, 255, 0.08);
  --overlay-3: rgba(255, 255, 255, 0.11);
  --overlay-4: rgba(255, 255, 255, 0.12);
  
  /* Surface Overlays */
  --surface-overlay-1: rgba(255, 255, 255, 0.05);
  --surface-overlay-2: rgba(255, 255, 255, 0.07);
  --surface-overlay-3: rgba(255, 255, 255, 0.08);
  --surface-overlay-4: rgba(255, 255, 255, 0.09);
  --surface-overlay-5: rgba(255, 255, 255, 0.11);
}

/* Base Styles */
#rp-booking-calendar {
  font-family: 'Roboto', sans-serif;
  max-width: 960px;
  margin: 0 auto;
  background-color: var(--background-color);
  border-radius: 8px;
  overflow: hidden;
  color: var(--text-primary);
  padding: 16px 24px 32px;
  box-shadow: var(--elevation-1);
}

/* Override background when used in Elementor widget */
.elementor-widget-container #rp-booking-calendar {
  background-color: transparent !important;
  background: none !important;
  box-shadow: none;
  padding: 0;
}

.elementor-widget-container #rp-user-bookings-calendar {
  background-color: transparent !important;
  background: none !important;
  box-shadow: none;
  padding: 0;
}

/* Elementor widget container overrides */
.elementor-widget-rp-booking-form .elementor-widget-container,
.elementor-widget-rp-user-bookings .elementor-widget-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Elementor widget wrapper overrides */
.elementor-widget-rp-booking-form,
.elementor-widget-rp-user-bookings {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Additional Elementor overrides for all possible containers */
.elementor-element.elementor-widget-rp-booking-form,
.elementor-element.elementor-widget-rp-user-bookings,
.elementor-widget-rp-booking-form > .elementor-widget-container,
.elementor-widget-rp-user-bookings > .elementor-widget-container {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Force removal of custom classes CSS variables that override backgrounds */
.elementor-widget-rp-booking-form .elementor-widget-container,
.elementor-widget-rp-user-bookings .elementor-widget-container {
  --primary-color: initial !important;
  --primary-variant: initial !important;
  --secondary-color: initial !important;
  --background-color: transparent !important;
  --surface-color: initial !important;
  --card-color: initial !important;
  --error-color: initial !important;
  --text-primary: initial !important;
  --text-secondary: initial !important;
  color: initial !important;
  background-color: transparent !important;
  background: transparent !important;
}

#rp-booking-calendar h2 {
  text-align: center;
  color: var(--primary-color);
  margin: 24px 0;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.25px;
}

#rp-booking-calendar h3 {
  color: var(--text-primary);
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 500;
}

#rp-booking-calendar .rp-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin: 8px 0 24px 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

/* Card Styles */
.rp-card {
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--elevation-1);
  margin-bottom: 24px;
  overflow: hidden;
  transition: var(--transition);
}

.rp-card:hover {
  box-shadow: var(--elevation-2);
}

.rp-card-header {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background-color: var(--card-color);
}

.rp-card-content {
  padding: 16px;
}

/* Filters */
.rp-booking-filters {
  display: flex;
  gap: 16px;
  padding: 0;
  background-color: transparent;
  margin-bottom: 16px;
}

.rp-date-selector,
.rp-players-selector {
  flex: 1;
}

.rp-booking-filters label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rp-booking-filters select {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 4px;
  background-color: var(--card-color);
  font-size: 16px;
  color: var(--text-primary);
  box-shadow: var(--elevation-1);
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="rgba(255,255,255,0.6)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

.rp-booking-filters select:hover {
  box-shadow: var(--elevation-2);
  background-color: var(--overlay-1);
}

.rp-booking-filters select:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-color);
}

/* Calendar */
.rp-calendar {
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  padding: 16px;
  margin-top: 8px;
  box-shadow: var(--elevation-1);
}

/* UI Datepicker Overrides for Dark Theme */
.ui-datepicker {
  width: 100% !important;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  border: none;
  box-shadow: none;
  background-color: transparent;
  color: var(--text-primary);
}

.ui-datepicker .ui-widget-header {
  background-color: var(--primary-color);
  color: #000;
  border: none;
  border-radius: var(--border-radius);
  padding: 12px;
}

.ui-datepicker .ui-datepicker-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: #000;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  top: 4px;
}

.ui-datepicker .ui-datepicker-prev {
  left: 4px;
}

.ui-datepicker .ui-datepicker-next {
  right: 4px;
}

.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23bb86fc" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
  margin-top: -8px;
  margin-left: -8px;
  width: 16px;
  height: 16px;
}

.ui-datepicker .ui-datepicker-next span {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23bb86fc" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>');
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
  background-color: rgba(0, 0, 0, 0.1);
  border: none;
  top: 4px;
}

.ui-datepicker .ui-datepicker-prev:hover {
  left: 4px;
}

.ui-datepicker .ui-datepicker-next:hover {
  right: 4px;
}

.ui-datepicker table {
  width: 100%;
  font-size: 14px;
  margin-top: 8px;
}

.ui-datepicker th {
  text-align: center;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 0;
  text-transform: uppercase;
  font-size: 12px;
}

.ui-datepicker td {
  padding: 2px;
}

.ui-datepicker td span,
.ui-datepicker td a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  text-align: center;
  line-height: 36px;
  text-decoration: none;
  margin: 0 auto;
  font-weight: 400;
  color: var(--text-primary);
  box-sizing: border-box;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
}

.ui-datepicker .ui-state-default {
  background: transparent;
  border: none;
}

.ui-datepicker .ui-state-hover {
  background-color: var(--overlay-1) !important;
  border: 1px solid var(--primary-color) !important;
}

.ui-datepicker .ui-state-active,
.ui-datepicker .ui-state-active:hover,
.ui-datepicker .ui-state-focus {
  background-color: var(--primary-color) !important;
  color: #000 !important;
  border: 1px solid var(--primary-color) !important;
  font-weight: 500 !important;
}

.ui-datepicker .ui-state-disabled {
  opacity: 0.38;
}

/* Styles spécifiques pour Chrome - améliorer la visibilité de la sélection */
@supports (-webkit-appearance: none) {
  .ui-datepicker .ui-state-active,
  .ui-datepicker .ui-state-active:hover,
  .ui-datepicker .ui-state-focus {
    background-color: var(--primary-color) !important;
    color: #000 !important;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.3) !important;
    font-weight: 700 !important;
  }
}

/* Masquer le texte sur mobile uniquement */
@media screen and (max-width: 768px) {
  .ui-datepicker .ui-datepicker-prev span,
  .ui-datepicker .ui-datepicker-next span {
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px !important;
    color: transparent !important;
    overflow: hidden !important;
  }
}

/* Custom classes for available/unavailable dates */
.ui-datepicker .date-available a {
  background-color: rgba(187, 134, 252, 0.15);
  color: var(--primary-color);
  font-weight: 500;
}

.ui-datepicker .date-available a:hover {
  background-color: rgba(187, 134, 252, 0.25);
}

.ui-datepicker .ui-datepicker-today a {
  position: relative;
}

.ui-datepicker .ui-datepicker-today a::after {
  content: '';
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--primary-color);
}

.rp-instructions {
  text-align: center;
  padding: 24px 16px;
  background-color: rgba(187, 134, 252, 0.08);
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 15px;
}

.rp-sessions-instructions {
  text-align: center;
  padding: 12px 16px;
  background-color: rgba(187, 134, 252, 0.15);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 500;
}

/* Sessions */
.rp-sessions-container {
  margin-top: 24px;
}

.rp-sessions-loading {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.rp-sessions-loading p {
  margin: 0;
}


.rp-sessions-list {
  margin-top: 8px;
}

/* Time Slots Grid */
.rp-simplified-sessions {
  margin-top: 16px;
}

.rp-sessions-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-align: center;
}

.rp-time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.rp-time-slot {
  background-color: var(--surface-color);
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  padding: 16px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--elevation-1);
  position: relative;
  overflow: hidden;
}

.rp-time-slot.available:hover {
  background-color: var(--surface-overlay-1);
  border-color: var(--primary-color);
  box-shadow: var(--elevation-2);
  transform: translateY(-2px);
}

.rp-time-slot.selected {
  background-color: var(--surface-overlay-3);
  border-color: var(--primary-color);
  box-shadow: var(--elevation-2);
}

.rp-time-slot.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-color);
}

.rp-time-slot.unavailable {
  background-color: var(--surface-overlay-1);
  opacity: 0.5;
  cursor: not-allowed;
}

.rp-time-slot-time {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.rp-time-slot-duration {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.rp-time-slot-price {
  font-size: 16px;
  font-weight: 500;
  color: var(--primary-color);
}

.rp-time-slot-unavailable {
  font-size: 14px;
  color: var(--error-color);
  font-style: italic;
}

.rp-session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--elevation-1);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.rp-session-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-color);
  opacity: 0;
  transition: var(--transition);
}

.rp-session-item:hover {
  box-shadow: var(--elevation-2);
  background-color: var(--surface-overlay-1);
}

.rp-session-item:hover::before {
  opacity: 1;
}

.rp-session-item.selected {
  box-shadow: var(--elevation-2);
  border-left: none;
  background-color: var(--surface-overlay-3);
}

.rp-session-item.selected::before {
  opacity: 1;
  width: 100%;
  background-color: var(--primary-color);
  opacity: 0.15;
}

.rp-session-time {
  font-weight: 500;
  font-size: 16px;
  color: var(--text-primary);
  width: 35%;
  position: relative;
  z-index: 1;
}

.rp-session-duration-hint {
  font-size: 12px;
  color: var(--primary-color);
  font-weight: normal;
  font-style: italic;
  margin-left: 8px;
  opacity: 0.8;
}

.rp-session-details {
  width: 40%;
  position: relative;
  z-index: 1;
}

.rp-session-duration {
  margin-bottom: 4px;
  color: var(--text-secondary);
  font-size: 14px;
}

.rp-session-price {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 16px;
}

/* Durée de session */
.rp-session-durations {
  margin-bottom: 12px;
}

.rp-durations-label, .rp-start-time-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

.rp-durations-selector, .rp-start-time-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  justify-content: flex-start;
}

.rp-session-start-time-selector {
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

/* Style commun pour les boutons de durée et heures de début */
.rp-duration-button, .rp-start-time-button {
  background-color: var(--surface-color, #1e1e1e);
  border: 2px solid transparent;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  color: var(--text-primary, rgba(255, 255, 255, 0.87));
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  position: relative;
  text-align: center;
  transition: all 0.2s ease;
  min-width: 65px;
}

.rp-duration-button:hover, .rp-start-time-button:hover {
  background-color: var(--surface-overlay-1, rgba(255, 255, 255, 0.05));
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.rp-duration-button.selected, .rp-start-time-button.selected {
  background-color: var(--primary-color, #BB86FC);
  border-color: var(--primary-color, #BB86FC);
  color: #000;
}

/* Styles spécifiques aux boutons de durée */
.rp-duration-button-value {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 4px;
}

.rp-duration-button-price {
  font-size: 12px;
  opacity: 0.9;
  position: relative;
}

.rp-duration-button-price::after {
  content: '/pers.';
  margin-left: 2px;
  font-size: 10px;
  opacity: 0.8;
}

/* Styles spécifiques aux boutons d'heure de début */
.rp-start-time-button {
  min-width: 60px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  margin: 3px;
}

.rp-start-time-message {
  color: var(--text-secondary);
  font-style: italic;
  padding: 8px 0;
  text-align: center;
  width: 100%;
}

/* Animation lors du clic */
.rp-duration-button:active, .rp-start-time-button:active {
  transform: scale(0.95);
}

/* Pour la rétrocompatibilité */
.rp-duration-option {
  padding: 6px 12px;
  border-radius: 16px;
  background-color: var(--card-color);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rp-duration-option:hover {
  background-color: var(--overlay-2);
}

.rp-duration-option.selected {
  background-color: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
}

.rp-duration-error {
  padding: 6px 12px;
  color: var(--error-color, #CF6679);
  font-size: 14px;
}

.rp-session-select {
  background-color: var(--primary-color);
  color: #000;
  padding: 10px 16px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: var(--transition);
  position: relative;
  z-index: 1;
  box-shadow: var(--elevation-1);
  text-align: center;
  cursor: pointer;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(187, 134, 252, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(187, 134, 252, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(187, 134, 252, 0);
  }
}

.rp-session-item:hover .rp-session-select {
  background-color: var(--primary-variant);
  color: white;
  box-shadow: var(--elevation-2);
  animation: none;
}

.rp-session-item.selected .rp-session-select {
  background-color: var(--secondary-color);
  color: #000;
  animation: none;
}

.rp-no-sessions,
.rp-error {
  text-align: center;
  padding: 32px 16px;
  background-color: var(--surface-overlay-1);
  border-radius: var(--border-radius);
  box-shadow: var(--elevation-1);
  color: var(--text-secondary);
  font-size: 15px;
}

.rp-error {
  color: var(--error-color);
  background-color: rgba(207, 102, 121, 0.1);
}

/* Booking Form */
.rp-booking-form-container {
  margin-top: 32px;
  padding: 0;
  background-color: transparent;
  border-radius: var(--border-radius);
}

.rp-booking-summary {
  margin-bottom: 24px;
  padding: 16px 24px;
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--elevation-1);
  position: relative;
  overflow: hidden;
}

.rp-booking-summary::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-color);
}

.rp-booking-summary p {
  margin: 12px 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.rp-booking-summary p strong {
  display: inline-block;
  width: 180px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
}

.rp-login-message {
  text-align: center;
  padding: 24px;
  background-color: rgba(255, 214, 102, 0.1);
  border-radius: var(--border-radius);
  margin-bottom: 24px;
  color: var(--text-primary);
  box-shadow: var(--elevation-1);
}

.rp-login-message p {
  margin: 8px 0;
}

/* Guest Form */
.rp-guest-form {
  margin-bottom: 24px;
  padding: 20px;
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--elevation-1);
}

.rp-guest-form h4 {
  color: var(--text-primary);
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 500;
}

.rp-form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.rp-form-field {
  flex: 1;
}

.rp-form-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.rp-form-field input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius);
  background-color: var(--card-color);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
  box-sizing: border-box;
}

.rp-form-field input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.2);
}

.rp-form-field input:invalid {
  border-color: var(--error-color);
}

.rp-login-option {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.rp-login-option p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.rp-login-option a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.rp-login-option a:hover {
  text-decoration: underline;
}

.rp-submit-container {
  text-align: center;
  margin-top: 24px;
}

button.rp-submit-booking {
  padding: 12px 24px;
  background-color: var(--primary-color);
  color: #000;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.25px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--elevation-1);
}

button.rp-submit-booking:hover {
  background-color: var(--primary-variant);
  color: white;
  box-shadow: var(--elevation-2);
}

button.rp-submit-booking:disabled {
  background-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.38);
  cursor: not-allowed;
  box-shadow: none;
}

/* Buttons */
.button {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 4px;
  background-color: var(--primary-color);
  color: #000;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: var(--transition);
  box-shadow: var(--elevation-1);
}

.button:hover {
  background-color: var(--primary-variant);
  color: white;
  box-shadow: var(--elevation-2);
  text-decoration: none;
}

/* Player Selector */
.rp-player-selector-title {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.rp-player-selector-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.rp-player-button {
  background-color: var(--surface-color);
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  padding: 16px 12px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--elevation-1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.rp-player-button:hover {
  background-color: var(--surface-overlay-1);
  border-color: var(--primary-color);
  box-shadow: var(--elevation-2);
  transform: translateY(-2px);
}

.rp-player-button.selected {
  background-color: var(--surface-overlay-3);
  border-color: var(--primary-color);
  box-shadow: var(--elevation-2);
}

.rp-player-button.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-color);
}

.rp-player-button-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 4px;
}

.rp-player-button-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.rp-player-button-price {
  font-size: 11px;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 2px;
}

.rp-player-button-total {
  font-size: 13px;
  color: var(--primary-color);
  font-weight: 600;
}

/* Disposition 3+2: les boutons 4 et 5 (indices 3 et 4) passent à la ligne suivante */
.rp-player-button:nth-child(4) {
  grid-column: 1 / 2;
}

.rp-player-button:nth-child(5) {
  grid-column: 2 / 4;
}

/* Confirmation */
.rp-booking-confirmation {
  margin-top: 32px;
  padding: 0;
  border-radius: 0;
  text-align: center;
}

.rp-booking-success {
  background-color: rgba(52, 199, 89, 0.1);
  box-shadow: var(--elevation-1);
  padding: 32px 24px;
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
}

.rp-booking-success::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background-color: #34c759;
}

.rp-booking-success h3 {
  color: #34c759;
  margin-bottom: 16px;
}

.rp-booking-error {
  background-color: rgba(207, 102, 121, 0.1);
  box-shadow: var(--elevation-1);
  padding: 32px 24px;
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
}

.rp-booking-error::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background-color: var(--error-color);
}

.rp-booking-error h3 {
  color: var(--error-color);
  margin-bottom: 16px;
}

.rp-booking-confirmation .button {
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .rp-booking-filters {
    flex-direction: column;
  }
  
  .rp-date-selector,
  .rp-players-selector {
    width: 100%;
    margin-bottom: 16px;
  }
  
  .rp-session-item {
    flex-direction: column;
    text-align: center;
    padding: 16px 8px;
  }
  
  .rp-session-time,
  .rp-session-details {
    width: 100%;
    margin-bottom: 16px;
    text-align: center;
  }

  .rp-session-select {
    width: 100%;
    text-align: center;
  }

  .rp-durations-selector {
    justify-content: center;
  }

  .rp-durations-label {
    text-align: center;
  }
  
  .rp-duration-button {
    padding: 6px 10px;
    min-width: 60px;
  }
  
  .rp-duration-button-value {
    font-size: 14px;
  }
  
  .rp-duration-button-price {
    font-size: 10px;
  }
  
  .rp-duration-button-price::after {
    font-size: 8px;
  }

  .ui-datepicker-header {
    font-size: 14px;
    padding: 8px;
  }

  .ui-datepicker td span, 
  .ui-datepicker td a {
    width: 32px;
    height: 32px;
    line-height: 32px;
  }
  
  .rp-booking-summary p {
    flex-direction: column;
    align-items: flex-start;
    margin: 16px 0;
  }
  .rp-booking-summary p strong {
    margin-bottom: 4px;
  }
  
  .rp-form-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .rp-time-slots-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .rp-time-slot {
    padding: 12px;
  }
  
  .rp-time-slot-time {
    font-size: 16px;
  }
  
  /* Player selector responsive */
  .rp-player-selector-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .rp-player-button {
    padding: 12px 8px;
    min-height: 70px;
  }
  
  .rp-player-button-value {
    font-size: 20px;
  }
  
  .rp-player-button-label {
    font-size: 11px;
  }
  
  .rp-player-button-price {
    font-size: 10px;
  }
  
  .rp-player-button-total {
    font-size: 12px;
  }
  
  /* Annuler la disposition 3+2 sur mobile */
  .rp-player-button:nth-child(4),
  .rp-player-button:nth-child(5) {
    grid-column: auto;
  }
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.rp-session-item {
  animation: fadeIn 0.3s ease-out;
}

.rp-session-item:nth-child(2) { animation-delay: 0.05s; }
.rp-session-item:nth-child(3) { animation-delay: 0.1s; }
.rp-session-item:nth-child(4) { animation-delay: 0.15s; }
.rp-session-item:nth-child(5) { animation-delay: 0.2s; }

/* Icons */
.rp-icon-svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* User Bookings Widget */
#rp-user-bookings-calendar {
  font-family: 'Roboto', sans-serif;
  max-width: 960px;
  margin: 0 auto;
  background-color: var(--background-color);
  border-radius: 8px;
  overflow: hidden;
  color: var(--text-primary);
  padding: 16px 24px 32px;
  box-shadow: var(--elevation-1);
}

#rp-user-bookings-calendar h2 {
  text-align: center;
  color: var(--primary-color);
  margin: 24px 0;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.25px;
}

/* Onglets du widget */
.rp-user-bookings-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 24px;
}

.rp-user-bookings-tab {
  padding: 12px 24px;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  position: relative;
}

.rp-user-bookings-tab:hover {
  color: var(--primary-color);
}

.rp-user-bookings-tab.rp-tab-active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* Contenu des onglets */
.rp-user-bookings-content {
  position: relative;
}

.rp-user-bookings-list {
  display: none;
}

.rp-user-bookings-list.rp-tab-active {
  display: block;
}

/* Cartes de réservation */
.rp-user-bookings-card-date {
  font-weight: 500;
  color: var(--text-primary);
}

.rp-user-bookings-card-time {
  color: var(--secondary-color);
  font-weight: 500;
}

.rp-user-bookings-card-status {
  font-weight: 500;
}

.rp-user-bookings-cancelled {
  color: var(--error-color);
}

.rp-user-bookings-past {
  color: var(--text-secondary);
}

.rp-user-bookings-details {
  margin-bottom: 16px;
}

.rp-user-bookings-detail {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rp-user-bookings-detail span:first-child {
  color: var(--text-secondary);
}

.rp-user-bookings-detail span:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

.rp-user-bookings-actions {
  text-align: right;
  margin-top: 16px;
}

.rp-user-bookings-notice {
  text-align: right;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 16px;
}

/* Modal pour l'annulation */
.rp-user-bookings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.rp-user-bookings-modal .rp-card {
  width: 90%;
  max-width: 500px;
  margin: 0;
}

.rp-user-bookings-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 24px;
}

/* Dark theme adjustments for jQuery UI */
.ui-widget-content {
  background: transparent;
  border: none;
  color: var(--text-primary);
}

.ui-widget-header {
  border: none;
}

.ui-widget.ui-widget-content {
  border: none;
}

.ui-state-default, 
.ui-widget-content .ui-state-default {
  border: none;
  background: transparent;
  color: var(--text-primary);
}

.ui-state-highlight, 
.ui-widget-content .ui-state-highlight {
  background-color: rgba(187, 134, 252, 0.15);
  color: var(--primary-color);
}