/* ==================== CAMPAIGN DETAIL PAGE ==================== */

/* -- Status Banner -- */
.cd-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border-radius: 14px;
  padding: 16px 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  flex-wrap: wrap;
}

.cd-status-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cd-campaign-id {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
}

.cd-category-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  background: #e0f2fe;
  color: #0369a1;
}

.cd-urgency-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.cd-urgency-badge.urgency-critical { background: #fee2e2; color: #dc2626; }
.cd-urgency-badge.urgency-high { background: #fff7ed; color: #ea580c; }
.cd-urgency-badge.urgency-normal { background: #f0fdf4; color: #16a34a; }

.cd-progress-section {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

.cd-progress-amounts {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.cd-raised {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.cd-goal {
  font-size: 12px;
  color: var(--text-muted);
}

.cd-progress-bar {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  min-width: 120px;
}

.cd-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--primary), #1976D2);
  border-radius: 10px;
  transition: width 0.4s ease;
}

.cd-progress-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  min-width: 36px;
}

/* -- Readonly Form Inputs -- */
.fc-input[readonly],
.fc-input[disabled],
.fc-input:disabled {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: var(--text-body) !important;
  opacity: 1 !important;
  cursor: default;
  -webkit-text-fill-color: var(--text-body);
}

/* -- Step Indicator as Navigation Links -- */
.campaign-steps a.campaign-step {
  text-decoration: none;
  cursor: pointer;
}

/* -- Media Preview -- */
.cd-media-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cd-media-item {
  width: 120px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.cd-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -- Media View Button -- */
.cd-media-item {
  position: relative;
}

.cd-media-view-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.9);
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.cd-media-item:hover .cd-media-view-btn {
  opacity: 1;
}

.cd-media-view-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* -- Document View Button -- */
.cd-doc-view-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.cd-doc-view-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* -- Document Grid -- */
.cd-docs-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cd-doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.cd-doc-item:hover {
  background: #f1f5f9;
  border-color: var(--primary);
}

.cd-doc-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.cd-doc-icon .fa-file-image {
  color: #2563eb;
}

.cd-doc-item:has(.fa-file-image) .cd-doc-icon {
  background: #dbeafe;
}

.cd-doc-item:has(.fa-file-alt) .cd-doc-icon {
  background: #e0f2fe;
  color: #0369a1;
}

.cd-doc-item:has(.fa-file-video) .cd-doc-icon {
  background: #ede9fe;
  color: #7c3aed;
}

.cd-doc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.cd-doc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
}

.cd-doc-size {
  font-size: 11px;
  color: var(--text-muted);
}

.cd-doc-type {
  font-size: 11px;
  color: var(--primary);
  font-weight: 500;
}

.cd-doc-status {
  font-size: 16px;
}

.cd-doc-status.verified {
  color: #16a34a;
}

/* -- Fund Breakdown -- */
.cd-fund-table {
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.cd-fund-table table {
  width: 100%;
  border-collapse: collapse;
}

.cd-fund-table thead th {
  background: #f1f5f9;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  text-align: left;
}

.cd-fund-table tbody td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-body);
  border-top: 1px solid #f0f0f0;
}

.cd-fund-table tbody td:last-child {
  font-weight: 600;
  color: var(--primary);
}

/* -- Donations Section -- */
.cd-donation-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-left: auto;
}

.cd-donation-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: 6px;
}

.cd-donation-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.cd-donations-table .cd-donor-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
}

.cd-donations-table .cd-donor-email {
  font-size: 11px;
  color: var(--text-muted);
}

.cd-don-amount {
  font-weight: 600;
  color: var(--primary);
  font-size: 13px;
}

.cd-method-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.cd-method-badge.method-esewa { background: #dcfce7; color: #16a34a; }
.cd-method-badge.method-khalti { background: #ede9fe; color: #7c3aed; }
.cd-method-badge.method-bank { background: #dbeafe; color: #2563eb; }
.cd-method-badge.method-card { background: #fff7ed; color: #ea580c; }

.cd-don-date {
  font-size: 13px;
  color: var(--text-body);
}

.cd-don-time {
  font-size: 11px;
  color: var(--text-muted);
}

.cd-don-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.cd-don-status.status-success { background: #dcfce7; color: #16a34a; }
.cd-don-status.status-pending { background: #fff7ed; color: #ea580c; }
.cd-don-status.status-failed { background: #fee2e2; color: #dc2626; }

.cd-view-more-donors {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.cd-view-more-donors .btn-primary-green {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* -- Spacing between sections -- */
.fc-layout + .fc-layout {
  margin-top: 0;
}

/* -- Responsive -- */
@media (max-width: 768px) {
  .cd-status-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .cd-progress-section {
    width: 100%;
    min-width: 0;
  }
  .cd-media-item {
    width: 90px;
    height: 68px;
  }
}
