/**
 * Antet Yönetim Modülü Stilleri
 * Menü: Görünüm > Arkaplan > Antet
 */

/* Modal Arka Planı (Overlay) */
.antet-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.antet-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Kutusu */
.antet-modal-container {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 580px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1e293b;
}

.antet-modal-overlay.is-open .antet-modal-container {
  transform: translateY(0) scale(1);
}

/* Modal Başlık */
.antet-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.antet-modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.antet-modal-title-group .antet-icon {
  font-size: 20px;
}

.antet-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.antet-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.antet-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Modal Gövde */
.antet-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  max-height: 72vh;
}

/* Ayar Satırı / Switch */
.antet-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.antet-main-toggle {
  background: #f1f5f9;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.antet-setting-info strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 2px;
}

.antet-setting-info span {
  display: block;
  font-size: 12px;
  color: #64748b;
}

/* Switch UI */
.antet-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.antet-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.antet-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.25s;
  border-radius: 24px;
}

.antet-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.antet-switch input:checked + .antet-slider {
  background-color: #2563eb;
}

.antet-switch input:checked + .antet-slider:before {
  transform: translateX(20px);
}

/* Bölüm Başlığı */
.antet-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Kenar Boşlukları Grid */
.antet-margins-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin-bottom: 12px;
}

.antet-margin-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 6px;
}

.antet-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.antet-input-wrap:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.antet-input-wrap input {
  flex: 1;
  border: none;
  padding: 8px 12px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  width: 100%;
}

.antet-input-wrap .unit {
  padding: 8px 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  border-left: 1px solid #e2e8f0;
}

.antet-margin-field small {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* Checkbox */
.antet-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  user-select: none;
}

.antet-checkbox-label input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
}

/* Önizleme Kutusu */
.antet-preview-box {
  margin-top: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.antet-preview-paper {
  width: 100px;
  height: 141px; /* A4 aspect ratio 1:1.414 */
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.antet-preview-header-bar {
  background: #0f172a;
  color: #ffffff;
  font-size: 5px;
  padding: 3px 2px;
  text-align: center;
  font-weight: bold;
  letter-spacing: 0.2px;
}

.antet-preview-content-area {
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.preview-line {
  height: 2px;
  background: #cbd5e1;
  border-radius: 1px;
}

.preview-line.w-80 { width: 80%; }
.preview-line.w-100 { width: 100%; }
.preview-line.w-90 { width: 90%; }
.preview-line.w-60 { width: 60%; }

.antet-preview-footer-bar {
  border-top: 1px solid #e2e8f0;
  font-size: 4px;
  color: #64748b;
  text-align: center;
  padding: 2px;
  background: #f8fafc;
}

.antet-preview-info {
  flex: 1;
}

.antet-preview-info strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 4px;
}

.antet-preview-info p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

/* Modal Alt Butonlar */
.antet-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.antet-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.antet-btn {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.antet-btn-secondary {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

.antet-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.antet-btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.antet-btn-primary:hover {
  background: #1d4ed8;
}

.antet-btn-danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.antet-btn-danger:hover {
  background: #fecaca;
}

/* Bildirim (Toast) */
#antet-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#antet-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
