/* Prevent scroll behind modal */
body.koopo-appt--modal-open {
  overflow: hidden;
}

.koopo-appt .koopo-appt__open {
  cursor: pointer;
  border-radius:12px;
}
.koopo-appt .koopo-appt__open:hover {
  box-shadow: 1px 4px 16px 1px #d9d9d9ee;
  border-radius:12px;
}

/* Overlay */
.koopo-appt__overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  overflow-y: auto;
}

.koopo-appt__overlay.is-open {
  display: flex;
}

/* Modal */
.koopo-appt__modal {
  width: 100%;
  max-width: 700px;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  position: relative;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease;
  margin: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.koopo-appt__overlay.is-open .koopo-appt__modal {
  transform: translateY(0);
  opacity: 1;
}

.koopo-appt__close {
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 2rem !important;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #666;
  z-index: 10;
  line-height: 1;
  padding: 4px 8px;
}

.koopo-appt__close:hover {
  color: #000;
}

/* Header */
.koopo-appt__header {
  margin-bottom: 20px;
}

.koopo-appt__title {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 700;
  color: #333;
  letter-spacing: -0.5px;
}

/* Step indicators */
.koopo-appt__steps {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.koopo-appt__step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  opacity: 0.4;
  transition: opacity 200ms ease;
}

.koopo-appt__step--active,
.koopo-appt__step--completed {
  opacity: 1;
}

.koopo-appt__step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #666;
  font-weight: 600;
  font-size: 15px;
}

.koopo-appt__step--active .koopo-appt__step-num {
  background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.koopo-appt__step--completed .koopo-appt__step-num {
  background: #28a745;
  color: #fff;
}

.koopo-appt__step-label {
  font-size: 15px;
  font-weight: 500;
}

/* Body */
.koopo-appt__body {
  margin-top: 20px;
}

/* Panel system */
.koopo-appt__panel {
  display: none;
}

.koopo-appt__panel--active {
  display: block;
}

/* Form elements */
.koopo-appt__label {
  display: block;
  font-weight: 600;
  font-size: 14px;
}

.koopo-appt__label--full {
  width: 100%;
}

.koopo-appt__field {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
  transition: border-color 200ms ease;
}

.koopo-appt__field:focus {
  outline: none;
  border-color: #FFA500;
  box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
}

textarea.koopo-appt__field {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.koopo-appt__form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

@media (max-width: 600px) {
  .koopo-appt__form-grid {
    grid-template-columns: 1fr;
  }
}

/* Checkbox */
.koopo-appt__booking-for {
  margin: 20px 0;
}

.koopo-appt__checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.koopo-appt__checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Calendar Section */
.koopo-appt__calendar-section {
  margin: 20px 0;
}

.koopo-appt__calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.koopo-appt__month-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  flex: 1;
}

.koopo-appt__month-nav {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
}

.koopo-appt__month-nav:hover {
  background: #333;
  border-color: #bbb;
}

/* Calendar Grid */
.koopo-appt__calendar-grid {
  width: 100%;
}

.koopo-appt__calendar-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.koopo-appt__calendar-header-row {
  margin-bottom: 8px;
}

.koopo-appt__calendar-dayname {
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #666;
}

.koopo-appt__calendar-day {
  aspect-ratio: 1;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #333;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
}

.koopo-appt__calendar-day:not(.koopo-appt__calendar-day--past):hover {
  background: #000000;
  border-color: #bbb;
  color:#fff;
}

.koopo-appt__calendar-day--today {
  background: #21c24e;
  border-color: #39ee1f;
  font-weight: 700;
}

.koopo-appt__calendar-day--selected {
  background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
  border-color: #FFA500;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.koopo-appt__calendar-day--past {
  opacity: 0.3;
  cursor: not-allowed;
}

.koopo-appt__calendar-day--empty {
  border: none;
  background: transparent;
  cursor: default;
}

/* Time slots */
.koopo-appt__slots {
  margin-top: 12px;
}

.koopo-appt__slots--grouped {
  margin-top: 12px;
}

.koopo-appt__slotgroup {
  margin-bottom: 16px;
}

.koopo-appt__slotgroup-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  color: #333;
}

.koopo-appt__slotgroup-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.koopo-appt__slotgroup-grid button.koopo-appt__slot {
  padding: 5px 8px;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 200ms ease;
  color:#333;

}

.koopo-appt__slot:hover {
  background: #f7f7f7;
  border-color: #bbb;
}

.koopo-appt__slot.is-selected {
  background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
  border-color: #FFA500;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.koopo-appt__slots-empty {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  background: #f7f7f7;
  color: #666;
  text-align: center;
  font-size: 14px;
}

/* Summary */
.koopo-appt__summary {
  margin: 20px 0;
  padding: 16px;
  border-radius: 12px;
  background: #000;
  font-size: 14px;
  line-height: 1.8;
  color:#fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.koopo-appt__summary--review {
  background: #000;
  border: 2px solid #FFA500;
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.1);
}

.koopo-appt__summary h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
}

.koopo-appt__summary > div {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
}

.koopo-appt__summary strong {
  font-weight: 600;
}

/* Buttons */
.koopo-appt__panel button.koopo-appt__submit,
.koopo-appt__panel button.koopo-appt__next-step {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 200ms ease;
  margin-top: 12px;
  box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
}

.koopo-appt__submit:hover:not(:disabled),
.koopo-appt__next-step:hover:not(:disabled) {
  background: linear-gradient(135deg, #FF8C00 0%, #FF7700 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 165, 0, 0.4);
}

.koopo-appt__submit:disabled,
.koopo-appt__next-step:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.koopo-appt__actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.koopo-appt__actions button.koopo-appt__prev-step {
  flex: 1;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 200ms ease;
}

.koopo-appt__actions button .koopo-appt__prev-step:hover {
  background: #050505;
  border-color: #bbb;
  color:#fff;
}

.koopo-appt__actions .koopo-appt__submit {
  flex: 2;
  margin-top: 0;
}

/* Notices */
.koopo-appt__notice {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
}

.koopo-appt__notice--hidden {
  display: none;
}

.koopo-appt__notice--error {
  background: #ffecec;
  border: 1px solid #ffbdbd;
  color: #c00;
}

.koopo-appt__notice--success {
  background: #eaffea;
  border: 1px solid #bff0bf;
  color: #0a0;
}

/* Loading */
.koopo-appt__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  font-weight: 600;
  font-size: 14px;
  color: #666;
}

.koopo-appt__loading--hidden {
  display: none;
}

.koopo-appt__loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #e8e8e8;
  border-top-color: #FFA500;
  border-radius: 50%;
  animation: koopo-spin 1s linear infinite;
}

/* Loading Spinner */
.koopo-appt__spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  min-height: 200px;
}

.koopo-appt__spinner-circle {
  width: 48px;
  height: 48px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #FFA500;
  border-radius: 50%;
  animation: koopo-spin 1s linear infinite;
}

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

.koopo-appt__spinner-text {
  margin-top: 16px;
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* Hold note */
.koopo-appt__hold-note {
  margin: 16px 0;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #666;
  background: #FFF8E7;
  border-radius: 10px;
  border-left: 4px solid #FFA500;
}

/* Responsive adjustments */
@media (max-width: 700px) {
  .koopo-appt__modal {
    max-width: 100%;
    padding: 20px 16px;
  }

  .koopo-appt__title {
    font-size: 20px;
  }

  .koopo-appt__step-label {
    display: none;
  }

  .koopo-appt__calendar-day {
    font-size: 13px;
    padding: 6px 2px;
  }

  .koopo-appt__actions {
    flex-direction: column;
  }

  .koopo-appt__actions .koopo-appt__submit {
    order: -1;
  }
}
.koopo-appt__calendar-section {
    border-radius: 12px;
    box-shadow: 1px 4px 16px 1px #d9d9d9ee;
    padding: 15px;
    max-height: 375px;
    background: #fefdfa;
}

/* Service Cards */
.koopo-appt__services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.koopo-appt__service-card {
  background: #fff;
  border: 2px solid #e5e5e5;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 200ms ease;
  position: relative;
}

.koopo-appt__service-card:hover {
  border-color: #FFA500;
  box-shadow: 0 4px 12px rgba(255, 165, 0, 0.15);
  transform: translateY(-2px);
}

.koopo-appt__service-card--selected {
  border-color: #FFA500;
  background: linear-gradient(135deg, #FFF8E7 0%, #FFEDD5 100%);
  box-shadow: 0 4px 16px rgba(255, 165, 0, 0.2);
}

.koopo-appt__service-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.koopo-appt__service-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #333;
  flex: 1;
}

.koopo-appt__service-card-price {
  font-size: 20px;
  font-weight: 700;
  color: #FFA500;
  margin-left: 12px;
}

.koopo-appt__service-card-desc {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.koopo-appt__service-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e5e5;
}

.koopo-appt__service-card-duration {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #666;
}

.koopo-appt__service-card-duration svg {
  color: #999;
}

.koopo-appt__service-card-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: 2px solid #FFA500;
  background: #fff;
  color: #FFA500;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}

.koopo-appt__service-card-btn:hover {
  background: #FFA500;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.koopo-appt__service-card--selected .koopo-appt__service-card-btn {
  background: #FFA500;
  color: #fff;
}

.koopo-appt__addons {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fafafa;
}
.koopo-appt__addons--hidden {
  display: none;
}

.koopo-appt__addons h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
}

.koopo-appt__addons-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.koopo-appt__addon-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px dashed #dcdcdc;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color:#333;
}

.koopo-appt__addon-btn .koopo-appt__addon-plus {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #1f2d1f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #1f2d1f;
}

.koopo-appt__addons-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.koopo-appt__addon-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  background: #21d630;
  font-size: 16px;
  color:#fff;
  border:solid 1px #333;
}

.koopo-appt__addon-chip button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  padding: 3px;
}
@media (max-width: 600px) {
  .koopo-appt__services-grid {
    grid-template-columns: 1fr;
  }
}
