/*
 * Supsis demo (deneme hesabı) formu v2: tek dosya, çerçeve kütüphanesi yok.
 * Bootstrap, Material Icons ve bayrak sprite'ı (flag.css, 114 KB) kaldırıldı: ikonlar satır içi SVG, bayraklar emoji.
 * Sayfalar src/template.html + src/i18n.js'ten build.js ile üretilir; stil değişikliği yalnız burada yapılır.
 * Düzen: ortalanmış tek form kartı (en çok 520 px); dar ekranda iç boşluklar küçülür.
 */
:root {
    /* supsis.com/tr/demo ile aynı dil: Inter, nötr gri çizgiler, tam yuvarlak mor düğmeler, mor → pembe geçişli vurgu */
    --df-primary: #5625cc;
    --df-primary-dark: #4519ad;
    --df-primary-soft: #f3effd;
    --df-ink: #171717;
    --df-text: #4a4760;
    --df-muted: #76738c;
    --df-line: #e6e4ee;
    --df-field: #ffffff;
    --df-surface: #ffffff;
    --df-danger: #c62f3d;
    --df-danger-soft: #fdeef0;
    --df-success: #1a8a52;
    --df-success-soft: #e8f7ef;
    --df-radius: 12px;
    --df-accent: linear-gradient(90deg, #5f39fe 0%, #9b5be6 50%, #e0679f 100%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--df-text);
    background: transparent;
    -webkit-font-smoothing: antialiased;
}

[hidden] {
    display: none !important;
}

.df {
    max-width: 560px;
    margin: 0 auto;
    /* üst sayfa iframe'i -20 px taşırır; gölge kesilmesin diye yanlarda boşluk */
    padding: 20px 20px 28px;
}

/* ---------- Form kartı ---------- */
.df-card {
    position: relative;
    background: var(--df-surface);
    border: 1px solid rgba(86, 37, 204, 0.1);
    border-radius: 24px;
    box-shadow: 0 24px 48px -28px rgba(86, 37, 204, 0.28);
    padding: 28px 32px 30px;
    min-width: 0;
}

.df-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--df-muted);
}

.df-step-item {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* Şerit kartın tüm genişliğine yayılır: ilk adım solda, sonuncu sağ kenarda, aradaki çizgiler eşit uzar */
.df-step-item + .df-step-item {
    /* auto taban: boşluk adım adlarına değil çizgilere eşit dağılır */
    flex: 1 1 auto;
}

.df-step-item + .df-step-item::before {
    content: "";
    flex: 1;
    min-width: 12px;
    height: 1px;
    margin-right: 4px;
    background: var(--df-line);
}

.df-step-item.is-active::before,
.df-step-item.is-done::before {
    background: var(--df-primary);
    opacity: 0.35;
}

.df-step-dot {
    /* rakam tam ortada: sabit ölçülü kutu, satır yüksekliği 1, eş genişlikli rakamlar (Inter'in "1"i dar olduğu için kayıyordu) */
    flex: none;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
    background: var(--df-field);
    border: 1px solid var(--df-line);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-align: center;
    color: var(--df-muted);
}

.df-step-item.is-active {
    color: var(--df-ink);
}

.df-step-item.is-active .df-step-dot {
    background: var(--df-primary);
    border-color: var(--df-primary);
    color: #fff;
}

.df-step-item.is-done .df-step-dot {
    background: var(--df-success-soft);
    border-color: transparent;
    color: var(--df-success);
}

.df-title {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 500;
    color: var(--df-ink);
    letter-spacing: -0.03em;
}

.df-title span {
    background: var(--df-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.df-sub {
    margin: 0 0 22px;
    font-size: 14.5px;
    color: var(--df-muted);
}

.df-group {
    margin-bottom: 16px;
}

.df-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--df-ink);
}

.df-control {
    display: flex;
    align-items: stretch;
    height: 48px;
    border: 1px solid var(--df-line);
    border-radius: var(--df-radius);
    background: var(--df-field);
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.df-control:focus-within {
    border-color: var(--df-primary);
    background: var(--df-surface);
    box-shadow: 0 0 0 3px rgba(86, 37, 204, 0.12);
}

.df-group.is-invalid .df-control {
    border-color: var(--df-danger);
    box-shadow: none;
}

.df-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    /* 16px: iOS Safari odaklanınca sayfayı büyütmesin */
    font-size: 16px;
    color: var(--df-ink);
}

.df-input::placeholder {
    color: #a9a7c0;
    font-size: 14.5px;
}

.df-input[type="number"]::-webkit-outer-spin-button,
.df-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.df-affix {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--df-muted);
    white-space: nowrap;
    user-select: none;
}

.df-affix--pre {
    border-right: 1px solid var(--df-line);
}

.df-affix--post {
    border-left: 1px solid var(--df-line);
}

.df-error {
    display: none;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--df-danger);
}

.df-group.is-invalid .df-error {
    display: block;
}

/* ---------- Telefon: ülke seçici ---------- */
.df-phone {
    position: relative;
}

.df-country {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px 0 14px;
    border: 0;
    border-right: 1px solid var(--df-line);
    background: transparent;
    font: inherit;
    font-size: 14.5px;
    color: var(--df-ink);
    cursor: pointer;
    border-radius: var(--df-radius) 0 0 var(--df-radius);
}

.df-country:hover {
    background: var(--df-primary-soft);
}

.df-country svg {
    width: 14px;
    height: 14px;
    color: var(--df-muted);
}

.df-flag {
    font-size: 18px;
    line-height: 1;
}

.df-country-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    width: min(320px, 100%);
    border: 1px solid var(--df-line);
    border-radius: var(--df-radius);
    background: var(--df-surface);
    box-shadow: 0 16px 40px rgba(29, 27, 58, 0.16);
    overflow: hidden;
}

.df-country-search {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 0;
    border-bottom: 1px solid var(--df-line);
    outline: 0;
    font: inherit;
    font-size: 16px;
    color: var(--df-ink);
    background: var(--df-field);
}

.df-country-list {
    max-height: 220px;
    margin: 0;
    padding: 6px;
    list-style: none;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.df-country-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--df-ink);
    cursor: pointer;
}

.df-country-option:hover,
.df-country-option.is-active {
    background: var(--df-primary-soft);
}

.df-country-option span:last-child {
    margin-left: auto;
    color: var(--df-muted);
}

/* ---------- Alan adı ---------- */
.df-domain-status {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.df-domain-status svg {
    width: 18px;
    height: 18px;
}

.df-domain-status[data-state="ok"] {
    color: var(--df-success);
}

.df-domain-status[data-state="taken"] {
    color: var(--df-danger);
}

.df-domain-status[data-state="error"] {
    color: #c98a12;
}

.df-domain-status[data-state="loading"] {
    border: 2px solid var(--df-line);
    border-top-color: var(--df-primary);
    border-radius: 50%;
    animation: df-spin 0.7s linear infinite;
}

.df-hint {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--df-muted);
}

.df-hint svg {
    flex: none;
    width: 15px;
    height: 15px;
    margin-top: 2px;
}

.df-hint b {
    font-weight: 600;
    color: var(--df-ink);
}

.df-note {
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--df-success);
}

.df-note[data-state="taken"] {
    color: var(--df-danger);
}

/* ---------- Kupon ---------- */
.df-link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--df-primary);
    cursor: pointer;
}

.df-link:hover {
    text-decoration: underline;
}

.df-link:disabled {
    color: var(--df-muted);
    cursor: default;
    text-decoration: none;
}

.df-coupon-hint {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
}

.df-coupon-hint[data-state="ok"] {
    color: var(--df-success);
}

.df-coupon-hint[data-state="bad"] {
    color: var(--df-danger);
}

/* ---------- Sözleşme ---------- */
.df-agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--df-text);
    cursor: pointer;
}

.df-agree input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--df-primary);
    cursor: pointer;
}

.df-agree a {
    color: var(--df-primary);
    font-weight: 500;
    text-decoration: none;
}

.df-agree a:hover {
    text-decoration: underline;
}

.df-agree.is-invalid {
    color: var(--df-danger);
}

/* ---------- Düğmeler ---------- */
.df-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: var(--df-primary);
    font: inherit;
    font-size: 15.5px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.df-btn:hover {
    background: var(--df-primary-dark);
}

.df-btn:active {
    transform: translateY(1px);
}

.df-btn:disabled {
    background: #c9bfee;
    cursor: default;
    transform: none;
}

.df-btn svg {
    width: 18px;
    height: 18px;
}

.df-btn.is-loading {
    pointer-events: none;
}

.df-btn.is-loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: df-spin 0.7s linear infinite;
}

.df-btn.is-loading svg {
    display: none;
}

.df-btn--ghost {
    background: var(--df-primary-soft);
    color: var(--df-primary);
}

.df-btn--ghost:hover {
    background: #e6defb;
}

.df-btn--ghost:disabled {
    background: var(--df-field);
    color: var(--df-muted);
}

.df-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 12px 0 0;
    font-size: 12.5px;
    color: var(--df-muted);
}

.df-foot svg {
    width: 14px;
    height: 14px;
}

.df-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    background: var(--df-danger-soft);
    color: var(--df-danger);
}

/* ---------- Doğrulama ---------- */
.df-center {
    text-align: center;
}

.df-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: var(--df-primary-soft);
    color: var(--df-primary);
}

.df-badge svg {
    width: 26px;
    height: 26px;
}

.df-pin-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
}

.df-pin-box {
    width: 58px;
    height: 64px;
    padding: 0;
    border: 1px solid var(--df-line);
    border-radius: 14px;
    background: var(--df-surface);
    outline: 0;
    font: inherit;
    font-size: 26px;
    font-weight: 600;
    text-align: center;
    color: var(--df-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.df-pin-box:focus {
    border-color: var(--df-primary);
    box-shadow: 0 0 0 3px rgba(86, 37, 204, 0.12);
}

.df-pin-row.is-invalid .df-pin-box {
    border-color: var(--df-danger);
}

.df-pin-row.is-invalid {
    animation: df-shake 0.3s ease;
}

.df-pin-error {
    min-height: 20px;
    margin: 10px 0 12px;
    font-size: 13px;
    color: var(--df-danger);
}

.df-resend {
    margin: 16px 0 0;
    font-size: 13.5px;
    color: var(--df-muted);
}

/* ---------- Başarı ---------- */
.df-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--df-success);
    animation: df-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.df-check svg {
    width: 36px;
    height: 36px;
}

/* Son hâli çizili tik: animasyon çalışmasa da (arka plan sekmesi, hareket azaltma) işaret görünür kalır */
.df-check path {
    stroke-dasharray: 60;
    stroke-dashoffset: 0;
    animation: df-draw 0.45s ease 0.25s backwards;
}

.df-next {
    margin: 0 0 20px;
    padding: 14px 16px;
    border-radius: var(--df-radius);
    background: var(--df-primary-soft);
    font-size: 13.5px;
    line-height: 1.55;
    text-align: left;
    color: var(--df-text);
}

.df-next b {
    color: var(--df-ink);
    font-weight: 600;
}

/* ---------- Sağdan sola (Arapça) ---------- */
[dir="rtl"] .df-next {
    text-align: right;
}

/* alan adı, telefon ve kod her dilde soldan sağa yazılır */
[dir="rtl"] .df-control--ltr {
    direction: ltr;
}

[dir="rtl"] .df-control--ltr .df-input::placeholder {
    text-align: right;
}

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

@keyframes df-pop {
    from {
        transform: scale(0.4);
        opacity: 0;
    }
}

@keyframes df-draw {
    from {
        stroke-dashoffset: 60;
    }
}

@keyframes df-shake {
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* ---------- Dar ekran ---------- */
@media (max-width: 560px) {
    .df {
        padding: 12px;
    }

    .df-card {
        padding: 22px 20px 24px;
    }

    .df-title {
        font-size: 22px;
    }
}

@media (max-width: 420px) {
    .df {
        padding: 8px;
    }

    .df-card {
        padding: 18px 14px 20px;
    }

    .df-steps {
        gap: 6px;
        font-size: 12px;
    }

    /* yalnız etkin adımın adı görünür, diğerleri numara */
    .df-step-item:not(.is-active) .df-step-name {
        display: none;
    }

    .df-affix {
        padding: 0 8px;
        font-size: 13px;
    }

    .df-affix--pre {
        display: none;
    }

    .df-pin-row {
        gap: 8px;
    }

    .df-pin-box {
        width: 52px;
        height: 58px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

}
