/* --- FUNDAMENTY I KONSTRUKCJA --- */
.pl-booking-ui,
.pl-link-generator-ui {
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  color: #333;
  line-height: 1.5;
}

/* --- PASEK POSTĘPU --- */
.pl-progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
  padding: 0 40px;
}

.pl-progress-bar::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 80px;
  right: 80px;
  height: 2px;
  background: #f1f5f9;
  z-index: 1;
}

.pl-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.pl-step span {
  width: 40px;
  height: 40px;
  background: #fff;
  border: 2px solid #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-weight: bold;
  color: #cbd5e1;
  transition: all 0.3s ease;
}

.pl-step label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 600;
}

.pl-step.active span {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.pl-step.active label {
  color: #1e293b;
  font-weight: 600;
}

.pl-step.completed span {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
  font-size: 0;
}

.pl-step.completed span::after {
  content: "✓";
  font-size: 16px;
}

/* --- ETAPY FORMULARZA --- */
.pl-booking-step {
  display: none;
}

.pl-booking-step.active {
  display: block;
}

.pl-step-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 25px;
  color: #1e293b;
}

.pl-step-nav {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.pl-back-btn {
  background: #f1f5f9;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s;
}

.pl-back-btn:hover {
  background: #e2e8f0;
}

/* PODPOWIEDŹ KALENDARZA */
.pl-calendar-hint {
  text-align: center;
  font-size: 14px;
  color: #64748b;
  margin: -10px auto 25px auto;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  max-width: 420px;
  line-height: 1.4;
  border: 1px solid #f1f5f9;
}

.pl-calendar-hint strong {
  color: #166534;
}

/* --- KROK 1: KARTY USŁUG --- */
.pl-service-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.pl-service-card-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pl-service-card-item:hover {
  border-color: #3498db;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
  transform: translateY(-4px);
}

.pl-service-card-item.active {
  border-color: #3498db;
  background: #f0f9ff;
}

.pl-service-card-item h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.4;
  color: #1e293b;
}

.pl-card-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 20px;
}

.pl-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 15px;
}

.pl-tag {
  font-size: 11px;
  background: #f0f9ff;
  color: #0369a1;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
}
.pl-price-from {
  font-weight: 800;
  color: #15803d;
  font-size: 15px;
}

/* --- KROK 2: SPECJALIŚCI --- */
.pl-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.pl-provider-card-item {
  background: #fff;
  border: 2px solid #f1f5f9;
  border-radius: 18px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pl-provider-card-item:hover {
  border-color: #3498db;
  transform: translateY(-4px);
}

.pl-provider-card-item.active {
  border-color: #3498db;
  background: #f0f9ff;
}

.pl-provider-card-item img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 4px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.pl-provider-card-item span {
  font-weight: 700;
  font-size: 15px;
  color: #1e293b;
}

/* --- KROK 3: INTERAKTYWNY KALENDARZ --- */
.pl-custom-calendar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 15px;
  margin: 0 auto 30px auto;
  max-width: 420px;
}

.pl-cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.pl-cal-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.pl-cal-header button {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}
.pl-cal-header button:hover {
  background: #e2e8f0;
}

.pl-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.pl-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.pl-cal-day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  cursor: default;
}

.pl-cal-day.available {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  cursor: pointer;
}

.pl-cal-day.available:hover {
  background: #dcfce7;
}

.pl-cal-day.selected {
  background: #22c55e !important;
  color: #fff !important;
  border-color: #16a34a !important;
}

.pl-cal-day.empty {
  visibility: hidden;
}
.pl-cal-day.past {
  color: #f1f5f9;
  opacity: 0.5;
}

/* --- SLOTY GODZINOWE --- */
.pl-slots-flex {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-top: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.pl-slot-pill {
  padding: 12px 8px;
  text-align: center;
  background: #fff;
  border: 2px solid #f1f5f9;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: #475569;
  transition: all 0.2s;
}

.pl-slot-pill:hover {
  border-color: #3498db;
  color: #3498db;
}
.pl-slot-pill.active {
  background: #3498db;
  color: #fff;
  border-color: #3498db;
}

/* --- PODSUMOWANIE I PRZYCISK --- */
.pl-final-summary {
  margin-top: 40px;
  background: #f8fafc;
  padding: 25px;
  border-radius: 18px;
  border: 1px dashed #cbd5e1;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.pl-summary-box p {
  margin: 8px 0;
  font-size: 15px;
  color: #475569;
}
.pl-total-price {
  font-size: 24px;
  font-weight: 900;
  margin-top: 15px;
  color: #1e293b;
  border-top: 1px solid #e2e8f0;
  padding-top: 15px;
}

.pl-primary-btn {
  width: 100%;
  max-width: 600px;
  display: block;
  margin: 20px auto 0 auto;
  padding: 22px;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.pl-primary-btn:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
}

/* --- KREATOR LINKÓW --- */
.pl-generator-result-box {
  margin-top: 20px;
}
.pl-copy-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.pl-copy-row input {
  flex: 1;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #3b82f6;
  background: #f1f5f9;
}
.pl-copy-row button {
  padding: 0 20px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

/* --- RESPONSYWNOŚĆ --- */
@media (max-width: 768px) {
  .pl-booking-ui {
    padding: 20px;
    margin: 20px 10px;
  }
  .pl-service-list-grid {
    grid-template-columns: 1fr;
  }
  .pl-provider-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pl-progress-bar {
    padding: 0 10px;
  }
  .pl-progress-bar::after {
    display: none;
  }
  .pl-custom-calendar {
    max-width: 100%;
  }
}
