/* Öğrenci sınav yeri — Travel Connect tarzı ortalı kart, sol panel dot-map (navbar partial ile uyumlu) */

:root {
  --osy-text: #1e293b;
  --osy-muted: #64748b;
  --osy-line: #e2e8f0;
  --osy-blue: #2563eb;
  --osy-blue-dark: #1d4ed8;
  --osy-indigo: #4f46e5;
  --osy-radius: 0.5rem;
  --osy-radius-lg: 1rem;
  --osy-card-max: 56rem;
  --page-gutter-x: clamp(1rem, 2.5vw, 2rem);
  --text: #0f172a;
  --text-muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
}

/* Kart içi taşma: padding + % genişlik birlikte kullanıldığında border-box şart */
.osy-main,
.osy-main *,
.osy-main *::before,
.osy-main *::after {
  box-sizing: border-box;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.navbar-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding-left: max(var(--page-gutter-x), env(safe-area-inset-left));
  padding-right: max(var(--page-gutter-x), env(safe-area-inset-right));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-feature-settings: "kern" 1;
}

.brand:hover {
  opacity: 0.85;
}

.brand__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.brand__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand__tagline {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.osy-page {
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--osy-text);
  background: linear-gradient(to bottom right, #eff6ff, #e0e7ff);
}

.osy-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(1rem, 3vw, 1.5rem) var(--page-gutter-x);
  min-height: 0;
}

.osy-card {
  width: 100%;
  max-width: var(--osy-card-max);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--osy-radius-lg);
  background: #fff;
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(15, 23, 42, 0.04);
}

@media (min-width: 768px) {
  .osy-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    grid-template-rows: minmax(600px, auto);
    align-items: stretch;
    min-height: 600px;
  }
}

/* Promo panel — mobilde kartın üstünde; masaüstünde solda */
.osy-promo {
  display: block;
  position: relative;
  min-width: 0;
  flex-shrink: 0;
  min-height: clamp(172px, 38vw, 248px);
  border-bottom: 1px solid #f1f5f9;
}

@media (min-width: 768px) {
  .osy-promo {
    min-height: 0;
    border-bottom: none;
    border-right: 1px solid #f1f5f9;
  }
}

.osy-promo-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, #eff6ff, #e0e7ff);
}

.osy-dotmap-host {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.osy-dotmap-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.osy-promo-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.05rem 1.25rem 1.15rem;
  gap: 0.5rem;
  pointer-events: none;
}

@media (min-width: 768px) {
  .osy-promo-overlay {
    justify-content: center;
    padding: 2rem 1.75rem 2rem;
    gap: 0.65rem;
  }
}

.osy-promo-overlay .osy-promo-back {
  pointer-events: auto;
}

.osy-promo-icon-wrap {
  margin: 0;
  flex-shrink: 0;
}

.osy-promo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: linear-gradient(to bottom right, #3b82f6, #4f46e5);
  color: #fff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.osy-promo-title {
  margin: 0;
  font-size: clamp(1.28rem, 3.8vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  background: linear-gradient(to right, #2563eb, #4f46e5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.osy-promo-lead {
  margin: 0;
  max-width: 22rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--osy-muted);
}

@media (min-width: 768px) {
  .osy-promo-lead {
    font-size: 0.875rem;
  }
}

.osy-promo-back {
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--osy-blue);
  text-decoration: none;
}

.osy-promo-back:hover {
  color: var(--osy-blue-dark);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .osy-promo-back {
    margin-top: 0.2rem;
    font-size: 0.875rem;
  }
}

/* Sağ — form (grid hücresi; sağ sütun biraz daha geniş) */
.osy-form-col {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  padding: clamp(1.5rem, 4vw, 2rem) clamp(1.25rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: flex-start;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .osy-form-col {
    justify-content: center;
    padding: 2rem clamp(1.75rem, 3vw, 2.5rem);
  }
}

.osy-form-block[hidden] {
  display: none !important;
}

.osy-form-block:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.osy-form-head {
  margin: 0;
}

.osy-form-title {
  margin: 0 0 0.25rem;
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1e293b;
}

.osy-form-sub {
  margin: 0;
  font-size: 0.875rem;
  color: var(--osy-muted);
  line-height: 1.5;
}

.osy-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.osy-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border-radius: var(--osy-radius);
  border: 1px solid var(--osy-line);
  background: #f8fafc;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--osy-text);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.osy-tab:hover {
  background: #f1f5f9;
}

.osy-tab--active {
  border-color: rgba(37, 99, 235, 0.45);
  background: linear-gradient(180deg, #eff6ff, #fff);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1);
  color: var(--osy-blue-dark);
}

.osy-form-fields {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.osy-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.osy-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}

.osy-req {
  color: #3b82f6;
}

.osy-field input {
  height: 2.5rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: var(--osy-radius);
  border: 1px solid var(--osy-line);
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.osy-field input::placeholder {
  color: #94a3b8;
}

.osy-field input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  background: #fff;
}

.osy-error {
  display: none;
  padding: 0.65rem 0.75rem;
  border-radius: var(--osy-radius);
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.875rem;
}

.osy-submit {
  margin-top: 0.125rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--osy-radius);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(to right, #3b82f6, #4f46e5);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.osy-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.38);
  background: linear-gradient(to right, #2563eb, #4338ca);
}

.osy-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.osy-submit-arrow {
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .osy-submit:hover:not(:disabled) {
    transform: none;
  }
}

/* [hidden] + display:flex çakışmasını önle: aksi halde başlık sorgu öncesi görünür */
.osy-sonuc-view[hidden] {
  display: none !important;
}

.osy-sonuc-view:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.osy-sonuc-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.osy-sonuc-view-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1e293b;
}

.osy-yeni-sorgu {
  flex-shrink: 0;
  padding: 0.4rem 0.85rem;
  border-radius: var(--osy-radius);
  border: 1px solid var(--osy-line);
  background: #f8fafc;
  color: var(--osy-blue);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.osy-yeni-sorgu:hover {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.35);
}

.osy-sonuc-view .osy-sonuc {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.osy-sonuc {
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--osy-line);
}

.osy-sonuc-empty {
  text-align: center;
  padding: 1.25rem 0.5rem;
  color: var(--osy-muted);
  font-size: 0.875rem;
}

.osy-sonuc-meta {
  margin-bottom: 0.75rem;
}

.osy-sonuc-ad {
  display: block;
  font-size: 1rem;
}

.osy-sonuc-okul {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--osy-muted);
}

.osy-table-wrap {
  overflow-x: auto;
  border-radius: var(--osy-radius);
  border: 1px solid var(--osy-line);
}

.osy-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.osy-table-wrap th,
.osy-table-wrap td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--osy-line);
}

.osy-table-wrap th {
  background: #f8fafc;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--osy-muted);
}

.osy-table-wrap tr:last-child td {
  border-bottom: none;
}

.osy-koltuk-yok {
  color: #f97316;
  font-weight: 600;
}

.osy-no-sinav {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--osy-radius);
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.8125rem;
}

.osy-page-loading {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.osy-page-loading-inner {
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid var(--osy-line);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--osy-text);
}
