/* ===== Tercih Sihirbazı — açık UniTercih UI ===== */

.pk-wiz-prompt {
  position: absolute;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(12px);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(400px, calc(100vw - 24px));
}

.pk-wiz-prompt.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.pk-wiz-prompt-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pk-wiz-prompt-logo {
  display: block;
  width: auto;
  height: 36px;
  object-fit: contain;
  margin-bottom: 2px;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.pk-wiz-prompt-inner strong {
  font-size: 15px;
  font-weight: 800;
}

.pk-wiz-prompt-inner span {
  font-size: 13px;
  line-height: 1.35;
}

.pk-wiz-prompt-btn {
  align-self: flex-start;
  margin-top: 4px;
}

.pk-wiz-modal {
  position: absolute;
  inset: 0;
  z-index: 75;
  display: none;
  align-items: stretch;
  justify-content: center;
}

.pk-wiz-modal.open {
  display: flex;
}

.pk-wiz-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 30, 0.45);
}

.pk-wiz-panel {
  position: relative;
  z-index: 1;
  margin: auto;
  width: min(1180px, calc(100vw - 12px));
  height: min(92dvh, 900px);
  display: flex;
  flex-direction: column;
  background: #e8eaed;
  color: #1a1d22;
  border: 2px solid var(--pk-ui-border, #e30613);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--pk-ui-shadow, 0 20px 60px rgba(0, 0, 0, 0.28));
}

.pk-wiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #d8dce2;
  color: #1a1d22;
  border-bottom: 2px solid #e30613;
  flex-shrink: 0;
}

.pk-wiz-head-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pk-wiz-head-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.pk-wiz-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #1a1d22;
}

.pk-wiz-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: #5a616c;
}

.pk-wiz-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pk-wiz-ext {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 8px;
  background: #e30613;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.pk-wiz-ext:hover {
  filter: brightness(1.08);
}

.pk-wiz-close {
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #c5cad3;
  color: #1a1d22;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.pk-wiz-close:hover {
  background: #b4bac4;
}

.pk-wiz-frame-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #e8eaed;
}

.pk-wiz-frame[hidden],
.pk-wiz-fallback[hidden] {
  display: none !important;
}

.pk-wiz-frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #e8eaed;
}

.pk-wiz-fallback {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 20px;
  text-align: center;
  background: #e8eaed;
  color: #1a1d22;
}

.pk-wiz-fallback-logo {
  display: block;
  width: auto;
  height: 48px;
  object-fit: contain;
  margin-bottom: 6px;
}

.pk-wiz-fallback strong {
  font-size: 18px;
  font-weight: 800;
  color: #1a1d22;
}

.pk-wiz-fallback p {
  margin: 0;
  max-width: 420px;
  font-size: 14px;
  line-height: 1.5;
  color: #5a616c;
}

.pk-wiz-fallback code {
  font-size: 12px;
  color: #c10510;
}

.pk-wiz-fallback-btn {
  margin-top: 10px;
  text-decoration: none;
  min-height: 44px;
  padding: 12px 22px;
}

.pk-wiz-hint {
  margin: 0;
  padding: 8px 14px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  font-size: 12px;
  color: #5a616c;
  background: #d8dce2;
  border-top: 1px solid #c5cad3;
}

body.pk-wiz-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .pk-wiz-prompt {
    bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));
    max-width: calc(100vw - 16px);
  }

  .pk-wiz-modal {
    align-items: stretch;
  }

  .pk-wiz-panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .pk-wiz-head {
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
    gap: 8px;
  }

  .pk-wiz-head-logo {
    height: 26px;
  }

  .pk-wiz-head h2 {
    font-size: 15px;
  }

  .pk-wiz-ext {
    font-size: 11px;
    padding: 8px 10px;
    max-width: 38vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pk-wiz-close {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  .pk-wiz-frame {
    min-height: 0;
  }

  .pk-wiz-hint {
    font-size: 11px;
    line-height: 1.4;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
}
