/* ===========================================
   Mailflow.hu – Alap stílus (Bootstrap alapra)
   =========================================== */

/* Általános színek */
:root {
  --mf-primary: #0066ff;
  --mf-primary-dark: #004bcc;
  --mf-bg-light: #f8f9fa;
  --mf-text-muted: #6c757d;
}

/* Testreszabott linkek */
a {
  color: var(--mf-primary);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}
a:hover {
  color: var(--mf-primary-dark);
  text-decoration: underline;
}

/* Navbar */
.navbar {
  transition: box-shadow 0.3s ease-in-out;
}
.navbar .nav-link {
  position: relative;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}
.navbar .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--mf-primary);
  transition: width 0.25s ease-in-out;
}
.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  width: 100%;
}
.navbar-collapse.collapse {
  transition: height 0.25s ease;
}

/* Gombok */
.btn-primary {
  background: linear-gradient(90deg, var(--mf-primary), var(--mf-primary-dark));
  border: none;
  transition: opacity 0.2s ease-in-out, transform 0.1s ease-in-out;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btn-outline-primary {
  border-color: var(--mf-primary);
  color: var(--mf-primary);
}
.btn-outline-primary:hover {
  background-color: var(--mf-primary);
  color: #fff;
}

/* Kártyák */
.card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

/* Lábléc */
footer {
  background-color: var(--mf-bg-light);
  border-top: 1px solid #eaeaea;
  padding: 2rem 0;
  text-align: center;
  color: var(--mf-text-muted);
  font-size: 0.9rem;
}

/* Űrlapok */
.form-control:focus {
  border-color: var(--mf-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 102, 255, 0.25);
}

/* Badge-ek (pl. csomagok) */
.badge.text-bg-dark {
  background-color: #212529 !important;
}
.badge.text-bg-primary {
  background-color: var(--mf-primary) !important;
}
.badge.text-bg-warning {
  background-color: #ffc107 !important;
  color: #000 !important;
}

/* Kis extra animáció bejelentkezésnél */
.fade-in {
  animation: fadeIn 0.4s ease-in-out both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsív padding korrekció */
@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Kampány nézet – tipográfia & elrendezés */
.page-campaign h3 {
  font-weight: 700;
  letter-spacing: .2px;
}

.badge-pill {
  border-radius: 9999px;
  padding: .35rem .65rem;
  font-weight: 600;
  font-size: .8rem;
}

.badge-muted {
  color: #444;
  background: #eef2f7;
}

.status-badge {
  vertical-align: middle;
  margin-left: .5rem;
}

/* stat jelvények egy sorban, egyforma távolsággal */
.stat-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.card-clean {
  border: 1px solid #e9ecef;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

.scrollbox {
  max-height: 360px;
  overflow: auto;
  border: 1px solid #e9ecef;
  border-radius: .5rem;
  padding: .75rem;
  background: #fff;
}

.scrollbox pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* akció gombok: azonos szélesség*
.card {
  border-radius: 0.75rem;
}

.badge {
  font-size: 0.85rem;
  padding: 0.4em 0.6em;
}

.preview-html, .preview-text {
  max-height: 300px;
  overflow-y: auto;
}

main.container {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 0 12px rgba(0,0,0,0.05);
  padding: 2rem;
}
/* Kampány nézet – finomhangolások */
.campaign-view .card-soft {
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.04);
}

.campaign-view .status-badge {
  text-transform: lowercase;
  padding: .4rem .65rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .2px;
}

/* státusz színek */
.status-queued   { background: #e6f4ea; color:#0f5132; border:1px solid #b7e1c3; }
.status-sending  { background: #fff3cd; color:#664d03; border:1px solid #ffe69c; }
.status-paused   { background: #e9ecef; color:#495057; border:1px solid #dfe3e6; }
.status-finished { background: #e7f1ff; color:#084298; border:1px solid #cfe2ff; }
.status-failed   { background: #fde8ea; color:#842029; border:1px solid #f5c2c7; }
.status-draft    { background: #f8f9fa; color:#6c757d; border:1px solid #e9ecef; }

.campaign-view .preview-html,
.campaign-view .preview-text {
  max-height: 360px;
  overflow: auto;
  border: 1px dashed rgba(0,0,0,.1);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.campaign-view pre.preview-text {
  white-space: pre-wrap;
  margin: 0;
}

@media (max-width: 991.98px) {
  .campaign-view header h1 { font-size: 1.25rem; }
}
.card {
  border-radius: 0.75rem;
}

.badge {
  font-size: 0.85rem;
  padding: 0.4em 0.6em;
}

.preview-html, .preview-text {
  max-height: 300px;
  overflow-y: auto;
}

main.container {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 0 12px rgba(0,0,0,0.05);
  padding: 2rem;
}

.navbar .nav-link {
  position: relative;
  transition: color .2s ease-in-out;
}
.navbar .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--bs-primary);
  transition: width .2s ease-in-out;
}
.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  width: 100%;
}
.navbar .dropdown-menu {
  border-radius: .5rem;
  border-color: #eee;
}

.preview-html{max-width:100%;overflow-x:auto}
.preview-html img,.preview-html table,.preview-html td,.preview-html th{max-width:100%!important;height:auto!important}
.preview-html table{width:100%!important}
.preview-text{white-space:pre-wrap;word-break:break-word;overflow-x:auto}

/* ===== Kampány HTML előnézet fix ===== */
.preview-html {
  max-width: 100%;
  overflow-x: auto;
}

.preview-html * {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.preview-html table {
  width: 100% !important;
  table-layout: auto !important;
}

.preview-html img {
  max-width: 100% !important;
  height: auto !important;
}

.preview-html body,
.preview-html html {
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
