/* Kurumsal ödeme sayfası: sade lacivert tonlar, düz kartlar, standart güvenlik ikonları. */
:root {
  --primary: #1c4f9c;
  --primary-hover: #163f7e;
  --primary-rgb: 28, 79, 156;
  --success: #1e7d4f;
  --danger: #c0392b;
  --text: #16202e;
  --muted: #5b6878;
  --border: #d9dee5;
  --border-strong: #b9c2ce;
  --surface: #fff;
  --surface-muted: #f3f5f8;
  --radius: 4px;
  --radius-lg: 6px;
  --control-height: 42px;
  --focus-ring: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--surface-muted);
  color: var(--text);
  font: 400 14px/1.5 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Üst çubuk */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}

.topbar-inner {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: block;
  width: auto;
  height: 32px;
}

.secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--success);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* Sayfa */
.page {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 28px max(16px, env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

.lead {
  margin: 6px 0 0;
  color: var(--muted);
}

.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* Paket özeti */
.summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 16px 24px;
  border-left: 3px solid var(--primary);
}

.label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.product {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.plan {
  margin: 0;
  color: var(--text);
  font-weight: 500;
}

/* Form */
.form,
.status {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
}

legend {
  width: 100%;
  padding: 0;
  margin-bottom: 14px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

fieldset + fieldset legend {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.wide {
  grid-column: 1 / -1;
}

.req {
  color: var(--danger);
  font-weight: 600;
}

.required-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 9px 12px;
  background: var(--surface);
  color: var(--text);
  font: 400 14px/1.4 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6878' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 16px;
  text-overflow: ellipsis;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #98a2b0;
}

select:disabled {
  background-color: var(--surface-muted);
  color: var(--muted);
  cursor: not-allowed;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

input:user-invalid,
select:user-invalid,
textarea:user-invalid {
  border-color: var(--danger);
}

/* Tutar alanı: sağda TL eki */
.affix {
  position: relative;
  display: block;
}

.affix input {
  padding-right: 44px;
}

.suffix {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 500;
  pointer-events: none;
}

/* Butonlar */
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px 16px;
  background: var(--primary);
  color: #fff;
  font: 600 15px/1.3 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.primary:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.3);
}

.primary:disabled {
  opacity: 0.65;
  cursor: default;
}

.ghost {
  color: var(--primary);
  font-weight: 600;
  text-align: center;
}

.note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.note .icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--success);
}

/* Güvenlik ve kart logoları */
.trust {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding-top: 8px;
  text-align: center;
}

.trust ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.assurances {
  gap: 8px 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.assurances li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.assurances .icon {
  width: 15px;
  height: 15px;
  color: var(--success);
}

.brands {
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.brand svg {
  display: block;
  width: auto;
  height: 16px;
}

.brand:nth-child(2) svg {
  height: 22px;
}

.copyright {
  margin: 0;
  color: #8a94a3;
  font-size: 12px;
}

.error {
  margin: 0;
  border: 1px solid rgba(192, 57, 43, 0.35);
  border-left-width: 3px;
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fdf2f1;
  color: var(--danger);
  font-size: 13px;
}

.status-text {
  margin: 0;
  color: var(--muted);
}

#frameBox iframe {
  display: block;
  width: 100%;
  min-height: 640px;
  border: 0;
}

@media (max-width: 560px) {
  .page {
    padding-top: 20px;
    gap: 14px;
  }

  .logo {
    height: 28px;
  }

  h1 {
    font-size: 20px;
  }

  .card {
    padding: 18px 16px;
  }

  .summary {
    padding: 14px 16px;
  }

  fieldset {
    grid-template-columns: minmax(0, 1fr);
  }

  /* iOS 16px altındaki alanlarda odaklanınca sayfayı yakınlaştırır. */
  input,
  select,
  textarea {
    font-size: 16px;
  }

  /* Kart çerçevesi dar ekranda kenarlara kadar uzansın. */
  .status:has(#frameBox:not([hidden])) {
    margin: 0 -16px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    padding: 16px 8px;
  }
}
