/* Teklif al popup'i — her sayfada yuklenir (layouts/app).
   Yapi: .tk (ortu) > .tk__panel > .tk__yan (koyu marka seridi) + .tk__govde
   (form). Acilis: html'e degil, .tk'ya is-open; body'ye tk-acik. */

.tk {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow-y: auto;
    background: rgb(10 10 12 / 0.55);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.35s;
}

.tk.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}

body.tk-acik { overflow: hidden; }

.tk__panel {
    position: relative;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    width: min(960px, 100%);
    max-height: calc(100vh - 40px);
    border-radius: 22px;
    overflow: hidden;
    background: var(--surface, #fff);
    box-shadow: 0 40px 90px rgb(0 0 0 / 0.35);
    transform: translateY(28px) scale(0.98);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.tk.is-open .tk__panel { transform: none; opacity: 1; }

/* Sol serit */
.tk__yan {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: 36px 30px;
    color: #fff;
    background: linear-gradient(180deg, #1e1e23 0%, #141417 60%, #1a1012 100%);
    overflow: hidden;
}

.tk__yan::after {
    content: "";
    position: absolute;
    inset: auto -30% -40% -30%;
    height: 70%;
    background: radial-gradient(60% 60% at 50% 100%, rgb(227 34 44 / 0.6), transparent 70%);
    pointer-events: none;
}

.tk__amblem { width: 64px; height: auto; fill: var(--brand, #e20613); position: relative; z-index: 1; }

.tk__yan h2 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.tk__yan p {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: rgb(255 255 255 / 0.68);
}

.tk__adimlar {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
    font-size: 13px;
    color: rgb(255 255 255 / 0.78);
}

.tk__adimlar li { display: flex; align-items: center; gap: 10px; }

.tk__adimlar span {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: var(--brand, #e20613);
}

/* Govde */
.tk__govde {
    position: relative;
    padding: 34px 36px 30px;
    overflow-y: auto;
    max-height: calc(100vh - 40px);
}

.tk__kapat {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f0f0f3;
    color: #1d1d1f;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.tk__kapat:hover { background: #e4e4e9; transform: rotate(90deg); }
.tk__kapat svg { width: 14px; height: 14px; }

.tk__form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }

.tk__alan { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tk__alan--tam { grid-column: 1 / -1; }

.tk__alan label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-secondary, #6e6e73);
}

.tk__alan label i { font-style: normal; color: var(--brand, #e20613); }

.tk__alan input,
.tk__alan select,
.tk__alan textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid #dcdce1;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-size: 15px;
    color: var(--text, #1d1d1f);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.tk__alan select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%236e6e73' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding-right: 38px;
}

.tk__alan textarea { min-height: 96px; resize: vertical; }

.tk__alan input:focus,
.tk__alan select:focus,
.tk__alan textarea:focus {
    outline: none;
    border-color: var(--brand, #e20613);
    box-shadow: 0 0 0 4px rgb(226 6 19 / 0.12);
}

.tk__alan.is-hata input,
.tk__alan.is-hata select,
.tk__alan.is-hata textarea { border-color: var(--brand, #e20613); }

.tk__hata { display: none; font-size: 12px; color: var(--brand, #e20613); }
.tk__alan.is-hata .tk__hata { display: block; }

.tk__onay {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary, #6e6e73);
    cursor: pointer;
}

.tk__onay input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand, #e20613); flex: none; }
.tk__onay a { color: var(--text, #1d1d1f); text-decoration: underline; }
.tk__onay.is-hata { color: var(--brand, #e20613); }
.tk__onay.is-hata a { color: inherit; }

.tk__alt {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 6px;
}

.tk__gonder {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: var(--brand, #e20613);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.tk__gonder:hover { background: var(--brand-dark, #c00510); transform: translateY(-1px); }
.tk__gonder[disabled] { opacity: 0.6; cursor: wait; transform: none; }
.tk__gonder svg { width: 14px; height: 14px; }

.tk__genel-hata {
    grid-column: 1 / -1;
    display: none;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgb(226 6 19 / 0.08);
    font-size: 13px;
    color: var(--brand, #e20613);
}

.tk__genel-hata.is-acik { display: block; }

/* Basari */
.tk__basari {
    display: none;
    text-align: center;
    padding: 30px 10px 10px;
}

.tk.is-bitti .tk__form { display: none; }
.tk.is-bitti .tk__basari { display: block; }

.tk__tik {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgb(226 6 19 / 0.1);
    color: var(--brand, #e20613);
}

.tk__tik svg { width: 32px; height: 32px; }
.tk__tik path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: tk-tik 0.6s ease 0.2s forwards; }

@keyframes tk-tik { to { stroke-dashoffset: 0; } }

.tk__basari h3 { margin: 0 0 8px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.tk__basari p { margin: 0 auto; max-width: 42ch; font-size: 15px; line-height: 1.5; color: var(--text-secondary, #6e6e73); }
.tk__basari small { display: block; margin-top: 14px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary, #86868b); }

.tk__basari .tk__gonder { margin-top: 22px; }

/* Urun detaydaki tetikleyici */
.fpd-teklif {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    min-height: 42px;
    padding: 0 18px 0 20px;
    border-radius: 999px;
    background: #fff;
    color: var(--brand, #e20613);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fpd-teklif:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgb(0 0 0 / 0.25); }
.fpd-teklif svg { width: 7px; height: 11px; }

@media (max-width: 860px) {
    .tk { padding: 0; align-items: end; }
    .tk__panel {
        grid-template-columns: 1fr;
        width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 22px 22px 0 0;
    }
    .tk__yan { display: none; }
    .tk__govde { padding: 26px 20px 28px; max-height: 100dvh; }
    .tk__form { grid-template-columns: 1fr; }
    .tk__alt { flex-direction: column; align-items: stretch; }
    .tk__gonder { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .tk, .tk__panel, .tk__kapat, .tk__gonder { transition: none; }
    .tk__tik path { animation: none; stroke-dashoffset: 0; }
}
