/* PDF İçerik Düzenle — masaüstündeki AdvancedPdfEditorWindow ile aynı görünüm
   (üst başlık çubuğu, şerit menü, ikincil araç çubuğu, küçük resimler, tuval, yüzen dock) */
.duz { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: #F1F5F9;
       font-family: 'Segoe UI', Arial, sans-serif; color: #0F172A; }
.duz button { font-family: 'Segoe UI', Arial, sans-serif; cursor: pointer; }
.duz svg { flex: none; display: block; }

/* 0. Sabit başlık çubuğu */
.duz-ust { height: 50px; flex: none; display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 16px;
           background: #0B2E53; border-bottom: 3px solid #FFC800; color: #FFFFFF; box-sizing: border-box; }
.duz-ust .yazilar { display: flex; flex-direction: column; min-width: 0; }
.duz-ust .baslik { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duz-ust .alt { color: #A9C1DE; font-size: 11px; }
.duz-ust .bosluk { flex: 1; }
.duz-ust button { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 6px;
                  padding: 6px 16px; min-height: 34px; box-sizing: border-box; }
.duz-ust .duzIptal { background: transparent; color: #FFFFFF; border: 1px solid #5B7BA3; }
.duz-ust .duzIptal:hover { background: #DC2626; border-color: #DC2626; }
.duz-ust .duzKaydet { background: #FFC800; color: #0B2E53; border: 1px solid #FFC800; }
.duz-ust .duzKaydet:hover { background: #FFD83D; }
.duz-ust .duzKaydet:active { background: #E6B400; }

/* 1. Şerit menü */
.duz-serit { height: 54px; flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 12px; box-sizing: border-box;
             background: #FFFFFF; border-bottom: 1px solid #E2E8F0; overflow-x: auto; overflow-y: hidden; }
.duz-serit button { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid transparent;
                    border-radius: 6px; padding: 5px 10px 5px 8px; min-height: 34px; font-size: 12px; font-weight: 500;
                    color: #334155; white-space: nowrap; box-sizing: border-box; }
.duz-serit button:hover { background: #F1F5F9; border-color: #E2E8F0; color: #0F172A; }
.duz-serit button:active { background: #E2E8F0; }
.duz-serit button.secili { background: #EAF1FB; border: 1px solid #BFD3EE; border-bottom: 2px solid #FFC800; color: #0B2E53; }
.duz-serit button:disabled { color: #A0AEC0; cursor: default; background: transparent; border-color: transparent; }
.duz-serit button:disabled svg { opacity: .45; }
.duz-serit .ayirac { width: 1px; align-self: stretch; margin: 4px 2px; background: #CBD5E1; flex: none; }

/* 2. İkincil araç çubuğu */
.duz-stil { height: 46px; flex: none; display: flex; align-items: center; gap: 10px; padding: 4px 16px; box-sizing: border-box;
            background: #F8FAFC; border-bottom: 1px solid #CBD5E1; overflow-x: auto; white-space: nowrap; }
.duz-stil label, .duz-stil .etk { color: #0F172A; font-size: 12px; font-weight: 600; }
.duz-stil select, .duz-stil input[type=text] { background: #FFFFFF; border: 1px solid #94A3B8; border-radius: 4px; padding: 3px 8px;
            font-size: 12px; color: #0F172A; height: 28px; box-sizing: border-box; font-family: inherit; }
.duz-stil .boyut { width: 70px; }
.duz-stil .renk-dugme { width: 24px; height: 24px; border-radius: 12px; border: 1.5px solid #64748B; padding: 0; background: #000000; }
.duz-stil .bicim { width: 34px; height: 30px; color: #0F172A; background: #FFFFFF; border: 1px solid #CBD5E1; border-radius: 6px;
            font-size: 15px; padding: 0; }
.duz-stil .bicim:hover { background: #F1F5F9; border-color: #94A3B8; }
.duz-stil .bicim.secili { background: #0B2E53; color: #FFC800; border-color: #0B2E53; }
.duz-stil .zemin-dugme { width: 56px; height: 26px; background: #FFFFFF; color: #475569; border: 1.5px solid #64748B; border-radius: 5px; font-size: 12px; }
.duz-stil .ipucu { font-weight: 600; font-size: 12px; color: #0F172A; }
.duz-stil .gizli, .duz .gizli { display: none !important; }

/* 3. Gövde: küçük resimler + tuval */
.duz-govde { flex: 1; min-height: 0; display: flex; }
.duz-kucukler { width: 180px; flex: none; background: #FFFFFF; border-right: 1px solid #E2E8F0; overflow-y: auto; padding: 10px 6px; box-sizing: border-box; }
.duz-kucuk { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px solid transparent; border-radius: 6px;
             padding: 6px; margin-bottom: 8px; cursor: pointer; font-size: 12px; color: #334155; }
.duz-kucuk img { max-width: 130px; max-height: 170px; box-shadow: 0 1px 3px rgba(15, 23, 42, .25); background: #FFFFFF; }
.duz-kucuk:hover { background: #F8FAFC; }
.duz-kucuk.secili { border-color: #4F46E5; background: #EEF2FF; }
.duz-alan { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; background: #F1F5F9; }
.duz-kaydir { flex: 1; overflow: auto; display: flex; }
.duz-tuval { position: relative; margin: auto; flex: none; background: #FFFFFF; box-shadow: 0 2px 10px rgba(15, 23, 42, .18);
             user-select: none; -webkit-user-select: none; touch-action: none; }
.duz-tuval > img.duz-bg { position: absolute; left: 0; top: 0; pointer-events: none; }
.duz-tuval > canvas.duz-cizim { position: absolute; left: 0; top: 0; pointer-events: none; }
.duz-tuval.arac-erase_area, .duz-tuval.arac-link { cursor: crosshair; }
.duz-tuval.arac-add_text { cursor: text; }
.duz-tuval.arac-stamp { cursor: pointer; }
.duz-tuval.mesgul, .duz-tuval.mesgul * { cursor: progress !important; }
.duz-lastik { position: absolute; border: 1px solid #3B82F6; background: rgba(59, 130, 246, .15); pointer-events: none; }

/* Metni Düzenle kutusu (QLineEdit) */
.duz-tuval input.duz-kutu { position: absolute; box-sizing: border-box; border: 1.5px dashed #2563EB; border-radius: 3px;
            background: rgba(255, 255, 255, .92); font-size: 11px; line-height: normal; padding: 1px 3px; margin: 0; outline: none;
            min-height: 0; box-shadow: none; color: #000; }
.duz-tuval input.duz-kutu:focus { border: 2px solid #1D4ED8; background: #FFFFFF; }
.duz-tuval input.duz-kutu.son:not(:focus) { border: 1.5px solid #1D4ED8; box-shadow: 0 0 0 2px rgba(29, 78, 216, .25); }
.duz-tuval input.duz-kutu { white-space: nowrap; }
.duz-tuval input.duz-kutu::placeholder { color: #94A3B8; }
.duz-tuval input.duz-yeni { position: absolute; box-sizing: border-box; width: 180px; height: 28px; border: 2px solid #0057B7; background: #FFFFFF;
            border-radius: 4px; padding: 4px; margin: 0; min-height: 0; outline: none; box-shadow: none; line-height: normal; }
.duz-tuval input.duz-yeni::placeholder { color: #94A3B8; }

/* Metin Ekle: taşınabilir metin (TasinabilirMetin) */
.duz-tm { position: absolute; box-sizing: border-box; border: 1px dashed #2563EB; padding: 1px 3px; white-space: pre; cursor: move;
          line-height: 1.2; outline: none; }
.duz-tm.sarili { white-space: pre-wrap; overflow-wrap: anywhere; }
.duz-tm:focus { box-shadow: 0 0 0 1px rgba(37, 99, 235, .35); }

/* Metni Taşı bloğu (TasinacakBlok) */
.duz-blok { position: absolute; box-sizing: border-box; border: 1.5px dashed #F59E0B; background: rgba(255, 200, 0, .07); cursor: move; }
.duz-blok:hover { background: rgba(255, 200, 0, .235); }
.duz-blok.surukle { border: 1px dashed #F59E0B; background-color: transparent; background-repeat: no-repeat; mix-blend-mode: multiply; z-index: 5; }

/* Resim Ekle / Emoji / Logo katmanı (ImageOverlayWidget) */
.duz-resim { position: absolute; box-sizing: border-box; border: 2px dashed #2563EB; background: rgba(37, 99, 235, .137); cursor: move; z-index: 6; }
.duz-resim img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.duz-resim .tutamak { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; background: #2563EB; cursor: nwse-resize; }
.duz-resim .dugmeler { position: absolute; top: 4px; right: 4px; display: flex; gap: 6px; z-index: 1; }
.duz-resim .dugmeler button { border: none; color: #FFFFFF; font-weight: bold; font-size: 11px; border-radius: 4px; padding: 4px 8px; }
.duz-resim .tamam { background: #16A34A; }
.duz-resim .vazgec { background: #DC2626; padding: 4px 7px !important; }

/* Yüzen dock */
.duz-dock-kap { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; pointer-events: none; }
.duz-dock { pointer-events: auto; height: 44px; display: flex; align-items: center; gap: 12px; padding: 2px 26px; box-sizing: border-box;
            background: rgba(30, 41, 59, .92); border-radius: 22px; }
.duz-dock button { background: transparent; color: #FFFFFF; border: none; font-weight: bold; font-size: 14px; padding: 4px 8px; }
.duz-dock button:hover { color: #FFC72C; }
.duz-dock .sayfa { color: #F8FAFC; font-size: 12px; font-weight: 600; min-width: 92px; text-align: center; }
.duz-dock .ayr { color: #64748B; }
.duz-dock .yukleniyor { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #FFC800; border-radius: 50%;
                        animation: duzdon .8s linear infinite; visibility: hidden; }
.duz-dock .yukleniyor.acik { visibility: visible; }
@keyframes duzdon { to { transform: rotate(360deg); } }

/* Açık renkli (her temada okunaklı) düzenleyici pencereleri: Bağlantı, Kaydet, Simge */
.pencere.duz-acik .dialogBody, .pencere.duz-acik .dialogFooter { background: #FFFFFF; color: #0F172A; }
.pencere.duz-acik .dialogBody label, .pencere.duz-acik .dialogBody div { color: #0F172A; }
.pencere.duz-acik input[type=text], .pencere.duz-acik select { background: #FFFFFF; color: #0F172A; border: 1px solid #94A3B8; border-radius: 6px;
            padding: 7px 9px; font-size: 13px; width: 100%; box-sizing: border-box; }
.pencere.duz-acik input[type=text]:focus { border: 2px solid #0B2E53; outline: none; }
.duz-baslik { font-size: 15px; font-weight: 700; color: #0B2E53 !important; margin-bottom: 4px; }
.duz-ipucu { color: #64748B !important; font-size: 11px; }
.duz-not { color: #475569 !important; font-size: 12px; white-space: pre-line; }
.duz-dugme-sari { background: #FFC800 !important; color: #0B2E53 !important; border: 1px solid #FFC800 !important; font-weight: 600; border-radius: 6px; padding: 7px 18px; }
.duz-dugme-beyaz { background: #FFFFFF !important; color: #334155 !important; border: 1px solid #CBD5E1 !important; font-weight: 600; border-radius: 6px; padding: 7px 18px; }
.duz-dugme-mor { background: #4F46E5 !important; color: #FFFFFF !important; border: none !important; font-weight: 600; border-radius: 6px; padding: 8px 18px; }
.duz-radyo { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; cursor: pointer; }

.duz-sekmeler { display: flex; gap: 2px; border-bottom: 1px solid #E2E8F0; margin: 8px 0 0; }
.duz-sekmeler button { background: #F8FAFC; border: 1px solid #E2E8F0; border-bottom: none; border-radius: 6px 6px 0 0; padding: 7px 14px; color: #334155; font-size: 12px; }
.duz-sekmeler button.secili { background: #FFFFFF; color: #0B2E53; font-weight: 700; border-top: 2px solid #FFC800; }
.duz-sekme-govde { border: 1px solid #E2E8F0; border-top: none; border-radius: 0 0 6px 6px; padding: 10px; overflow-y: auto; flex: 1; min-height: 0; background: #FFFFFF; }
.duz-grup { font-weight: 700; color: #0B2E53 !important; margin: 6px 0 4px; }
.duz-izgara { display: grid; gap: 4px; }
.duz-simge { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 8px; padding: 0; display: flex; align-items: center; justify-content: center;
             font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; cursor: pointer; color: #0F172A; }
.duz-simge:hover { background: #FFF6CC; border-color: #FFC800; }
.duz-simge-kutu { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.duz-simge-kutu span { font-size: 10px; color: #475569 !important; text-align: center; }
