/**
 * DAKRO Booking System - Frontend Styles
 */

.dk-booking {
  --primary: #ED1C24;
  --text: #111827;
  --muted: #6B7280;
  --card-bg: #fff;
  --card-brd: #ECEFF3;
  --shadow: 0 8px 24px rgba(0,0,0,.06);
  --shadow-hover: 0 12px 28px rgba(0,0,0,.08);
  --success: #10B981;
  --warning: #F59E0B;
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 16px;
}

/* Nagłówek sekcji */
.dk-booking-head {
  text-align: center;
  margin: 0 auto 40px;
  max-width: 720px;
  animation: fadeInDown 0.6s ease;
}

.dk-booking-kicker {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--primary);
  background: rgba(237,28,36,.08);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.dk-booking-title {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 900;
  color: var(--text);
}

.dk-booking-sub {
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* Info banner */
.dk-info-banner {
  background: linear-gradient(135deg, rgba(237,28,36,.08) 0%, rgba(237,28,36,.04) 100%);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeInUp 0.6s ease 0.2s backwards;
}

.dk-info-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--primary);
}

.dk-info-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.dk-info-text strong {
  font-weight: 700;
  color: var(--primary);
}

/* Główny kontener */
.dk-booking-container {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: fadeInUp 0.6s ease 0.3s backwards;
}

/* Progress bar */
.dk-booking-progress {
  display: flex;
  background: #F9FAFB;
  padding: 24px;
  gap: 12px;
  position: relative;
}

.dk-booking-step {
  flex: 1;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dk-booking-step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--card-brd);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.3s ease;
}

.dk-booking-step.active .dk-booking-step-number {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(237,28,36,.3);
}

.dk-booking-step.completed .dk-booking-step-number {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.dk-booking-step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.3s ease;
}

.dk-booking-step.active .dk-booking-step-label {
  color: var(--primary);
}

/* Formularz */
.dk-booking-form {
  padding: 32px;
}

.dk-booking-panel {
  display: none;
  animation: slideIn 0.4s ease;
}

.dk-booking-panel.active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.dk-booking-panel-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.dk-booking-panel-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 28px;
}

/* Grid usług */
.dk-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dk-service-card {
  background: #F9FAFB;
  border: 2px solid var(--card-brd);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.dk-service-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.dk-service-card.selected {
  background: rgba(237,28,36,.05);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(237,28,36,.1);
}

.dk-service-card.selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.dk-service-icon {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 12px;
}

.dk-service-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.dk-service-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.dk-service-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Kalendarz custom */
.dk-calendar-container {
  background: #F9FAFB;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.dk-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.dk-calendar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.dk-calendar-nav {
  display: flex;
  gap: 8px;
}

.dk-calendar-nav-btn {
  width: 36px;
  height: 36px;
  border: 2px solid var(--card-brd);
  background: white;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--text);
}

.dk-calendar-nav-btn:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.dk-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.dk-calendar-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: 8px 0;
}

.dk-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.dk-calendar-day {
  aspect-ratio: 1;
  border: 2px solid transparent;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.dk-calendar-day:hover:not(.disabled):not(.empty) {
  border-color: var(--primary);
  transform: scale(1.05);
}

.dk-calendar-day.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(237,28,36,.3);
}

.dk-calendar-day.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: #f5f5f5;
}

.dk-calendar-day.empty {
  background: transparent;
  cursor: default;
}

.dk-calendar-day.today {
  border-color: var(--warning);
}

/* Sloty czasowe */
.dk-time-section {
  margin-top: 24px;
}

.dk-time-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dk-time-label svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.dk-time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.dk-time-slot {
  padding: 14px;
  border: 2px solid var(--card-brd);
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  position: relative;
}

.dk-time-slot:hover:not(.disabled) {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.dk-time-slot.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(237,28,36,.3);
}

.dk-time-slot.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f5f5f5;
  text-decoration: line-through;
}

.dk-time-slot.suggested {
  border-color: var(--success);
  background: rgba(16,185,129,.05);
}

.dk-time-slot.suggested::after {
  content: 'Polecane';
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--success);
  color: white;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Form Groups */
.dk-form-group {
  margin-bottom: 20px;
}

.dk-form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.dk-form-label span {
  color: var(--primary);
}

.dk-form-input,
.dk-form-select,
.dk-form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--card-brd);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
}

.dk-form-input:focus,
.dk-form-select:focus,
.dk-form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(237,28,36,.1);
}

.dk-form-textarea {
  resize: vertical;
  min-height: 120px;
}

.dk-form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Podsumowanie */
.dk-summary-card {
  background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
  border: 2px solid var(--card-brd);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.dk-summary-header {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dk-summary-header svg {
  color: var(--primary);
}

.dk-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--card-brd);
}

.dk-summary-item:last-child {
  border-bottom: none;
}

.dk-summary-label {
  font-weight: 600;
  color: var(--muted);
  font-size: 14px;
}

.dk-summary-value {
  font-weight: 700;
  color: var(--text);
  text-align: right;
}

.dk-summary-note {
  background: rgba(237,28,36,.05);
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* Buttony */
.dk-booking-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 24px;
  border-top: 1px solid var(--card-brd);
}

.dk-btn {
  padding: 14px 32px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.dk-btn-primary {
  background: var(--primary);
  color: white;
}

.dk-btn-primary:hover {
  background: #D91920;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(237,28,36,.3);
}

.dk-btn-secondary {
  background: #F3F4F6;
  color: var(--text);
}

.dk-btn-secondary:hover {
  background: #E5E7EB;
}

.dk-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Success message */
.dk-success-message {
  text-align: center;
  padding: 40px 20px;
}

.dk-success-icon {
  width: 80px;
  height: 80px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.dk-success-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 12px;
}

.dk-success-text {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.dk-success-details {
  background: #F9FAFB;
  border-radius: 12px;
  padding: 20px;
  max-width: 480px;
  margin: 0 auto 24px;
  text-align: left;
}

.dk-success-detail-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-brd);
}

.dk-success-detail-item:last-child {
  border-bottom: none;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .dk-booking-title {
    font-size: 28px;
  }
  .dk-booking-progress {
    padding: 16px;
  }
  .dk-booking-form {
    padding: 20px;
  }
  .dk-form-row {
    grid-template-columns: 1fr;
  }
  .dk-calendar-days {
    gap: 4px;
  }
  .dk-time-slots {
    grid-template-columns: repeat(2, 1fr);
  }
  .dk-services-grid {
    grid-template-columns: 1fr;
  }
}