/* ====================================================================
 * Bilenyum trial-modal.css — Ücretsiz Deneme Dersi modal stilleri
 *
 * Yalnızca trial modal'ı olan sayfalar yükler:
 *   <link rel="stylesheet" href="assets/trial-modal.css">
 * ==================================================================== */

.trial-modal {
  position: fixed; inset: 0;
  z-index: 9999;
  display: none;
  align-items: flex-start; justify-content: center;
  padding: 32px 20px;
  overflow-y: auto;
}
.trial-modal.open { display: flex; }
.trial-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 12, 35, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: trialOverlayIn 0.25s ease;
}
@keyframes trialOverlayIn { from { opacity: 0; } to { opacity: 1; } }
.trial-modal-card {
  position: relative;
  width: 100%; max-width: 540px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 30px 80px -20px rgba(15,12,35,0.55);
  z-index: 1;
  animation: trialCardIn 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  margin: auto;
  color: #15172b;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  line-height: 1.5;
  overflow: hidden;
}
@keyframes trialCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
/* Banner: gerçek fotoğraf + üstünde eyebrow */
.trial-modal-image {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, rgba(62,58,142,0.07), rgba(74,214,255,0.05));
  border-bottom: 1.5px dashed rgba(20,22,50,0.18);
  display: flex; align-items: center; justify-content: center;
  color: rgba(20,22,50,0.45);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.10em; text-transform: uppercase;
  overflow: hidden;
}
.trial-modal-image.has-photo {
  border-bottom: none;
  display: block;
}
.trial-modal-image.has-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* Üst kısımda eyebrow okunabilirliği için yumuşak gradient */
.trial-modal-image.has-photo::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 70px;
  background: linear-gradient(180deg, rgba(0,0,0,0.28), transparent);
  pointer-events: none;
  z-index: 1;
}
/* Eyebrow banner içine taşındığında — brand pink solid + beyaz text */
.trial-modal-image .trial-modal-eyebrow {
  position: absolute;
  top: 14px; left: 16px;
  margin: 0;
  z-index: 2;
  background: linear-gradient(135deg, #ff3a9a, #e5047b);
  color: white;
  box-shadow: 0 8px 20px -6px rgba(229,4,123,0.55);
}
.trial-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: white;
  border: 1px solid rgba(20,22,50,0.10);
  color: #4a4f78;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  z-index: 2;
  box-shadow: 0 2px 8px -2px rgba(40,38,90,0.10);
}
.trial-modal-close:hover { background: rgba(229,4,123,0.08); color: #e5047b; border-color: rgba(229,4,123,0.22); transform: scale(1.05); }
.trial-modal-close svg { width: 16px; height: 16px; }
.trial-modal-body { padding: 28px 32px 28px; }
.trial-modal-head { margin-bottom: 22px; text-align: center; }
.trial-modal-eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  color: #e5047b;
  letter-spacing: 0.10em; text-transform: uppercase;
  background: rgba(229,4,123,0.08);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.trial-modal-title {
  font-size: 24px; font-weight: 800;
  color: #15172b;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  line-height: 1.2;
}
.trial-modal-sub {
  font-size: 14px; color: #4a4f78;
  margin: 0;
  max-width: 380px; margin-left: auto; margin-right: auto;
}
/* Step form (no visible step indicator, but 2-step flow) */
.trial-step-form { display: none; flex-direction: column; gap: 14px; }
.trial-step-form.active { display: flex; animation: trialStepIn 0.32s ease; }
@keyframes trialStepIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}
.trial-step-form .form-field { display: flex; flex-direction: column; gap: 6px; }
.trial-step-form .form-field label {
  font-size: 13px; font-weight: 600;
  color: #4a4f78;
}
.trial-step-form input,
.trial-step-form select {
  width: 100%; height: 46px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1.5px solid rgba(40,38,90,0.12);
  background: white;
  color: #15172b;
  font-family: inherit; font-size: 14.5px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.trial-step-form input::placeholder { color: #797ea6; }
.trial-step-form input:focus,
.trial-step-form select:focus {
  border-color: #3e3a8e;
  box-shadow: 0 0 0 4px rgba(62,58,142,0.10);
}
.trial-step-form select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23797ea6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.trial-step-form select:invalid { color: #797ea6; }
.trial-step-form select option { color: #15172b; }
.trial-step-form select option[disabled] { color: #797ea6; }

/* Sınıf seviyesi: dropdown yerine yan yana pill butonlar */
.trial-grade-group {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.trial-grade-pill {
  padding: 11px 6px;
  border-radius: 11px;
  border: 1.5px solid rgba(40,38,90,0.12);
  background: white;
  color: #15172b;
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px; font-weight: 600;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.2s ease;
}
.trial-grade-pill:hover:not(.is-active) {
  border-color: rgba(62,58,142,0.30);
  background: rgba(62,58,142,0.04);
  transform: translateY(-1px);
}
.trial-grade-pill.is-active {
  background: linear-gradient(135deg, #3e3a8e, #28265a);
  border-color: transparent;
  color: white;
  box-shadow: 0 8px 18px -8px rgba(62,58,142,0.50);
}
/* Validation flash (seçim yapılmadan ileri'ye basılırsa) */
.trial-grade-group.is-invalid .trial-grade-pill:not(.is-active) {
  border-color: rgba(229,4,123,0.50);
  animation: gradePillShake 0.4s ease;
}
@keyframes gradePillShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
.trial-step-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trial-actions {
  display: flex; gap: 10px; margin-top: 8px;
}
.trial-actions .btn-modal {
  flex: 1; height: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 600; font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.22s ease, opacity 0.18s ease;
  text-decoration: none;
}
.trial-actions .btn-modal:hover:not(:disabled) { transform: translateY(-1px); }
.trial-actions .btn-modal.btn-modal-primary {
  background: linear-gradient(180deg, #ff3a9a, #e5047b);
  color: white;
}
.trial-actions .btn-modal.btn-modal-primary:hover {
  box-shadow: 0 12px 28px -8px rgba(229,4,123,0.55), inset 0 1px 0 rgba(255,255,255,0.25);
}
.trial-actions .btn-modal.btn-modal-ghost {
  flex: 0 0 auto;
  background: white;
  color: #15172b;
  border-color: rgba(20,22,50,0.14);
  padding: 0 18px;
}
.trial-actions .btn-modal.btn-modal-ghost:hover { border-color: rgba(40,38,90,0.28); }
.trial-actions .btn-modal svg { width: 16px; height: 16px; flex-shrink: 0; }
/* Success state: hide banner + head, only success content shows */
.trial-modal-card.success-state .trial-modal-image,
.trial-modal-card.success-state .trial-modal-head { display: none; }
.trial-modal-card.success-state .trial-modal-body { padding: 48px 32px 40px; }
/* Success */
.trial-success { display: none; text-align: center; padding: 8px 0; }
.trial-success.show { display: block; animation: trialFadeIn 0.4s ease; }
.trial-modal-card.success-state .trial-success-icon { width: 76px; height: 76px; margin-bottom: 22px; }
.trial-modal-card.success-state .trial-success-icon svg { width: 38px; height: 38px; }
.trial-modal-card.success-state .trial-success h3 { font-size: 26px; margin-bottom: 12px; }
.trial-modal-card.success-state .trial-success p { font-size: 15px; margin-bottom: 28px; }
@keyframes trialFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.trial-success-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(160deg, #6dd49e, #2a8a5a);
  color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 32px -10px rgba(109,212,158,0.55);
}
.trial-success-icon svg { width: 30px; height: 30px; }
.trial-success h3 {
  font-size: 22px; font-weight: 800;
  margin: 0 0 8px;
  color: #15172b;
  letter-spacing: -0.01em;
}
.trial-success p {
  font-size: 14px; color: #4a4f78;
  margin: 0 0 20px;
  max-width: 360px; margin-left: auto; margin-right: auto;
}
.trial-success .btn-modal {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 28px;
  border-radius: 12px; border: none;
  background: linear-gradient(180deg, #ff3a9a, #e5047b);
  color: white; font-weight: 600; font-size: 14.5px;
  cursor: pointer; font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.22s ease;
}
.trial-success .btn-modal:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(229,4,123,0.55);
}

/* ====================================================================
 * Step 3 — Slot seçimi (gün nav + saat grid)
 * ==================================================================== */
/* Gün nav: segmented control (tinted container içinde flat tab'lar) */
.trial-slot-nav {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 14px;
  padding: 5px;
  background: rgba(62,58,142,0.07);
  border-radius: 14px;
}
.trial-slot-day {
  padding: 8px 4px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  display: flex; flex-direction: column; gap: 1px; align-items: center;
  color: #4a4f78;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.2s ease;
}
.trial-slot-day:hover:not(.is-active) {
  background: rgba(255,255,255,0.55);
  color: #15172b;
}
.trial-slot-day strong {
  font-size: 13px; font-weight: 700;
  color: inherit;
  line-height: 1.2;
}
.trial-slot-day small {
  font-size: 11px; font-weight: 500;
  color: inherit;
  opacity: 0.65;
  line-height: 1.2;
}
.trial-slot-day.is-active {
  background: white;
  color: #3e3a8e;
  box-shadow: 0 6px 14px -6px rgba(40,38,90,0.25);
}
.trial-slot-day.is-active strong { color: #15172b; }
.trial-slot-day.is-active small { color: #3e3a8e; opacity: 1; }

/* Saat grid: bağımsız buton kartları (gün nav'dan farklı görsel dil) */
.trial-slot-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.trial-slot {
  padding: 12px 6px 10px;
  border-radius: 11px;
  border: 1.5px solid rgba(40,38,90,0.12);
  background: white;
  color: #15172b;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.trial-slot:hover:not(:disabled):not(.is-selected) {
  border-color: rgba(229,4,123,0.35);
  background: rgba(229,4,123,0.04);
  transform: translateY(-1px);
}
.trial-slot.is-selected {
  background: linear-gradient(135deg, #ff3a9a, #e5047b);
  border-color: transparent;
  color: white;
  box-shadow: 0 10px 22px -8px rgba(229,4,123,0.55);
}
.trial-slot-full {
  cursor: not-allowed;
  background: rgba(20,22,50,0.03);
  color: rgba(20,22,50,0.40);
  text-decoration: line-through;
}

/* Müsait / Dolu durum etiketi (badge stilinde renkli) */
.trial-slot-badge {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 9.5px; font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
  display: inline-block;
}
.trial-slot-badge.is-free {
  background: rgba(109,212,158,0.18);
  color: #1f6a44;
}
.trial-slot-badge.is-full {
  background: rgba(229,4,123,0.10);
  color: #b8035f;
}
.trial-slot.is-selected .trial-slot-badge.is-free {
  background: rgba(255,255,255,0.22);
  color: white;
}

/* ====================================================================
 * Success — özet kartı (profil + slot pattern)
 * ==================================================================== */
.trial-summary {
  margin: 8px auto 18px;
  max-width: 420px;
  text-align: left;
  display: flex; flex-direction: column;
  gap: 10px;
}

/* Profile card (öğrenci + veli) */
.trial-summary-profile {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: white;
  border: 1px solid rgba(20,22,50,0.10);
  border-radius: 14px;
  transition: border-color 0.18s ease;
}
.trial-summary-profile:hover { border-color: rgba(62,58,142,0.20); }
.trial-summary-avatar {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: white;
}
.trial-summary-avatar svg {
  width: 22px; height: 22px;
}
.trial-summary-profile.is-student .trial-summary-avatar {
  background: linear-gradient(135deg, #3e3a8e, #28265a);
  box-shadow: 0 6px 14px -6px rgba(62,58,142,0.45);
}
.trial-summary-profile.is-parent .trial-summary-avatar {
  background: linear-gradient(135deg, #1c8fb5, #4ad6ff);
  box-shadow: 0 6px 14px -6px rgba(74,214,255,0.45);
}
.trial-summary-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.trial-summary-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700;
  color: #797ea6;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.trial-summary-name {
  font-size: 15px; font-weight: 700;
  color: #15172b;
  line-height: 1.25;
}
.trial-summary-sub {
  font-size: 12.5px;
  color: #4a4f78;
  line-height: 1.35;
}

/* Time slot card — brand pink emphasis */
.trial-summary-slot {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(229,4,123,0.06), rgba(229,4,123,0.02));
  border: 1px solid rgba(229,4,123,0.25);
  border-radius: 14px;
}
.trial-summary-slot-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff3a9a, #e5047b);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px -6px rgba(229,4,123,0.50);
}
.trial-summary-slot-icon svg { width: 22px; height: 22px; }
.trial-summary-slot-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.trial-summary-slot-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700;
  color: #b8035f;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.trial-summary-slot-value {
  font-size: 16px; font-weight: 800;
  color: #15172b;
  line-height: 1.25;
  letter-spacing: -0.005em;
}

.trial-success-note {
  font-size: 12.5px;
  color: #797ea6;
  font-style: italic;
  margin: 0 auto 22px;
  max-width: 360px;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .trial-modal { padding: 20px 16px; }
  .trial-modal-body { padding: 24px 22px 24px; }
  .trial-modal-title { font-size: 20px; }
  .trial-step-form .form-row { grid-template-columns: 1fr; }
  .trial-modal-image { height: 150px; }
  .trial-slot-grid { grid-template-columns: repeat(3, 1fr); }
  .trial-slot-day strong { font-size: 12px; }
  .trial-slot-day small { font-size: 10.5px; }
  .trial-grade-group { grid-template-columns: repeat(2, 1fr); }
}