/* freeform / fb-01 — Boş Tek Sütun Canvas
 * Generic element stilleri: heading/text/image/button/divider/spacer
 * Mobil otomatik: clamp() font + max-width:100% image
 */
.blok-fb-01 {
    padding: 0;
    margin-block: 0;
    background: var(--tema-bg);
}
.fb-01-wrap {
    max-width: var(--blok-container-max); margin: 0 auto; padding: 0 20px;
}
.fb-01-canvas {
    display: flex; flex-direction: column;
    gap: clamp(12px, 2vw, 22px);
}
/* Edit mode'da boş canvas için minimum yükseklik (drop hedefi görünsün) */
.blok-edit-mode .fb-01-canvas:empty {
    min-height: 80px;
}

/* === Heading === */
.ff-heading {
    margin: 0; font-family: var(--font-heading);
    font-weight: var(--font-weight-heading, 700);
    color: var(--tema-text);
    letter-spacing: -.01em; line-height: 1.15;
}
.ff-h2 { font-size: clamp(28px, 4.5vw, 48px); }
.ff-h3 { font-size: clamp(22px, 3.5vw, 36px); }
.ff-h4 { font-size: clamp(18px, 2.8vw, 28px); }
.ff-h5 { font-size: clamp(16px, 2.2vw, 22px); }
.ff-h6 { font-size: clamp(14px, 1.8vw, 18px); }

/* === Text === */
.ff-text {
    margin: 0; font-family: var(--font-body);
    font-size: clamp(14px, 1.8vw, 17px);
    line-height: 1.65; color: var(--tema-text);
}
.ff-text p { margin: 0 0 8px; }
.ff-text p:last-child { margin-bottom: 0; }
.ff-text strong { font-weight: 700; }
.ff-text em { font-style: italic; }
.ff-text a { color: var(--tema-primary); text-decoration: underline; text-underline-offset: 2px; }
.ff-text ul, .ff-text ol { margin: 0 0 8px 1.4em; padding: 0; }

/* === Image === */
.ff-image {
    display: flex;
}
.ff-image img {
    max-width: 100%; height: auto; display: block;
    border-radius: 8px;
}

/* === Button === */
.ff-button-wrap { display: flex; }
.ff-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 24px;
    font-family: var(--font-body); font-size: 14px; font-weight: 600;
    text-decoration: none; cursor: pointer;
    border-radius: 8px;
    transition: all .15s;
}
.ff-btn-primary {
    background: var(--tema-primary, #0d9488); color: var(--tema-primary-text, #fff);
}
.ff-btn-primary:hover {
    background: color-mix(in srgb, var(--tema-primary, #0d9488) 80%, black);
    transform: translateY(-1px);
}
.ff-btn-outline {
    background: transparent; color: var(--tema-text);
    border: 1.5px solid var(--tema-text);
}
.ff-btn-outline:hover {
    background: var(--tema-text); color: var(--tema-bg);
}
.ff-btn-ghost {
    background: transparent; color: var(--tema-text);
    border: 0; padding: 8px 0;
    border-bottom: 1.5px solid var(--tema-text);
    border-radius: 0;
}
.ff-btn-ghost:hover { color: var(--tema-primary); border-color: var(--tema-primary); }

/* === Divider === */
.ff-divider {
    border: 0; height: 1px;
    background: var(--tema-border, #e2e8f0);
    margin: 8px 0;
}

/* === Spacer === */
.ff-spacer { width: 100%; }

/* === Align === */
.ff-align-left   { text-align: left;   justify-content: flex-start; }
.ff-align-center { text-align: center; justify-content: center; }
.ff-align-right  { text-align: right;  justify-content: flex-end; }
.ff-align-justify{ text-align: justify; }

/* === Empty state (edit mode) === */
.ff-empty {
    padding: 48px 24px; text-align: center;
    background: color-mix(in srgb, var(--tema-text) 3%, transparent);
    border: 2px dashed var(--tema-border, #e2e8f0);
    border-radius: 12px;
    color: var(--tema-muted, #94a3b8);
}
.ff-empty p { margin: 0; font-size: 14px; }
.ff-empty em {
    font-style: normal; background: #0d9488; color: #fff;
    padding: 2px 8px; border-radius: 4px; font-weight: 600;
}

/* === Edit toolbar (sayfa altında, edit mode'da görünür) === */
.fb-01-toolbar {
    margin-top: 16px;
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 10px;
    background: color-mix(in srgb, #0d9488 6%, transparent);
    border: 1px dashed #0d9488;
    border-radius: 8px;
    justify-content: center;
}
.fb-01-toolbar button {
    padding: 7px 12px; font: inherit; font-size: 12px; font-weight: 600;
    background: #fff; color: #0f172a;
    border: 1px solid #cbd5e1; border-radius: 6px;
    cursor: pointer; transition: all .15s;
}
.fb-01-toolbar button:hover {
    background: #0d9488; color: #fff; border-color: #0d9488;
    transform: translateY(-1px);
}

/* === Element wrapper (edit mode) — sürükle handle + sil butonu === */
.ff-elem {
    position: relative;
    border: 1.5px dashed transparent;
    border-radius: 6px;
    padding: 4px;
    transition: border-color .15s, background .15s;
}
.ff-elem:hover {
    border-color: rgba(13,148,136,.3);
    background: color-mix(in srgb, #0d9488 3%, transparent);
}
.ff-elem.is-dragging {
    opacity: .5; border-style: solid; border-color: #0d9488;
}
.ff-elem.ff-drop-over {
    border-color: #10b981;
    background: color-mix(in srgb, #10b981 8%, transparent);
}

/* Control bar — sol üstte sticky, hover'da görünür */
.ff-elem-controls {
    position: absolute;
    top: -14px; left: 8px;
    display: inline-flex; align-items: center; gap: 1px;
    padding: 3px 4px;
    background: #0f172a; color: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    opacity: 0; transform: translateY(4px);
    transition: opacity .15s, transform .15s;
    z-index: 100;
    pointer-events: none;
}
.ff-elem:hover > .ff-elem-controls,
.ff-elem:focus-within > .ff-elem-controls,
.ff-elem.is-dragging > .ff-elem-controls {
    opacity: 1; transform: translateY(0);
    pointer-events: auto;
}
.ff-ctrl {
    background: transparent; border: 0; cursor: pointer;
    color: rgba(255,255,255,.85);
    width: 24px; height: 24px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 4px;
    transition: background .15s, color .15s;
}
.ff-ctrl:hover { background: rgba(255,255,255,.18); color: #fff; }
.ff-ctrl-drag { cursor: grab; }
.ff-ctrl-drag:active { cursor: grabbing; }
.ff-ctrl-delete:hover { background: #dc2626; color: #fff; }
.ff-ctrl-type {
    font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: rgba(255,255,255,.7);
    padding: 0 8px 0 4px;
    border-right: 1px solid rgba(255,255,255,.15);
}

/* Spacer + Divider edit-mode görünür placeholder */
.blok-edit-mode .ff-spacer {
    background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(13,148,136,.1) 6px, rgba(13,148,136,.1) 12px);
    min-height: 24px !important;
    border-radius: 4px;
}
.blok-edit-mode .ff-divider {
    border-top: 2px dashed #0d9488 !important;
    margin: 12px 0 !important;
}

/* Custom onay popover (alert/confirm yerine) */
.ff-confirm {
    position: fixed; z-index: 99999;
    background: #fff; border-radius: 10px; padding: 16px 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,.25); border: 1px solid #e2e8f0;
    min-width: 280px;
}
.ff-confirm-msg { margin: 0 0 12px; font-size: 14px; color: #0f172a; line-height: 1.5; }
.ff-confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }
.ff-confirm-actions button {
    padding: 8px 16px; border: 1px solid #cbd5e1; border-radius: 6px;
    background: #fff; color: #0f172a; font: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all .15s;
}
.ff-confirm-actions button:hover { background: #f1f5f9; }
.ff-confirm-actions .ff-confirm-yes { background: #dc2626; color: #fff; border-color: #dc2626; }
.ff-confirm-actions .ff-confirm-yes:hover { background: #b91c1c; }
.ff-confirm-backdrop {
    position: fixed; inset: 0; z-index: 99998;
    background: rgba(15,23,42,.4);
}

@media (max-width: 600px) {
    .fb-01-toolbar { gap: 4px; padding: 8px; }
    .fb-01-toolbar button { padding: 6px 8px; font-size: 11px; }
}
