/* MSB Booking Frontend Styles */

.msb-booking-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Category Tabs */
.msb-category-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
  justify-content: center;
}

.msb-tab-btn {
  /* padding: 12px 24px;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0; */
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500 !important;
  /* color: #666; */
  transition: all 0.3s ease;
  position: relative;
  bottom: -2px;
}

.msb-tab-btn:hover {
  background: #e8e8e8;
  color: #333;
}

.msb-tab-btn.active {
  background: #774335;
  border: 2px solid #b26752;
  color: #ffffff;
  font-weight: 500 !important;
}

/* Services Grid */
.msb-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.msb-service-card {
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.msb-service-card:hover {
  border-color: #b26752;
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.1);
  transform: translateY(-2px);
}

.msb-service-card.selected {
  border-color: #b26752;
  background: #f3f3f3;
  box-shadow: 0 4px 16px rgba(83, 83, 83, 0.2);
}

.msb-service-card.selected::before {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 12px;
  background: #b26752;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

.msb-service-name {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 12px;
}

.msb-service-description {
  color: #000000;
  line-height: 1.6;
  margin-bottom: 16px;
  min-height: 60px;
}

.msb-service-description p {
  margin: 0 0 8px 0;
}

.msb-service-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.msb-service-price {
  font-size: 24px;
  font-weight: 700;
  color: #000000;
}

.msb-provider-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.msb-provider-badge.doctor {
  background: #e7e7e7;
  color: black;
}

.msb-provider-badge.laser {
  background: #e7e7e7;
  color: black;
}

.msb-seleziona-btn {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.3s ease;
  display: none;
}

.msb-seleziona-btn:hover {
  background: #005a87;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.msb-service-card.selected .msb-seleziona-btn {
  display: none;
  background: #28a745;
}

.msb-service-card.selected .msb-seleziona-btn:hover {
  background: #218838;
}

/* Avanti Button */
.msb-avanti-container {
  text-align: center;
  margin: 30px 0;
}

.msb-avanti-btn {
  padding: 16px 48px;
  color: #fff;
  border: none;
  font-size: 18px;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(138, 138, 138, 0.3);
}

.msb-avanti-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(138, 138, 138, 0.3);
}

/* Date & Time Section */
.msb-datetime-section {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 30px;
  margin-top: 30px;
  position: relative;
}

.msb-back-button-container {
  margin-bottom: 20px;
  text-align: left;
}

.msb-back-btn {
  padding: 10px 20px;
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.3s ease;
}

.msb-back-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
}

.msb-section-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin-bottom: 24px;
  text-align: center;
}

.msb-calendar-container {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}

.msb-date-input {
  display: none;
}

/* Flatpickr customization */
.flatpickr-calendar {
  font-family: inherit;
  width: 100% !important;
  max-width: 100% !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

.flatpickr-calendar.animate.open {
  box-shadow: none !important;
}

.flatpickr-months {
  background: transparent !important;
}
.flatpickr-months .flatpickr-month {
  height: 60px !important;
}
.flatpickr-month {
  background: transparent !important;
}

.flatpickr-weekdays {
  background: transparent !important;
}

.flatpickr-days {
  background: transparent !important;
  width: 100% !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: #b26752;
  border-color: #b26752;
}

.dayContainer,
.flatpickr-rContainer {
  width: 100% !important;
  max-width: none !important;
  min-width: auto !important;
}
.flatpickr-day {
  max-width: none !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: rgb(57 57 57 / 31%);
}

/* Time Slots */
.msb-time-title {
  font-size: 20px;
  font-weight: 500 !important;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

.msb-time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.msb-time-slot {
  padding: 10px 16px !important;
  background: #fff;
  border: none;
  border-radius: 8px;
  text-align: center;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.msb-time-slot:hover {
  border-color: #b26752;
  background: #f0f8ff;
  transform: translateY(-2px);
}

.msb-time-slot.selected {
  color: #fff;
  border-color: #b26752;
}

.msb-time-slot.disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  opacity: 0.5;
}

/* Booking Actions */
.msb-booking-actions {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 30px;
  margin-top: 30px;
}

.msb-action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.msb-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #fff;
}

.msb-action-btn svg {
  flex-shrink: 0;
}

.msb-whatsapp-btn {
}

.msb-whatsapp-btn:hover {
  transform: translateY(-2px);
}

.msb-email-btn {
}

.msb-email-btn:hover {
  transform: translateY(-2px);
}

.msb-form-btn {
}

.msb-form-btn:hover {
  transform: translateY(-2px);
}

/* Booking Form */
.msb-booking-form-container {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 30px;
  margin-top: 30px;
}

.msb-booking-form {
  max-width: 600px;
  margin: 0 auto;
}

.msb-form-group {
  margin-bottom: 20px;
}

.msb-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500 !important;
  color: #333;
  font-size: 14px;
}

.msb-form-group .required {
  color: #dc3545;
}

.msb-form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.msb-form-input:focus {
  outline: none;
  border-color: #6e6e6e;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.msb-form-messages {
  margin-bottom: 20px;
  min-height: 30px;
}

.msb-form-success {
  padding: 12px 16px;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  font-size: 14px;
}

.msb-form-error {
  padding: 12px 16px;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  font-size: 14px;
}

.msb-form-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.msb-form-submit-btn {
  padding: 14px 32px;
  color: #fff;
  border: none !important;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.3s ease;
}

.msb-form-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.msb-form-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.msb-form-cancel-btn {
  padding: 14px 32px;
  background: #6c757d;
  color: #fff;
  border: none !important;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500 !important;
  cursor: pointer;
  transition: all 0.3s ease;
}

.msb-form-cancel-btn:hover {
  transform: translateY(-1px);
}

/* Summary */
.msb-summary {
  margin-top: 30px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  min-height: 50px;
  display: none; /* Hidden by default */
}

.msb-summary p {
  margin: 0;
}

/* Loading State */
.msb-loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.msb-loading::after {
  content: "...";
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60%,
  100% {
    content: "...";
  }
}

/* Empty State */
.msb-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
  .msb-category-tabs {
    flex-wrap: wrap;
  }

  .msb-tab-btn {
    flex: 1;
    min-width: 200px;
    font-size: 16px !important;
    padding: 10px 16px !important;
  }
  .msb-avanti-btn,
  .msb-back-btn {
    font-size: 15px !important;
    padding: 10px 16px !important;
  }

  .msb-services-grid {
    grid-template-columns: 1fr;
  }

  .msb-time-slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }


  .msb-form-actions {
    flex-direction: column;
  }

  .msb-form-submit-btn,
  .msb-form-cancel-btn {
    width: 100%;
  }
  .msb-section-title {
    font-size: 2rem !important;
  }
}
