/* ==========================================================
   Dijiben — Kurulum sihirbazı
   ========================================================== */

:root {
    --s-bg: #f4f4f2;
    --s-surface: #ffffff;
    --s-ink: #18181b;
    --s-muted: #71717a;
    --s-line: #e4e4e1;
    --s-line-strong: #d4d4d0;
    --s-focus: #18181b;
    --s-danger: #b42318;
    --s-ok: #15803d;

    --bs-body-font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-body-color: var(--s-ink);
    --bs-body-bg: var(--s-bg);
    --bs-border-color: var(--s-line);
    --bs-border-radius: 10px;
    --bs-border-radius-lg: 12px;
    --bs-primary: #18181b;
    --bs-primary-rgb: 24, 24, 27;
    --bs-link-color: #18181b;
    --bs-link-hover-color: #000;
}

body {
    background: var(--s-bg);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "ss01", "cv11";
    font-size: 15px;
}

/* Üst bar */
.s-top {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 20px;
    border-bottom: 1px solid var(--s-line);
    background: var(--s-surface);
    position: sticky;
    top: 0;
    z-index: 20;
}

.s-top img {
    height: 26px;
}

.s-top-r {
    display: flex;
    align-items: center;
    gap: 8px;
}

.s-top .form-select {
    height: 36px;
    padding: 0 32px 0 12px;
    font-size: 14px;
    width: auto;
    background-position: right 10px center;
}

/* Yerleşim */
.s-shell {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 20px 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
}

@media (min-width: 992px) {
    .s-shell {
        grid-template-columns: minmax(0, 1fr) 340px;
        align-items: start;
    }
}

.s-intro h1 {
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -.025em;
    margin: 0 0 6px;
}

.s-intro p {
    color: var(--s-muted);
    margin: 0 0 24px;
}

.s-intro code {
    color: var(--s-ink);
    background: #ebebe8;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 13px;
}

/* Adımlar */
.s-steps {
    display: flex;
    gap: 6px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.s-steps li {
    flex: 1;
    min-width: 0;
}

.s-steps button {
    all: unset;
    display: block;
    width: 100%;
    cursor: pointer;
}

.s-steps button[disabled] {
    cursor: default;
}

.s-steps .bar {
    display: block;
    height: 4px;
    border-radius: 99px;
    background: var(--s-line);
    margin-bottom: 8px;
    transition: background .2s ease;
}

.s-steps .lbl {
    display: block;
    font-size: 13px;
    color: var(--s-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.s-steps .lbl b {
    font-weight: 500;
    color: #a1a1aa;
    margin-right: 4px;
    font-variant-numeric: tabular-nums;
}

.s-steps li.is-done .bar,
.s-steps li.is-active .bar {
    background: var(--s-ink);
}

.s-steps li.is-active .lbl {
    color: var(--s-ink);
    font-weight: 550;
}

@media (max-width: 575.98px) {
    .s-steps li:not(.is-active) .lbl {
        visibility: hidden;
    }
}

/* Kart */
.s-card {
    background: var(--s-surface);
    border: 1px solid var(--s-line);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(24, 24, 27, .04);
}

.s-pane {
    display: none;
    padding: 28px 28px 8px;
}

.s-pane.is-active {
    display: block;
    animation: s-in .2s ease;
}

@media (max-width: 575.98px) {
    .s-pane {
        padding: 22px 18px 4px;
    }
}

.s-pane h2 {
    font-size: 19px;
    font-weight: 620;
    letter-spacing: -.015em;
    margin: 0 0 4px;
}

.s-pane > p.s-desc {
    color: var(--s-muted);
    margin: 0 0 24px;
    font-size: 14.5px;
}

.s-sub {
    font-size: 13px;
    font-weight: 600;
    color: var(--s-ink);
    margin: 28px 0 4px;
}

.s-sub + .s-hint {
    margin-bottom: 14px;
}

.s-hint {
    color: var(--s-muted);
    font-size: 13px;
    margin: 6px 0 0;
}

.s-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 28px 24px;
    border-top: 1px solid var(--s-line);
    margin-top: 24px;
}

@media (max-width: 575.98px) {
    .s-nav {
        position: sticky;
        bottom: 0;
        background: var(--s-surface);
        border-radius: 0 0 18px 18px;
        padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
        z-index: 5;
    }
}

.s-nav .s-skip {
    margin-right: auto;
}

/* Form öğeleri */
.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 550;
    margin-bottom: 6px;
}

.form-label .opt {
    color: #a1a1aa;
    font-weight: 400;
    margin-left: 4px;
}

.form-control,
.form-select {
    height: 46px;
    background-color: #fff;
    border-color: var(--s-line-strong);
    font-size: 15px;
    box-shadow: none !important;
    transition: border-color .12s ease, box-shadow .12s ease;
}

textarea.form-control {
    height: auto;
    min-height: 46px;
    padding-top: 11px;
}

.form-control::placeholder {
    color: #a1a1aa;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--s-focus);
    box-shadow: 0 0 0 3px rgba(24, 24, 27, .08) !important;
}

.form-control.is-invalid {
    border-color: var(--s-danger);
    background-image: none;
    padding-right: 12px;
}

.invalid-feedback {
    color: var(--s-danger);
    font-size: 12.5px;
}

.input-group-text {
    background: #fafaf9;
    border-color: var(--s-line-strong);
    color: var(--s-muted);
    font-size: 14px;
}

.btn {
    height: 44px;
    white-space: nowrap;
    padding: 0 18px;
    font-weight: 550;
    font-size: 14.5px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-sm {
    height: 34px;
    padding: 0 12px;
    font-size: 13.5px;
    border-radius: 8px;
}

.btn-dark {
    --bs-btn-bg: #18181b;
    --bs-btn-border-color: #18181b;
    --bs-btn-hover-bg: #000;
    --bs-btn-hover-border-color: #000;
    --bs-btn-active-bg: #000;
    --bs-btn-disabled-bg: #3f3f46;
    --bs-btn-disabled-border-color: #3f3f46;
}

.btn-quiet {
    background: transparent;
    border: 1px solid var(--s-line-strong);
    color: var(--s-ink);
}

.btn-quiet:hover {
    background: #fafaf9;
    border-color: #a1a1aa;
}

.btn-text {
    background: transparent;
    border: 0;
    color: var(--s-muted);
    padding: 0 6px;
}

.btn-text:hover {
    color: var(--s-ink);
}

.btn-icon {
    width: 44px;
    padding: 0;
    flex: 0 0 44px;
}

/* Fotoğraf */
.s-photo {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 26px;
}

.s-photo-img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    background: #ebebe8;
    flex: 0 0 88px;
    display: grid;
    place-items: center;
    color: #a1a1aa;
    font-size: 30px;
    overflow: hidden;
    border: 1px solid var(--s-line);
}

.s-photo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s-photo-act {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Kırpma penceresi */
.s-crop {
    height: min(60vh, 380px);
    background: #0f0f10;
    border-radius: 12px;
    overflow: hidden;
}

.s-crop img {
    display: block;
    max-width: 100%;
}

.s-crop .cropper-view-box,
.s-crop .cropper-face {
    border-radius: 50%;
}

.s-crop .cropper-view-box {
    outline: 2px solid #fff;
    outline-color: rgba(255, 255, 255, .9);
}

.s-zoom {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    color: var(--s-muted);
}

.s-zoom input {
    flex: 1;
    accent-color: #18181b;
}

.modal-content {
    border: 0;
    border-radius: 18px;
}

.modal-header,
.modal-footer {
    border: 0;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
}

/* İsteğe bağlı alan çipleri */
.s-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.s-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 99px;
    border: 1px dashed var(--s-line-strong);
    background: transparent;
    color: var(--s-ink);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}

.s-chip:hover {
    border-color: #a1a1aa;
    background: #fafaf9;
}

.s-chip i {
    color: var(--s-muted);
}

.s-opt-field {
    position: relative;
}

.s-remove {
    position: absolute;
    top: -2px;
    right: 0;
    border: 0;
    background: transparent;
    color: var(--s-muted);
    font-size: 12.5px;
    padding: 0;
}

.s-remove:hover {
    color: var(--s-danger);
}

/* Platform seçici */
.s-platforms {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 8px;
}

.s-plat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 6px 10px;
    border: 1px solid var(--s-line);
    border-radius: 12px;
    background: var(--s-surface);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--s-ink);
    cursor: pointer;
    position: relative;
    transition: border-color .12s ease, background .12s ease;
    min-width: 0;
}

.s-plat img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.s-plat span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.s-plat:hover {
    border-color: #a1a1aa;
}

.s-plat.is-on {
    border-color: var(--s-ink);
    background: #fafaf9;
}

.s-plat.is-on::after {
    content: "\F26E";
    font-family: "bootstrap-icons";
    position: absolute;
    top: 6px;
    right: 7px;
    font-size: 14px;
    color: var(--s-ink);
}

.s-more {
    margin-top: 10px;
}

.s-links {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
}

.s-link {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.s-link .input-group-text img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.s-link .input-group-text.pre {
    max-width: 46%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
    height: 46px;
    line-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 4px;
    border-left: 0;
    border-right: 0;
    background: var(--s-surface);
    font-size: 13.5px;
}

.s-link .input-group > .form-control {
    border-left: 0;
    padding-left: 0;
}

.s-link .input-group:focus-within .input-group-text {
    border-color: var(--s-focus);
}

/* Ek bilgi satırları */
.s-extras {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.s-extra {
    display: grid;
    grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
}

.s-extra-act {
    display: flex;
    gap: 6px;
}

.s-extra:first-child [data-up] {
    visibility: hidden;
}

@media (max-width: 575.98px) {
    .s-extra {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .s-extra textarea {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* Platform sayacı */
.s-plat em {
    position: absolute;
    top: 5px;
    left: 7px;
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    color: var(--s-muted);
}

/* Açık / kapalı seçimi */
.s-switches {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--s-line-strong);
    border-radius: 10px;
    background: #fafaf9;
}

.s-switch {
    margin: 0;
    cursor: pointer;
}

.s-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.s-switch span {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    color: var(--s-muted);
    transition: background .12s ease, color .12s ease;
}

.s-switch input:checked + span {
    background: var(--s-surface);
    color: var(--s-ink);
    box-shadow: 0 1px 2px rgba(24, 24, 27, .12);
}

.s-switch input:focus-visible + span {
    outline: 2px solid var(--s-ink);
}

/* Renk temaları */
.s-themes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 10px;
}

.s-theme {
    border: 1px solid var(--s-line);
    border-radius: 12px;
    padding: 6px;
    background: var(--s-surface);
    cursor: pointer;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--s-muted);
    transition: border-color .12s ease;
}

.s-theme .sw {
    display: block;
    height: 46px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    margin-bottom: 6px;
}

.s-theme .sw i {
    position: absolute;
    left: 8px;
    bottom: 7px;
    width: 30px;
    height: 8px;
    border-radius: 4px;
}

.s-theme:hover {
    border-color: #a1a1aa;
}

.s-theme.is-on {
    border-color: var(--s-ink);
    box-shadow: 0 0 0 1px var(--s-ink);
    color: var(--s-ink);
}

.s-colors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.s-color {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--s-line-strong);
    border-radius: 10px;
    padding: 0 12px 0 6px;
    height: 46px;
}

.s-color input[type="color"] {
    width: 34px;
    height: 34px;
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
    flex: 0 0 34px;
}

.s-color input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.s-color input[type="color"]::-webkit-color-swatch {
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 8px;
}

.s-color input[type="color"]::-moz-color-swatch {
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 8px;
}

.s-color span {
    font-size: 13px;
    line-height: 1.2;
}

.s-color code {
    display: block;
    color: var(--s-muted);
    font-size: 12px;
}

/* Logo */
.s-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.s-logo-box {
    width: 120px;
    height: 64px;
    border: 1px dashed var(--s-line-strong);
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #a1a1aa;
    overflow: hidden;
    flex: 0 0 120px;
    background: #fafaf9;
}

.s-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 6px;
}

.s-note {
    font-size: 13px;
    color: var(--s-muted);
    background: #fafaf9;
    border: 1px solid var(--s-line);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 26px;
}

.s-note p:last-child {
    margin-bottom: 0;
}

.s-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid #f3c7c3;
    background: #fef3f2;
    color: #7a271a;
    margin-bottom: 16px;
}

/* Önizleme */
.s-preview {
    position: sticky;
    top: 96px;
}

.s-preview-h {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--s-muted);
    margin-bottom: 12px;
}

.s-preview-h b {
    color: var(--s-ink);
    font-weight: 600;
}

.s-phone {
    width: 100%;
    max-width: 320px;
    height: 640px;
    margin: 0 auto;
    border-radius: 44px;
    border: 10px solid #18181b;
    background: #18181b;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px -30px rgba(24, 24, 27, .35);
}

.s-phone::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 84px;
    height: 22px;
    margin-left: -42px;
    border-radius: 99px;
    background: #18181b;
    z-index: 5;
}

.s-phone-in {
    height: 100%;
    overflow-y: auto;
    border-radius: 34px;
    background: #f4f4f2;
    scrollbar-width: none;
}

.s-phone-in::-webkit-scrollbar {
    display: none;
}

.pv .dc-bar {
    position: sticky;
    bottom: 0;
}

.pv .dc-foot {
    padding-bottom: 24px;
}

.pv .dc-name:empty::before {
    content: attr(data-ph);
    color: #c4c4c0;
}

.s-preview-fab {
    position: fixed;
    right: 16px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    z-index: 30;
    border-radius: 99px;
    box-shadow: 0 10px 30px -10px rgba(24, 24, 27, .5);
}

.offcanvas-bottom.s-oc {
    height: 92vh;
    border-radius: 18px 18px 0 0;
}

.s-oc .s-phone {
    height: 100%;
    max-width: 380px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.s-oc .s-phone::before {
    display: none;
}

.s-oc .s-phone-in {
    border-radius: 14px;
}

.s-saving {
    position: fixed;
    inset: 0;
    background: rgba(244, 244, 242, .86);
    display: none;
    place-items: center;
    z-index: 100;
    font-weight: 550;
}

.s-saving.is-on {
    display: grid;
}

.s-saving div {
    display: flex;
    align-items: center;
    gap: 12px;
}

@keyframes s-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

/* intl-tel-input uyumu */
.iti {
    width: 100%;
}

.iti__country-list {
    border-radius: 10px;
    border-color: var(--s-line);
    box-shadow: 0 12px 30px -12px rgba(24, 24, 27, .25);
    font-size: 14px;
}

/* Google Places önerileri */
.pac-container {
    border-radius: 10px;
    border: 1px solid var(--s-line);
    box-shadow: 0 12px 30px -12px rgba(24, 24, 27, .25);
    font-family: inherit;
    margin-top: 4px;
}

.s-links:empty {
    margin: 0;
}

.s-link .input-group-text:first-child {
    background: var(--s-surface);
    border-right: 0;
    padding-right: 8px;
}

.s-link .input-group > .form-control {
    height: 46px;
}

/* JavaScript yüklenemezse tüm bölümler görünür kalsın, form yine kaydedilebilsin */
#editorForm:not(.js) .s-pane {
    display: block;
}

#editorForm:not(.js) .s-opt-field[hidden] {
    display: block !important;
}
