/**
 * Smart Schedular Public CSS
 */

/* Main container */
.smart-schedular-container {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  display: flex;
  flex-direction: row;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 1000px;
  margin: 0 auto;
  background-color: #fff;
}

/* Left panel - Service info */
.smart-schedular-service-panel {
  width: 35%;
  padding: 2rem;
  background-color: #1a73e8;
  color: white;
  display: flex;
  flex-direction: column;
}

.smart-schedular-service-logo {
  width: 60px;
  height: 60px;
  border-radius: 5px;
  margin-bottom: 1.5rem;
  background-color: #fff;
  padding: 5px;
}

.smart-schedular-service-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.smart-schedular-service-duration {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.smart-schedular-service-duration svg {
  margin-right: 0.5rem;
  width: 16px;
  height: 16px;
}

.smart-schedular-service-description {
  margin-top: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Right panel - Calendar */
.smart-schedular-calendar-panel {
  width: 65%;
  padding: 2rem;
  background-color: #fff;
}

.smart-schedular-calendar-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
  color: #333;
}

/* Calendar header */
.smart-schedular-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.smart-schedular-month-title {
  font-size: 1.2rem;
  font-weight: 500;
  color: #333;
}

.smart-schedular-nav-buttons {
  display: flex;
}

.smart-schedular-nav-button {
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f1f3f4;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #444;
  transition: background-color 0.2s;
  margin-left: 0.5rem;
}

.smart-schedular-nav-button:hover {
  background-color: #e0e0e0;
}

.smart-schedular-nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Calendar grid */
.smart-schedular-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 2rem;
}

.smart-schedular-weekday {
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.smart-schedular-day {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  position: relative;
}

.smart-schedular-day.empty {
  cursor: default;
}

.smart-schedular-day.past,
.smart-schedular-day.unavailable {
  color: #ccc;
  cursor: not-allowed;
}

.smart-schedular-day.available {
  color: #333;
  background-color: #f8f9fa;
}

.smart-schedular-day.selected {
  background-color: #1a73e8;
  color: white;
  font-weight: 600;
}

.smart-schedular-day.available:hover:not(.selected) {
  background-color: #e8f0fe;
}

.smart-schedular-day.today {
  font-weight: 600;
}

.smart-schedular-day.today::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #1a73e8;
}

/* Time slots */
.smart-schedular-selected-date {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #333;
}

.smart-schedular-time-slots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 1.5rem;
}

.smart-schedular-time-slot {
  padding: 12px;
  text-align: center;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.smart-schedular-time-slot:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.smart-schedular-time-slot.selected {
  border-color: #1a73e8;
  background-color: #1a73e8;
  color: white;
  font-weight: 500;
}

/* Timezone selector */
.smart-schedular-timezone-selector {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.smart-schedular-timezone-icon {
  margin-right: 10px;
}

.smart-schedular-timezone-selector select {
  border: none;
  background: transparent;
  font-size: 0.9rem;
  color: #1a73e8;
  cursor: pointer;
}

/* Booking form */
.smart-schedular-booking-form {
  display: none;
}

.smart-schedular-booking-form.active {
  display: block;
}

.smart-schedular-form-group {
  margin-bottom: 1rem;
}

.smart-schedular-form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
  color: #555;
}

.smart-schedular-form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.95rem;
}

.smart-schedular-button {
  background-color: #1a73e8;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.smart-schedular-button:hover {
  background-color: #1765cc;
}

.smart-schedular-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.smart-schedular-back-button {
  background-color: transparent;
  color: #1a73e8;
  border: 1px solid #1a73e8;
  border-radius: 4px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 10px;
}

.smart-schedular-back-button:hover {
  background-color: #e8f0fe;
}

/* Loader */
.smart-schedular-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.smart-schedular-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #1a73e8;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Success/Error messages */
.smart-schedular-message {
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  display: none;
}

.smart-schedular-message.active {
  display: block;
}

.smart-schedular-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.smart-schedular-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Media queries */
@media (max-width: 768px) {
  .smart-schedular-container {
    flex-direction: column;
  }

  .smart-schedular-service-panel,
  .smart-schedular-calendar-panel {
    width: 100%;
  }

  .smart-schedular-time-slots {
    grid-template-columns: 1fr;
  }
}

/* Add timezone display styling */
.smart-schedular-timezone-info {
  background-color: #f7f9ff;
  padding: 10px 15px;
  margin: 10px 0;
  border-left: 4px solid #4a90e2;
  border-radius: 3px;
  font-size: 0.9em;
}

.smart-schedular-timezone-info p {
  margin: 5px 0;
}

/* Style for time slots with day boundary */
.smart-schedular-time-slot.day-boundary {
  background-color: #fff8e6;
  border: 1px solid #ffc107;
  position: relative;
}

.smart-schedular-time-slot .day-change {
  display: inline-block;
  font-size: 0.7em;
  background-color: #ffc107;
  color: #000;
  padding: 2px 4px;
  border-radius: 3px;
  margin-left: 5px;
  vertical-align: middle;
}

.smart-schedular-time-note {
  background-color: #fff8e6;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 3px;
  border-left: 3px solid #ffc107;
  font-size: 0.9em;
}

/* Style for the timezone note in confirmation */
.smart-schedular-timezone-note {
  background-color: #f5f5f5;
  padding: 6px 10px;
  border-radius: 4px;
  margin-top: 5px;
  border-left: 3px solid #4a90e2;
}

.smart-schedular-summary-user-timezone,
.smart-schedular-summary-service-time {
  font-size: 0.9em;
  color: #666;
}

.appointment-summary p {
  margin-bottom: 8px;
}

/* Time group styles */
.smart-schedular-time-group {
  margin-bottom: 0px;
}

.smart-schedular-time-group-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #666;
}

.smart-schedular-time-group-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Day change indicators */
.smart-schedular-time-slot.day-changed {
  position: relative;
  border-color: #f59e0b;
}

.smart-schedular-time-slot .day-change-label {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #f59e0b;
  color: white;
  font-size: 9px;
  padding: 2px 4px;
  border-radius: 10px;
  font-weight: bold;
}

/* Loading states */
.smart-schedular-calendar-grid.loading {
  opacity: 0.6;
  position: relative;
}

.smart-schedular-calendar-grid.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #1a73e8;
  animation: spinner 1s linear infinite;
}

@keyframes spinner {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Message styles */
.smart-schedular-message {
  margin: 10px 0;
  padding: 10px;
  border-radius: 4px;
  font-size: 14px;
}

.smart-schedular-message.error {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.smart-schedular-message.warning {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.smart-schedular-message.info {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
