/* =====================================================
   GGSM Klinik Randevu Sistemi – Frontend CSS
   Teal/dental design, multi-step form
   ===================================================== */

.ggsm-rdv-wrapper,
.ggsm-rdv-wrapper *,
.ggsm-rdv-wrapper *::before,
.ggsm-rdv-wrapper *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =====================================================
   HEADER
   ===================================================== */
.ggsm-rdv-header {
  text-align: center;
  margin-bottom: 28px;
}

.ggsm-rdv-header-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
}

.ggsm-rdv-title {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.2;
}

.ggsm-rdv-subtitle {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
}

/* =====================================================
   CARD
   ===================================================== */
.ggsm-rdv-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 48px rgba(13, 148, 136, 0.12), 0 2px 8px rgba(0,0,0,0.06);
  border-top: 4px solid #0d9488;
  overflow: hidden;
  padding: 36px 40px 40px;
  max-width: 760px;
  margin: 0 auto;
}

/* =====================================================
   ADIMLAR (STEPS)
   ===================================================== */
.ggsm-rdv-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
}

.ggsm-rdv-step {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.ggsm-rdv-step.active,
.ggsm-rdv-step.done {
  opacity: 1;
}

.ggsm-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0d9488;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.3s;
}

.ggsm-rdv-step.done .ggsm-step-num {
  background: #10b981;
}

.ggsm-rdv-step.done .ggsm-step-num::before {
  content: '✓';
  font-size: 13px;
}

.ggsm-rdv-step.done .ggsm-step-num span {
  display: none;
}

.ggsm-step-label {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
}

.ggsm-rdv-step-sep {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 12px;
  min-width: 32px;
  max-width: 80px;
}

/* =====================================================
   PANELLER (PANES)
   ===================================================== */
.ggsm-rdv-pane {
  display: none;
}

.ggsm-rdv-pane.active {
  display: block;
}

/* =====================================================
   FORM ALANLARI
   ===================================================== */
.ggsm-rdv-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.ggsm-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.ggsm-field-group:last-child {
  margin-bottom: 0;
}

.ggsm-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ggsm-label-icon {
  font-size: 14px;
}

.ggsm-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #111827;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
  line-height: 1.5;
}

.ggsm-input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
  background: #fff;
}

.ggsm-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10);
}

.ggsm-textarea {
  resize: vertical;
  min-height: 90px;
}

select.ggsm-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230d9488' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

input[type="date"].ggsm-input {
  cursor: pointer;
}

/* =====================================================
   SAAT SLOTLARI
   ===================================================== */
.ggsm-slots-legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.ggsm-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.ggsm-legend-dot.available { background: #0d9488; }
.ggsm-legend-dot.booked    { background: #e2e8f0; }

.ggsm-slots-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  color: #64748b;
  font-size: 14px;
}

.ggsm-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid #e2e8f0;
  border-top-color: #0d9488;
  border-radius: 50%;
  animation: ggsm-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes ggsm-spin {
  to { transform: rotate(360deg); }
}

.ggsm-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  padding: 4px 0;
}

.ggsm-slot {
  padding: 9px 4px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
  line-height: 1.2;
  user-select: none;
}

.ggsm-slot.available {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0d9488;
}

.ggsm-slot.available:hover {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13,148,136,0.25);
}

.ggsm-slot.available.selected {
  background: #0d9488 !important;
  border-color: #0d9488 !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(13,148,136,0.35);
  transform: translateY(-1px);
}

.ggsm-slot.booked {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #cbd5e1;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* =====================================================
   PANEL FOOTER (butonlar)
   ===================================================== */
.ggsm-pane-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #f1f5f9;
}

/* Geri */
.elementor-widget-ggsm_randevu .ggsm-btn-back,
.ggsm-rdv-wrapper .ggsm-btn-back {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 10px 20px !important;
  border-radius: 50px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #64748b !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  transition: all 0.2s !important;
  font-family: inherit !important;
}

.elementor-widget-ggsm_randevu .ggsm-btn-back:hover,
.ggsm-rdv-wrapper .ggsm-btn-back:hover {
  border-color: #0d9488 !important;
  color: #0d9488 !important;
  background: transparent !important;
}

/* İleri */
.elementor-widget-ggsm_randevu .ggsm-btn-next,
.ggsm-rdv-wrapper .ggsm-btn-next {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 12px 28px !important;
  border-radius: 50px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  background: #0d9488 !important;
  background-color: #0d9488 !important;
  background-image: none !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(13,148,136,0.30) !important;
  text-decoration: none !important;
  transition: all 0.2s !important;
  font-family: inherit !important;
}

.elementor-widget-ggsm_randevu .ggsm-btn-next:hover,
.ggsm-rdv-wrapper .ggsm-btn-next:hover {
  background: #0f766e !important;
  background-color: #0f766e !important;
  box-shadow: 0 6px 20px rgba(13,148,136,0.40) !important;
  transform: translateY(-1px) !important;
}

.elementor-widget-ggsm_randevu .ggsm-btn-next:disabled,
.ggsm-rdv-wrapper .ggsm-btn-next:disabled {
  background: #cbd5e1 !important;
  background-color: #cbd5e1 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.ggsm-btn-arrow {
  font-size: 16px;
  line-height: 1;
}

/* =====================================================
   GÖNDER BUTONU
   ===================================================== */
.elementor-widget-ggsm_randevu .ggsm-rdv-submit,
.ggsm-rdv-wrapper .ggsm-rdv-submit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 13px 32px !important;
  border-radius: 50px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  background: #0d9488 !important;
  background-color: #0d9488 !important;
  background-image: none !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(13,148,136,0.35) !important;
  text-decoration: none !important;
  transition: all 0.2s !important;
  font-family: inherit !important;
  letter-spacing: 0.3px !important;
}

.elementor-widget-ggsm_randevu .ggsm-rdv-submit:hover,
.ggsm-rdv-wrapper .ggsm-rdv-submit:hover {
  background: #0f766e !important;
  background-color: #0f766e !important;
  box-shadow: 0 6px 24px rgba(13,148,136,0.45) !important;
  transform: translateY(-1px) !important;
}

.ggsm-rdv-submit.loading {
  pointer-events: none !important;
  opacity: 0.85 !important;
}

.ggsm-submit-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ggsm-spin 0.6s linear infinite;
}

/* =====================================================
   ÖZET KARTI (Adım 3)
   ===================================================== */
.ggsm-summary-card {
  background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%);
  border: 1.5px solid #99f6e4;
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

.ggsm-summary-title {
  font-size: 16px;
  font-weight: 700;
  color: #0d9488;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #99f6e4;
}

.ggsm-summary-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ggsm-summary-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ggsm-summary-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.ggsm-summary-key {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  min-width: 80px;
}

.ggsm-summary-val {
  font-size: 14px;
  color: #111827;
  font-weight: 500;
}

/* =====================================================
   FORM MESAJI
   ===================================================== */
.ggsm-form-msg {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}

.ggsm-form-msg.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.ggsm-form-msg.success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* =====================================================
   BAŞARI EKRANI
   ===================================================== */
.ggsm-success-screen {
  text-align: center;
  padding: 20px 0;
}

.ggsm-success-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 16px;
  animation: ggsm-bounce 0.5s ease;
}

@keyframes ggsm-bounce {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

.ggsm-success-title {
  font-size: 26px;
  font-weight: 800;
  color: #0d9488;
  margin: 0 0 10px;
}

.ggsm-success-msg {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto 20px;
}

.ggsm-success-details {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 12px;
  padding: 16px 20px;
  display: inline-block;
  text-align: left;
  margin-bottom: 24px;
  font-size: 14px;
  color: #374151;
  line-height: 1.8;
}

.elementor-widget-ggsm_randevu .ggsm-btn-new,
.ggsm-rdv-wrapper .ggsm-btn-new {
  display: inline-flex !important;
  align-items: center !important;
  padding: 11px 28px !important;
  border-radius: 50px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #0d9488 !important;
  border: 2px solid #0d9488 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  transition: all 0.2s !important;
  font-family: inherit !important;
}

.elementor-widget-ggsm_randevu .ggsm-btn-new:hover,
.ggsm-rdv-wrapper .ggsm-btn-new:hover {
  background: #0d9488 !important;
  background-color: #0d9488 !important;
  color: #fff !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 640px) {
  .ggsm-rdv-card {
    padding: 24px 20px 28px;
    border-radius: 16px;
  }

  .ggsm-rdv-row-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ggsm-rdv-title {
    font-size: 24px;
  }

  .ggsm-step-label {
    display: none;
  }

  .ggsm-rdv-step-sep {
    min-width: 20px;
    max-width: 40px;
  }

  .ggsm-slots-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .ggsm-pane-footer {
    flex-wrap: wrap;
  }
}

@media (max-width: 400px) {
  .ggsm-slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
