/**
 * Bildirim şablonları (#view_notifications)
 * Üstte sekmeler; altta sol metin özeti + sağ görsel önizleme.
 */

html.design-gentelella #view_notifications.notifications-screen,
html.design-pro #view_notifications.notifications-screen {
  width: 100%;
  max-width: none;
}

body:has(#view_notifications:not(.hidden)) .shell {
  max-width: min(98vw, 1680px);
}

#view_notifications .notify-card {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1rem 1.25rem 1.25rem;
}

#view_notifications .notify-page-head {
  margin-bottom: 0.75rem;
}

#view_notifications .notify-page-head h2 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-deep, #384f6c);
}

#view_notifications .notify-page-lead {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 56rem;
}

#view_notifications .notify-vars-hint {
  margin: 0;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted, #5c6f64);
  background: var(--green-tint, #eaf0f6);
  border: 1px solid var(--line, #d4ddd7);
  border-radius: 10px;
}

#view_notifications .notify-vars-hint code {
  font-size: 0.76rem;
  padding: 0.08rem 0.32rem;
  margin: 0 0.12rem 0.08rem 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--green-deep, #384f6c);
}

#view_notifications .notify-studio {
  margin: 0.65rem 0 0.85rem;
}

#view_notifications .notify-studio-frame {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 14rem);
  border: 1px solid var(--line, #d4ddd7);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(26, 46, 36, 0.06);
}

#view_notifications .notify-studio-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(180deg, #fff 0%, #f8faf9 100%);
  border-bottom: 1px solid var(--line, #d4ddd7);
}

#view_notifications .notify-tpl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1 1 20rem;
  min-width: 0;
}

#view_notifications .notify-tpl-tab {
  flex: 1 1 auto;
  min-width: 6.25rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line, #d4ddd7);
  border-radius: 8px;
  background: #f4f7f5;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #5c6f64);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

#view_notifications .notify-tpl-tab:hover {
  background: #eaf0f6;
  color: var(--green-deep, #384f6c);
}

#view_notifications .notify-tpl-tab.active {
  background: var(--green-mid, #5a8f7b);
  border-color: var(--green-mid, #5a8f7b);
  color: #fff;
}

#view_notifications .notify-studio-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem 0.75rem;
  flex: 0 1 auto;
}

#view_notifications .notify-studio-preview-hint {
  margin: 0;
  font-size: 0.76rem;
  max-width: 14rem;
  text-align: right;
  line-height: 1.35;
}

#view_notifications .notify-edit-active-btn {
  flex-shrink: 0;
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  white-space: nowrap;
}

/* Sol metin + sağ önizleme */
#view_notifications .notify-studio-split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 1.18fr);
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
}

#view_notifications .notify-studio-text-col {
  min-width: 0;
  padding: 0.85rem 1rem 1rem;
  border-right: 1px solid var(--line, #d4ddd7);
  background: #fff;
  overflow: auto;
}

#view_notifications .notify-studio-preview-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 360px;
  background: #eef2ef;
}

#view_notifications #notify_email_preview {
  flex: 1 1 auto;
  width: 100%;
  min-height: 360px;
  height: 100%;
  border: none;
  border-radius: 0;
  background: #eef2ef;
}

#view_notifications .notify-summary-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#view_notifications .notify-summary-item {
  min-width: 0;
}

#view_notifications .notify-summary-k {
  display: block;
  margin-bottom: 0.28rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted, #5c6f64);
}

#view_notifications .notify-summary-v {
  margin: 0;
  padding: 0.55rem 0.65rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text, #1a2e24);
  background: #f8faf9;
  border: 1px solid var(--line, #d4ddd7);
  border-radius: 8px;
  word-break: break-word;
}

#view_notifications .notify-summary-body {
  max-height: min(42vh, 22rem);
  overflow: auto;
  white-space: pre-wrap;
}

#view_notifications .notify-quote-hint {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
}

#view_notifications .notify-edit-modal-body label {
  display: block;
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  font-weight: 600;
}

#view_notifications .notify-edit-modal-body textarea,
#view_notifications .notify-edit-modal-body .field-full-input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.9rem;
  line-height: 1.45;
  border: 1px solid var(--line, #d4ddd7);
  border-radius: 8px;
}

#view_notifications .notify-edit-modal-body textarea {
  min-height: 11rem;
  resize: vertical;
}

#view_notifications .notify-edit-hint {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
}

#view_notifications .notify-edit-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 0.25rem;
}

#view_notifications .notify-edit-modal-card {
  max-width: min(96vw, 640px);
}

#view_notifications .notify-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding-top: 0.5rem;
}

#view_notifications .notify-save-row .btn {
  width: auto;
  min-width: 10rem;
}

@media (min-width: 1200px) {
  body:has(#view_notifications:not(.hidden)) .shell {
    max-width: min(96vw, 1720px);
  }

  #view_notifications .notify-studio-frame {
    min-height: calc(100vh - 12.5rem);
  }

  #view_notifications .notify-studio-split {
    grid-template-columns: minmax(0, 0.88fr) minmax(340px, 1.22fr);
  }

  #view_notifications #notify_email_preview {
    min-height: 480px;
  }
}

@media (max-width: 960px) {
  #view_notifications .notify-studio-split {
    grid-template-columns: 1fr;
  }

  #view_notifications .notify-studio-text-col {
    border-right: none;
    border-bottom: 1px solid var(--line, #d4ddd7);
  }

  #view_notifications .notify-summary-body {
    max-height: 10rem;
  }

  #view_notifications .notify-studio-preview-col {
    min-height: 300px;
  }

  #view_notifications #notify_email_preview {
    min-height: 300px;
  }
}

@media (max-width: 900px) {
  #view_notifications .notify-tpl-tab {
    min-width: calc(50% - 0.35rem);
    font-size: 0.78rem;
    padding: 0.5rem 0.45rem;
  }

  #view_notifications .notify-studio-toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  #view_notifications .notify-studio-preview-hint {
    max-width: none;
    text-align: left;
    flex: 1;
  }
}

@media (max-width: 720px) {
  #view_notifications .notify-card {
    padding-top: 3.5rem;
  }

  #view_notifications .notify-vars-hint {
    font-size: 0.72rem;
  }

  #view_notifications .notify-tpl-tab {
    min-width: calc(50% - 0.2rem);
    min-height: 2.6rem;
    font-size: 0.76rem;
  }

  #view_notifications .notify-studio-frame {
    min-height: 0;
  }

  #view_notifications .notify-edit-active-btn {
    width: auto;
  }

  #view_notifications .notify-edit-modal-actions .btn {
    width: 100%;
  }

  #view_notifications .notify-save-row .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  #view_notifications .notify-card {
    padding: 3.5rem 0.65rem 1rem;
  }

  #view_notifications .notify-studio-text-col {
    padding: 0.75rem 0.65rem 0.85rem;
  }
}
