/**
 * Campaign Modal - Styles för expanderad vy
 * Mörkgrå design (#1e293b, #334155)
 */

/* Modal Overlay */
.campaign-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.campaign-modal-overlay.active {
  opacity: 1;
}

/* Modal Container */
.campaign-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.campaign-modal-overlay.active .campaign-modal {
  transform: scale(1);
}

/* Header - Mörkgrå gradient; rad 1 = knappar, rad 2 = titel + undertext */
.campaign-modal-header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.modal-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.modal-title-section {
  min-width: 0;
}

.campaign-modal-header .modal-title-section .modal-title,
.campaign-modal-header .modal-title-section h2 {
  color: #ffffff;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-subtitle {
  font-size: 0.875rem;
  opacity: 0.8;
  margin: 0.25rem 0 0;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.modal-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-action-btn.bookmarked {
  background: #f59e0b;
  border-color: #f59e0b;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.8);
}

/* Lucide SVG icon sizing (campaign modal uses Lucide, not Font Awesome) */
.modal-nav-btn svg,
.modal-action-btn svg,
.modal-close-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.modal-action-btn:not(.bookmarked) svg {
  fill: none;
  stroke: currentColor;
}

.modal-action-btn.bookmarked svg {
  fill: currentColor;
  stroke: currentColor;
}

.modal-nav-button svg,
.modal-campaign-cta svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* Content Area */
.campaign-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  background: white;
}

/* Banner – hela bildfilen ska synas (t.ex. "VÅRGÅRDA" i bannern) */
.modal-campaign-hero {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.modal-campaign-image {
  width: 100%;
  height: auto;
  max-height: min(52vh, 520px);
  object-fit: contain;
  object-position: center;
  display: block;
  background: #0f172a;
}

.modal-campaign-sponsor-logo {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  border: 2px solid rgba(15, 23, 42, 0.08);
}

.modal-campaign-sponsor-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.modal-campaign-body {
  font-size: 1rem;
  line-height: 1.8;
  color: #475569;
  margin-bottom: 2rem;
}

.modal-campaign-body p {
  margin-bottom: 1rem;
}

.modal-campaign-body strong {
  color: #1e293b;
  font-weight: 600;
}

.modal-campaign-body a {
  color: #3b82f6;
  text-decoration: underline;
}

.modal-campaign-body a:hover {
  color: #2563eb;
}

.modal-campaign-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
}

.modal-campaign-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 41, 59, 0.4);
}

/* Footer Navigation */
.campaign-modal-footer {
  background: #f8fafc;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.modal-nav-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-nav-button:hover:not(:disabled) {
  border-color: #334155;
  background: #f8fafc;
}

.modal-nav-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.modal-progress {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

/* Print Styles */
@media print {
  .campaign-modal-header,
  .campaign-modal-footer,
  .modal-actions,
  .modal-nav-btn,
  .modal-close-btn {
    display: none !important;
  }
  
  .campaign-modal-overlay {
    background: white;
  }
  
  .campaign-modal {
    max-height: none;
    box-shadow: none;
  }
  
  .campaign-modal-content {
    padding: 0;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .campaign-modal-overlay {
    padding: 0;
  }
  
  .campaign-modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .campaign-modal-header {
    padding: 1rem;
  }
  
  .modal-title {
    font-size: 1rem;
  }
  
  .campaign-modal-content {
    padding: 1.5rem;
  }

  .modal-campaign-image {
    max-height: min(40vh, 360px);
  }
  
  .modal-nav-button span {
    display: none;
  }
  
  .modal-nav-btn {
    width: 36px;
    height: 36px;
  }
  
  .modal-action-btn {
    width: 32px;
    height: 32px;
  }
  
  .modal-close-btn {
    width: 32px;
    height: 32px;
  }
}

/* Animations */
@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-20px);
    opacity: 0;
  }
}







