/*
 * prep.css — Preparation phase CSS classes
 * Replaces all inline style="" attributes with semantic cf-* classes.
 * Uses CSS custom properties for theme-ability (Phase 11+).
 *
 * Categories:
 *   A — Static cosmetic replacements
 *   B — Dynamic/conditional status backgrounds
 *   C — Dynamic width via custom property
 *   D — JS-toggled display:none (handled by Bootstrap d-none, no CSS here)
 */

/* ==========================================================================
   Category A: Static cosmetic replacements
   ========================================================================== */

/* --- Section layout (news page header/body) --- */
.cf-section-header {
  background: var(--cf-surface, #fff);
  padding: 1.5rem;
  border-radius: 10px 10px 0 0;
  border: 2px solid var(--cf-border, #e9ecef);
  border-bottom: none;
}

.cf-section-body {
  background: var(--cf-surface, #fff);
  padding: 1rem;
  border-radius: 0 0 10px 10px;
  border: 2px solid var(--cf-border, #e9ecef);
  border-top: none;
}

/* --- Typography --- */
.cf-section-title {
  font-size: 1.5rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cf-icon-badge {
  background: var(--cf-icon-badge-bg, #ffc107);
  padding: 0.5rem;
  border-radius: 10px;
}

.cf-text-muted-sm {
  color: var(--cf-text-muted, #6c757d);
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
}

.cf-badge-count {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* --- Card gradients --- */
.cf-gradient-header {
  background: linear-gradient(135deg, var(--cf-gradient-start, #667eea) 0%, var(--cf-gradient-end, #764ba2) 100%);
  border: none;
  padding: 1rem;
  border-radius: 10px 10px 0 0;
}

.cf-gradient-body {
  background: linear-gradient(to bottom, var(--cf-body-gradient-start, #f0f9ff) 0%, var(--cf-body-gradient-end, #e0f2fe) 100%);
  padding: 1rem;
  border-radius: 0 0 10px 10px;
}

.cf-gradient-block {
  background: linear-gradient(135deg, var(--cf-gradient-start, #667eea) 0%, var(--cf-gradient-end, #764ba2) 100%);
}

/* --- News card --- */
.cf-news-card {
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.cf-news-card-inner {
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border-radius: 10px;
}

.cf-news-heading {
  margin: 0;
}

/* --- Accordion button --- */
.cf-accordion-btn {
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: var(--cf-text-on-gradient, white);
  font-weight: 600;
  font-size: 1rem;
}

.cf-accordion-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cf-accordion-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.cf-accordion-icon {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.3rem;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.cf-text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cf-arrow-icon {
  font-size: 1.2rem;
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.cf-latest-badge {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.9;
}

/* --- News content --- */
.cf-news-content {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--cf-text-primary, #2c3e50);
}

.cf-news-image-wrap {
  margin-top: 1rem;
  text-align: center;
}

.cf-news-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto;
}

/* --- Interaction area --- */
.cf-interaction-area {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--cf-border-light, #e0f2fe);
}

.cf-interaction-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cf-interaction-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cf-interaction-btn {
  background: var(--cf-surface-muted, #e0f2fe);
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
}

.cf-timestamp {
  color: var(--cf-text-muted, #6c757d);
  font-size: 0.8rem;
}

/* --- Empty state --- */
.cf-empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.cf-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  filter: grayscale(50%);
}

.cf-empty-title {
  color: var(--cf-text-muted, #6c757d);
  font-size: 1.5rem;
}

.cf-empty-text {
  color: var(--cf-text-muted, #6c757d);
  font-size: 1rem;
}

.cf-empty-btn {
  margin-top: 1rem;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
}

/* --- Setup / unconfigured state --- */
.cf-setup-container {
  background: linear-gradient(135deg, var(--cf-setup-bg-start, #f5f7fa) 0%, var(--cf-setup-bg-end, #c3cfe2) 100%);
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  padding: 1rem;
  margin: 0 -15px;
}

.cf-setup-inner {
  text-align: center;
  width: 100%;
  max-width: 700px;
  padding: 0 1rem;
}

.cf-setup-card {
  background: var(--cf-surface, white);
  padding: 2rem 1.5rem;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.cf-setup-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  animation: pulse 2s infinite;
}

.cf-setup-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--cf-text-primary, #2c3e50);
}

.cf-setup-success {
  background: var(--cf-success-bg, #e8f5e9);
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.cf-setup-success-title {
  color: var(--cf-success-title, #2e7d32);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.cf-setup-success-text {
  font-size: 1rem;
  color: var(--cf-success-text, #1b5e20);
  margin: 0;
}

.cf-setup-steps {
  background: var(--cf-warning-bg, #fff3e0);
  padding: 1.5rem 1rem;
  border-radius: 10px;
  border: 2px dashed var(--cf-warning-border, #ff9800);
}

.cf-setup-steps-title {
  color: var(--cf-warning-title, #e65100);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.cf-setup-steps-list {
  text-align: left;
  font-size: 0.95rem;
  color: var(--cf-text-secondary, #424242);
  line-height: 1.8;
  padding-left: 1.5rem;
  margin: 0;
}

.cf-code-highlight {
  background: var(--cf-code-bg, #e3f2fd);
  padding: 0.2rem 0.4rem;
  border-radius: 5px;
  font-size: 0.85rem;
  word-break: break-all;
}

.cf-setup-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cf-setup-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* --- Avatar circles --- */
.cf-avatar {
  width: 40px;
  height: 40px;
  color: white;
  font-weight: bold;
}

.cf-avatar-sm {
  width: 30px;
  height: 30px;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* --- Image cover --- */
.cf-img-cover-lg {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.cf-img-cover-md {
  width: 100%;
  height: 300px;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.cf-img-cover-sm {
  width: 100%;
  height: 200px;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.cf-img-placeholder {
  height: 200px;
}

/* --- Width utility --- */
.cf-w-200 {
  width: 200px;
}

/* --- Stat cards (gift results admin) --- */
.cf-stat-card-1 {
  background: linear-gradient(135deg, var(--cf-stat-1-start, #667eea) 0%, var(--cf-stat-1-end, #764ba2) 100%);
  color: var(--cf-stat-1-text, white);
}

.cf-stat-card-2 {
  background: linear-gradient(135deg, var(--cf-stat-2-start, #11998e) 0%, var(--cf-stat-2-end, #38ef7d) 100%);
  color: var(--cf-stat-2-text, white);
}

.cf-stat-card-3 {
  background: linear-gradient(135deg, var(--cf-stat-3-start, #ffecd2) 0%, var(--cf-stat-3-end, #fcb69f) 100%);
  color: var(--cf-stat-3-text, #333);
}

.cf-stat-card-4 {
  background: linear-gradient(135deg, var(--cf-stat-4-start, #ff9a9e) 0%, var(--cf-stat-4-end, #fecfef) 100%);
  color: var(--cf-stat-4-text, #333);
}

/* --- Gift list gradient body --- */
.cf-gradient-body-white {
  background: linear-gradient(135deg, var(--cf-gradient-start, #667eea) 0%, var(--cf-gradient-end, #764ba2) 100%);
  color: var(--cf-text-on-gradient, white);
}

/* ==========================================================================
   Category B: Dynamic/conditional status backgrounds
   ========================================================================== */

.cf-status-danger {
  background: var(--cf-status-danger, maroon);
}

.cf-status-warning {
  background: var(--cf-status-warning, orange);
}

.cf-status-success {
  background: var(--cf-status-success, greenyellow);
}

/* ==========================================================================
   Category C: Dynamic width via custom property (progress bars)
   ========================================================================== */

.cf-progress-fill {
  width: var(--cf-progress, 0%);
  max-width: 100%;
}
