/* Green Court — Premium Public Styles (RTL) */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700&display=swap');

.gcr-booking,
.gcr-booking *,
.gcr-booking *::before,
.gcr-booking *::after {
  box-sizing: border-box;
}

.gcr-booking {
  --gcr-primary: #0d9488;
  --gcr-primary-dark: #0f766e;
  --gcr-primary-light: #ccfbf1;
  --gcr-surface: #ffffff;
  --gcr-bg: #f8fafc;
  --gcr-text: #0f172a;
  --gcr-muted: #64748b;
  --gcr-border: #e2e8f0;
  --gcr-radius: 16px;
  --gcr-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --gcr-shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.12);
  --gcr-booked-light: #fef2f2;
  --gcr-booked: #fecaca;
  --gcr-booked-strong: #fca5a5;
  --gcr-available-light: #ecfdf5;
  --gcr-available: #6ee7b7;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  direction: rtl;
  text-align: right;
  background: var(--gcr-surface);
  border-radius: calc(var(--gcr-radius) + 4px);
  box-shadow: var(--gcr-shadow);
  padding: 2rem;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  color: var(--gcr-text);
  line-height: 1.6;
  overflow-x: hidden;
}

.gcr-booking__header {
  margin-bottom: 1.75rem;
}

.gcr-booking__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--gcr-text);
}

.gcr-booking__subtitle {
  color: var(--gcr-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* Steps */
.gcr-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.gcr-step {
  flex: 1;
  min-width: 60px;
  text-align: center;
  padding: 0.65rem 0.5rem;
  border-radius: 12px;
  background: var(--gcr-bg);
  border: 1px solid var(--gcr-border);
  transition: all 0.25s ease;
}

.gcr-step span {
  display: block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  margin: 0 auto 0.25rem;
  border-radius: 50%;
  background: var(--gcr-border);
  font-weight: 600;
  font-size: 0.85rem;
}

.gcr-step small {
  font-size: 0.75rem;
  color: var(--gcr-muted);
}

.gcr-step.active {
  background: var(--gcr-primary-light);
  border-color: var(--gcr-primary);
}

.gcr-step.active span {
  background: var(--gcr-primary);
  color: #fff;
}

.gcr-step.done span {
  background: var(--gcr-primary);
  color: #fff;
}

/* Panels */
.gcr-panel {
  display: none;
  animation: gcrFadeIn 0.35s ease;
}

.gcr-panel.active {
  display: block;
}

@keyframes gcrFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Game type cards */
.gcr-game-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 24px;
  width: 100%;
}

.gcr-game-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  background: var(--gcr-bg);
  border: 2px solid var(--gcr-border);
  border-radius: 14px;
  padding: 2.25rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.gcr-game-type-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--gcr-shadow-hover);
  border-color: var(--gcr-primary);
}

.gcr-game-type-card.selected {
  border-color: var(--gcr-primary);
  background: var(--gcr-primary-light);
  box-shadow: 0 0 0 3px var(--gcr-primary-light);
}

.gcr-game-type-card .dashicons {
  font-size: 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--gcr-primary);
}

.gcr-game-type-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.gcr-game-type-card p {
  margin: 0;
  color: var(--gcr-muted);
  font-size: 0.875rem;
}

.gcr-court-empty-notice {
  text-align: center;
  color: var(--gcr-muted);
  padding: 2rem 1rem;
}

/* Court cards */
.gcr-courts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 30px;
  width: 100%;
}

.gcr-court-card {
  display:flex !important;
  flex-direction:column !important;
  width: 100%;
  text-align: center;
  background: var(--gcr-bg);
  border: 2px solid var(--gcr-border);
  border-radius: 10px !important;
  padding: 0px !important;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.gcr-court-card.gcr-hidden {
  display: none !important;
}

.gcr-court-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--gcr-shadow-hover);
  border-color: var(--gcr-primary);
}

.gcr-court-card.selected {
  border: 2px solid #0b4f88;
  box-shadow: 0 0 0 3px var(--gcr-primary-light);
}

.gcr-court-card__img {
  width: 100%;
  height: 230px;
  overflow: hidden;
  display: block;
  flex-shrink: 0;
  line-height: 0;
  background: var(--gcr-bg);
}

.gcr-court-card__img img,
.gcr-court-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: none;
  border: none;
  margin: 0;
  padding: 0;
}

button.gcr-court-card .gcr-court-card__img,
button.gcr-court-card .gcr-court-card__photo {
  background: transparent;
  opacity: 1;
  visibility: visible;
}

.gcr-court-card__img--placeholder {
  background: linear-gradient(135deg, var(--gcr-primary-light), #e0f2fe);
}

.gcr-court-card__body {
  padding: 1rem 1.15rem;
}

.gcr-court-card__body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.gcr-court-card__body p {
  margin: 0 0 0.5rem;
  color: var(--gcr-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.gcr-court-card__price {
  color: var(--gcr-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Date & time layout */
.gcr-datetime-layout {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.gcr-calendar-sidebar {
  flex: 0 0 340px;
  max-width: 340px;
  position: sticky;
  top: 1rem;
}

.gcr-calendar-card {
  background: var(--gcr-bg);
  border: 1px solid var(--gcr-border);
  border-radius: var(--gcr-radius);
  padding: 0.85rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.gcr-slots-panel {
  flex: 1;
  min-width: 0;
  background: var(--gcr-bg);
  border: 1px solid var(--gcr-border);
  border-radius: var(--gcr-radius);
  padding: 1.25rem;
  min-height: 320px;
}

.gcr-slots-panel__header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gcr-border);
}

.gcr-slots-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--gcr-muted);
}

.gcr-slot-selection-summary {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--gcr-bg-alt, #f8fafc);
  border: 1px solid var(--gcr-border);
  border-radius: calc(var(--gcr-radius) - 6px);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.gcr-slot-selection-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.gcr-slot-selection-summary__row span:first-child {
  color: var(--gcr-muted);
}

.gcr-slot-selection-summary__row strong {
  color: var(--gcr-primary);
  text-align: left;
}

.gcr-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gcr-border);
}

.gcr-legend-item {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--gcr-surface);
  border: 1px solid var(--gcr-border);
}

.gcr-legend-item--available { background: var(--gcr-available-light); }
.gcr-legend-item--partial { background: var(--gcr-booked-light); color: #b91c1c; }
.gcr-legend-item--full { background: var(--gcr-booked-strong); color: #991b1b; }
.gcr-legend-item--past { background: #fef2f2; color: #dc2626; }

/* Calendar */
.gcr-calendar {
  background: transparent;
  padding: 0;
  border: none;
}

.gcr-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.gcr-cal-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.gcr-cal-nav {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--gcr-surface);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--gcr-text);
  transition: background 0.2s;
}

.gcr-cal-nav:hover {
  background: var(--gcr-primary-light);
  color: var(--gcr-primary);
}

.gcr-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--gcr-muted);
  font-weight: 500;
}

.gcr-cal-days {
  display:grid;
    grid-template-columns:repeat(7,minmax(0,1fr));
    gap:4px;
    width:100%
}

.gcr-cal-day {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid transparent;
  background: var(--gcr-surface);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  transition: all 0.22s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0;
}

.gcr-cal-num {
  line-height: 1;
}

.gcr-cal-dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-top: 3px;
  background: #ef4444;
}

.gcr-cal-day:hover:not(.gcr-cal-day--empty):not(.gcr-cal-day--disabled) {
  border-color: var(--gcr-primary);
  background: var(--gcr-primary-light);
  color: var(--gcr-primary);
}

.gcr-cal-day--today {
  border-color: var(--gcr-primary);
}

.gcr-cal-day--selected {
  background: var(--gcr-primary) !important;
  color: #fff !important;
  border-color: var(--gcr-primary) !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

.gcr-cal-day--selected .gcr-cal-dot {
  background: #fff;
}

.gcr-cal-day--partial {
  background: var(--gcr-booked-light);
  border-color: #fecaca;
}

.gcr-cal-day--full {
  background: var(--gcr-booked-strong);
  border-color: #f87171;
  color: #991b1b;
  cursor: not-allowed;
  opacity: 0.85;
}

.gcr-cal-day--unavailable {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.gcr-cal-day--past {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  cursor: not-allowed;
  opacity: 0.75;
  text-decoration: line-through;
}

.gcr-cal-day--disabled {
  pointer-events: none;
}

.gcr-cal-day--empty {
  background: transparent;
  cursor: default;
  border: none;
}

/* Time slot cards */
.gcr-slots-title {
  font-size: 1.05rem;
  margin: 0;
  font-weight: 600;
}

.gcr-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.gcr-slot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
  padding: 1rem 0.75rem;
  border: 2px solid var(--gcr-border);
  border-radius: 14px;
  background: var(--gcr-surface);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.gcr-slot-card__time {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.gcr-slot-card__sep {
  color: var(--gcr-muted);
  font-weight: 400;
}

.gcr-slot-card__status {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
}

.gcr-slot-card--available {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #fff 0%, var(--gcr-available-light) 100%);
}

.gcr-slot-card--available .gcr-slot-card__status {
  background: #d1fae5;
  color: #047857;
}

.gcr-slot-card--available:hover {
  border-color: var(--gcr-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.18);
}

.gcr-slot-card--selected {
  background: var(--gcr-primary) !important;
  border-color: var(--gcr-primary) !important;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(13, 148, 136, 0.35);
}
button.gcr-slot-card.gcr-slot-card--available.gcr-slot-card--selected {
    color: #fff;
    border-radius: 8px;
}
.gcr-slot-card--selected .gcr-slot-card__status {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.gcr-slot-card--selected .gcr-slot-card__sep {
  color: rgba(255, 255, 255, 0.7);
}

.gcr-slot-card--booked {
  background: var(--gcr-booked-light);
  border-color: #fecaca;
  cursor: not-allowed;
  opacity: 0.9;
}

.gcr-slot-card--booked .gcr-slot-card__status {
  background: #fee2e2;
  color: #b91c1c;
}

.gcr-slot-card--expired {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.85;
}

.gcr-slot-card--expired .gcr-slot-card__status {
  background: #e2e8f0;
  color: #64748b;
}

.gcr-loading,
.gcr-empty {
  text-align: center;
  color: var(--gcr-muted);
  padding: 2rem 1rem;
  font-size: 0.95rem;
}

/* Services */
.gcr-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.gcr-service-card {
  cursor: pointer;
}

.gcr-service-card input {
  position: absolute;
  opacity: 0;
}

.gcr-service-card__inner {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem;
  border: 2px solid var(--gcr-border);
  border-radius: var(--gcr-radius);
  background: var(--gcr-surface);
  transition: all 0.28s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.gcr-service-card__visual {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gcr-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gcr-service-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gcr-service-card__visual .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: var(--gcr-primary);
}

.gcr-service-card__content {
  flex: 1;
  min-width: 0;
}

.gcr-service-card input:checked + .gcr-service-card__inner {
  border-color: var(--gcr-primary);
  background: linear-gradient(135deg, #fff 0%, var(--gcr-primary-light) 100%);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.15);
  transform: translateY(-2px);
}

.gcr-service-card__content strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.gcr-service-card__content p {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--gcr-muted);
  line-height: 1.45;
}

.gcr-service-card__price {
  color: var(--gcr-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Form */
.gcr-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.gcr-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gcr-field--full {
  grid-column: 1 / -1;
}

.gcr-field span {
  font-size: 0.875rem;
  font-weight: 500;
}

.gcr-field input,
.gcr-field textarea {
  padding: 0.75rem 1rem;
  border: 2px solid var(--gcr-border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  background: var(--gcr-surface);
}

.gcr-field input:focus,
.gcr-field textarea:focus {
  outline: none;
  border-color: var(--gcr-primary);
}

/* Summary */
.gcr-summary {
  background: var(--gcr-bg);
  border-radius: var(--gcr-radius);
  padding: 1.5rem;
  border: 1px solid var(--gcr-border);
}

.gcr-summary h3 {
  margin: 0 0 1rem;
}

.gcr-summary__row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gcr-border);
  font-size: 0.95rem;
}

.gcr-summary__total {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  margin-top: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gcr-primary);
}

/* Coupon */
.gcr-coupon-box {
  margin: 1rem 0;
  padding-top: 1rem;
  border-top: 1px dashed var(--gcr-border);
}

.gcr-coupon-input-row {
  display: flex;
  gap: 0.5rem;
}

.gcr-coupon-input-row input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gcr-border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--gcr-surface);
}

.gcr-coupon-input-row input:focus {
  outline: none;
  border-color: var(--gcr-primary);
}

.gcr-coupon-input-row .gcr-btn {
  padding: 0.75rem 1.1rem;
  white-space: nowrap;
}

.gcr-coupon-result {
  margin-top: 0.6rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
}

.gcr-coupon-result--ok {
  background: rgba(16, 185, 129, 0.12);
  color: #0d9488;
}

.gcr-coupon-result--error {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

/* Footer */
.gcr-booking__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gcr-border);
  flex-wrap: wrap;
}

.gcr-total-bar {
  font-size: 1rem;
}

.gcr-total-bar strong {
  color: var(--gcr-primary);
  font-size: 1.15rem;
}

.gcr-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
}

.gcr-btn--primary {
  background: var(--gcr-primary);
  color: #fff;
}

.gcr-btn--primary:hover:not(:disabled) {
  background: var(--gcr-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.gcr-btn--ghost {
  background: transparent;
  border: 2px solid var(--gcr-border);
  color: var(--gcr-text);
}

.gcr-btn--ghost:hover:not(:disabled) {
  border-color: var(--gcr-primary);
  color: var(--gcr-primary);
}

.gcr-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gcr-message {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
}

.gcr-message--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.gcr-message--success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* Responsive */
@media (max-width: 900px) {
  .gcr-datetime-layout {
    flex-direction: column;
  }

  .gcr-calendar-sidebar {
    flex: none;
    max-width: 100%;
    width: 100%;
    position: static;
  }

  .gcr-calendar-card {
    max-width: 380px;
    margin: 0 auto;
  }

  .gcr-slots-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .gcr-booking {
    padding: 1.25rem;
    border-radius: var(--gcr-radius);
  }

  .gcr-steps {
    gap: 0.35rem;
  }

  .gcr-step small {
    font-size: 0.65rem;
  }

  .gcr-form-grid {
    grid-template-columns: 1fr;
  }

  .gcr-booking__footer {
    flex-direction: column-reverse;
  }

  .gcr-btn {
    width: 100%;
    text-align: center;
  }

  .gcr-total-bar {
    width: 100%;
    text-align: center;
  }

  .gcr-slots-panel {
    padding: 1rem;
  }

  .gcr-coupon-input-row {
    flex-wrap: wrap;
  }

  .gcr-coupon-input-row input {
    min-width: 0;
    flex: 1 1 160px;
  }
}

@media (max-width: 600px) {
  .gcr-slots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .gcr-courts-grid,
  .gcr-game-type-grid {
    grid-template-columns: 1fr;
  }

  .gcr-cal-day {
    font-size: 0.8rem;
  }

  .gcr-slot-card {
    padding: 0.85rem 0.5rem;
  }

  .gcr-slot-card__time {
    font-size: 0.85rem;
  }

  .gcr-slot-card__status {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
  }

  .gcr-coupon-input-row {
    flex-direction: column;
  }

  .gcr-coupon-input-row .gcr-btn {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .gcr-slots-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .gcr-slot-card {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.75rem 1rem;
  }
}
