/* aill-layout-fix — tüm sayfalarda ortak hizalama düzeltmeleri (footer'dan, sayfa CSS'lerinden sonra yüklenir) */

/* ORTAK HİZA: aracın altındaki tüm yazı blokları (giriş paragrafı, rehber kartı, ansiklopedi) araç alanıyla
   aynı sol ve sağ kenarda: .merged-layout = en çok 1300px, iç boşluk 10px → içerik en çok 1280px. */
:root { --aill-content-w: min(1300px, calc(100% - 20px)); }
.seo-text, .seo-text.aill-seo-align,
.aill-sab__wrap,
.aill-encyc__wrap { width: var(--aill-content-w) !important; max-width: none !important; margin-left: auto !important; margin-right: auto !important; box-sizing: border-box; }
.aill-sab, .aill-encyc { width: 100%; padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; margin-right: 0 !important; }
.seo-text {
	width: var(--aill-content-w);
	max-width: none;
	margin: 18px auto 0;
	padding: 0;
	box-sizing: border-box;
	line-height: 1.65;
}
.seo-text h2 {
	margin: 0 0 10px;
	font-size: 22px;
	line-height: 1.3;
}
.seo-text p {
	margin: 0 0 10px;
}

/* Ek ansiklopedik içerik bölümü (includes/aill-encyc.php) — rehber kartıyla aynı genişlik ve görünüm */
.aill-encyc { width: 100%; padding: 10px 0 26px; }
.aill-encyc__wrap {
	box-sizing: border-box;
	margin: 0 auto;
	padding: 20px 24px 14px;
	border-radius: 18px;
	border: 1px solid rgba(0,0,0,.10);
	border-left: 6px solid rgba(124,58,237,.55);
	background: rgba(255,255,255,.92);
	box-shadow: 0 10px 28px rgba(0,0,0,.06);
	color: #1f2937;
	line-height: 1.7;
	font-size: 15px;
}
.aill-encyc__badge {
	display: inline-flex; padding: 6px 10px; border-radius: 999px; font-weight: 800; font-size: 12px;
	background: rgba(124,58,237,.10); color: #5b21b6; border: 1px solid rgba(124,58,237,.18);
	text-transform: uppercase; letter-spacing: .04em;
}
.aill-encyc__title { margin: 10px 0 12px; font-size: 21px; line-height: 1.3; }
.aill-encyc__body h3 { margin: 18px 0 8px; font-size: 17px; line-height: 1.35; }
.aill-encyc__body h4 { margin: 14px 0 6px; font-size: 15px; }
.aill-encyc__body p { margin: 0 0 10px; }
.aill-encyc__body ul, .aill-encyc__body ol { margin: 0 0 12px; padding-left: 22px; }
.aill-encyc__body li { margin: 3px 0; }
.aill-encyc__body a { color: #2563eb; text-decoration: none; font-weight: 600; }
.aill-encyc__body a:hover { text-decoration: underline; }
.aill-encyc__body table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 14px; display: block; overflow-x: auto; }
.aill-encyc__body th, .aill-encyc__body td { border: 1px solid #e2e8f0; padding: 7px 10px; text-align: left; vertical-align: top; }
.aill-encyc__body th { background: #f8fafc; font-weight: 700; }
.aill-encyc__body code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
body.dark .aill-encyc__wrap { border-color: rgba(255,255,255,.12); border-left-color: rgba(167,139,250,.6); background: rgba(11,20,39,.78); color: #dbe4f3; box-shadow: 0 10px 28px rgba(0,0,0,.35); }
body.dark .aill-encyc__badge { background: rgba(167,139,250,.14); color: #ddd6fe; border-color: rgba(167,139,250,.25); }
body.dark .aill-encyc__body th { background: #1e293b; }
body.dark .aill-encyc__body th, body.dark .aill-encyc__body td { border-color: #334155; }
body.dark .aill-encyc__body code { background: #1e293b; }
body.dark .aill-encyc__body a { color: #93c5fd; }
@media (max-width: 640px) { .aill-encyc__wrap { padding: 16px 16px 10px; font-size: 14.5px; } }
.aill-encyc__body dl { margin: 0 0 12px; } .aill-encyc__body dt { font-weight: 700; margin-top: 8px; } .aill-encyc__body dd { margin: 2px 0 6px 0; }
/* Hızlı Filigran: uzun şablon listesi kendi içinde kayar, İndir düğmesi ilk ekranda kalır */
@media (min-width: 900px) { #tab-presets #presetGrid { max-height: max(220px, calc(100vh - 580px)); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; scrollbar-width: thin; } }

/* SAĞ SÜTUNA TAŞINAN AYARLAR (Sıkıştır, Dönüştür, PDF): dikey yığın; toplu indirme normal boyutta */
.aill-side-tools { display: flex; flex-direction: column; gap: 0; margin-bottom: 14px; }
.right-column-main .aill-side-stack,
.right-column-main .options-box-yatay { display: flex !important; flex-direction: column !important; gap: 0 !important; padding: 0 !important; margin: 0 !important; background: none !important; box-shadow: none !important; border: 0 !important; grid-template-columns: none !important; }
.right-column-main .aill-side-stack > .side-card { width: auto !important; max-width: none !important; margin: 8px 0 0 !important; }
.right-column-main .apply-card { padding: 12px !important; margin-top: 10px !important; }
.right-column-main .apply-card .apply-btn { width: 100%; padding: 11px 14px; font-size: 15px; }
.right-column-main .download-all-btn,
.aill-side-tools .download-all-btn { width: 100% !important; padding: 10px 14px !important; font-size: 15px !important; border-radius: 10px !important; margin: 10px 0 0 !important; }
/* Sonuç kartlarındaki İndir düğmeleri: ölçülü */
.gallery-grid .download-btn, .gallery-grid .card-download, .gallery-grid button.download { padding: 8px 12px !important; font-size: 14px !important; }

/* Ortak iki sütun (kendi düzeni olan sayfalar için: Döndür vb.) — diğer araçlarla aynı ölçüler */
.aill-2col { max-width: 1300px; margin: 0 auto; padding: 0 10px; display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 30px; align-items: start; box-sizing: content-box; }
.aill-2col > .left-column-main, .aill-2col > .right-column-main { min-width: 0; }
.aill-2col > .right-column-main { padding-top: 1.25rem; }
@media (max-width: 960px) { .aill-2col { grid-template-columns: 1fr; gap: 10px; } }
.rot-layout .rot-wrap { max-width: none; margin: 0; padding: 1.25rem 0 2rem; }
.rot-layout .rot-panel { grid-template-columns: 1fr !important; }
.rot-layout .rot-controls { gap: 0; }
.rot-layout .rot-controls .panel .rot-row { margin-top: 8px; }
.rot-layout .rot-export { width: 100%; margin-top: 12px; }


/* MOBİL: ızgara sütunları içerik yüzünden genişlemesin (Canlı Foto'da sol sütun 375 px ekranda 669 px'e çıkıyordu) */
.merged-layout > *, .aill-2col > *, .pdf-layout > * { min-width: 0; }
.cf-cat-tabs { overflow-x: auto; scrollbar-width: thin; }
/* Sıkıştır sayfalarının iç boşluğu (12 px) diğerleriyle aynı (10 px): alt yazılarla aynı kenar */
.merged-layout { padding-left: 10px !important; padding-right: 10px !important; }
.right-column-main .side-card, .right-column-main .apply-card { min-height: 0 !important; height: auto !important; flex: none !important; }

/* ================= KART İÇİ ORTAK GÖRÜNÜM =================
   Sağ sütundaki açılır kartların içi her sayfada aynı görünsün (Sıkıştır'daki tasarım esas alındı).
   Taşınan kartların stilleri bazı sayfalarda yüklenmiyordu (Dönüştür, PDF). */
.acc-card .quality-presets, .acc-card .ico-size-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 12px; }
.acc-card .preset, .acc-card .ico-preset {
	background: #eef2ff; color: #1e293b; border: 0; border-radius: 20px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; transition: background .2s;
}
.acc-card .preset:hover, .acc-card .ico-preset:hover { background: #dbe4ff; }
.acc-card .preset.active, .acc-card .ico-preset.active { background: #2563eb; color: #fff; font-weight: 600; }
body.dark .acc-card .preset, body.dark .acc-card .ico-preset { background: #1f2a48; color: #e5e7eb; }
body.dark .acc-card .preset.active, body.dark .acc-card .ico-preset.active { background: #2563eb; color: #fff; }
.acc-card .quality-slider { display: flex; flex-direction: column; }
.acc-card .quality-slider input[type="range"], .acc-card input[type="range"] { width: 100%; max-width: 100%; box-sizing: border-box; margin-left: 0; margin-right: 0; accent-color: #2563eb; }
.acc-card .quality-percent { text-align: right; font-weight: 700; font-size: 13px; margin-top: 2px; }
.acc-card .card-desc, .acc-card .field-desc { display: block; margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; opacity: .75; }
.acc-card .meta-option { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 14px; cursor: pointer; }
.acc-card h3, .acc-card h4 { font-size: 15px; margin: 0 0 8px; }
/* Form alanları: tam genişlik, aynı yükseklik ve çerçeve */
.acc-card select,
.acc-card input[type="number"], .acc-card input[type="text"], .acc-card input[type="password"],
.acc-card textarea {
	width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px;
	background: #fff; color: inherit; font: inherit; font-size: 14px;
}
body.dark .acc-card select, body.dark .acc-card input[type="number"], body.dark .acc-card input[type="text"],
body.dark .acc-card input[type="password"], body.dark .acc-card textarea { background: #0f172a; border-color: #334155; }
.acc-card input[type="color"] { width: 56px; height: 34px; padding: 2px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; cursor: pointer; }
.acc-card input[type="number"][readonly], .acc-card input[type="number"]:disabled { background: #f1f5f9; }
/* Etiketli satırlar (Dönüştür, HEIC/Sunucu) */
.acc-card .heic-setting-row, .acc-card .pdf-setting-row { margin: 0 0 12px; }
.acc-card .heic-setting-label-row, .acc-card .setting-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-weight: 600; font-size: 13.5px; }
.acc-card .ico-size-checks { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13.5px; }
.acc-card .conv-settings label { font-weight: 600; font-size: 13.5px; }

/* PDF ayar kartı: alanlar alt alta, etiket üstte */
.pdf-settings-card .pdf-controls, .pdf-settings-card .pdf-wm-grid {
	display: flex !important; flex-direction: column !important; flex-wrap: nowrap !important; align-items: stretch !important; gap: 12px !important; margin: 0 0 12px !important;
}
.pdf-settings-card .pdf-wm-controls, .pdf-settings-card .pdf-wm-text { flex: none !important; width: 100%; }
.pdf-settings-card .pdf-controls label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; width: 100%; }
.pdf-settings-card .pdf-controls label output { font-weight: 700; color: #2563eb; }
.pdf-settings-card label:has(> input[type="checkbox"]) { display: flex; flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500; }
.pdf-settings-card .pdf-pw-restrict { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 8px 12px; }
.pdf-settings-card .pdf-wm-preview { align-self: center; margin: 4px 0 0; }
.pdf-settings-card .pdf-wm-preview canvas { width: 140px; }
.pdf-settings-card #pdfMetaLine:empty, .pdf-settings-card .pdf-pw-status[hidden] { display: none; }
.acc-card .ico-size-title { display: none; }
/* Filigran Kaldır "Önizleme ve çıktı" kartı: iki sütunlu boyut ızgarası taşmasın */
.acc-card .wm-size-grid { display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; gap: 8px; width: 100%; }
.acc-card .wm-size-grid input { width: 100% !important; min-width: 0 !important; max-width: 100% !important; }
.acc-card .wm-size-grid .image-ebat { width: auto !important; text-align: left; }
.acc-card .wm-size-grid .image-ebat { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.acc-card .wm-size-grid label { font-size: 12px; font-weight: 600; }
.acc-card .wm-row1-section { margin: 0 0 12px; }
.acc-card .wm-row1-section > label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
/* Format sekmeleri: kart içinde hap düğme */
.acc-card .format-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-card .format-tab { background: #eef2ff; color: #1e293b; border: 0; border-radius: 20px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.acc-card .format-tab.active { background: #2563eb; color: #fff; font-weight: 600; }
body.dark .acc-card .format-tab { background: #1f2a48; color: #e5e7eb; }
body.dark .acc-card .format-tab.active { background: #2563eb; color: #fff; }
.acc-card.wm-row-1 { display: block !important; } .acc-card.wm-row-1 .wm-row1-section { width: auto !important; max-width: 100% !important; flex: none !important; }

/* Karanlık mod: PDF ayar kartı (--card-bg tanımsız olduğunda beyaza düşüyordu) */
body.dark .pdf-layout .right-column-main .pdf-settings-card { background: #1a1a2e; }
body.dark .pdf-settings-card .pdf-pw-restrict { border-color: #334155; }
body.dark .pdf-settings-card .pdf-controls label output { color: #60a5fa; }
