/**
 * BoxOfficeWala Publisher Connect - Front-end & Admin Styles
 * Clean, modern typography and dark/light responsive themes
 */

:root {
  --boi-gold: #ffd700;
  --boi-gold-hover: #ffb800;
  --boi-dark-bg: #0e111a;
  --boi-dark-card: #161a29;
  --boi-dark-border: rgba(255, 215, 0, 0.25);
  --boi-text-light: #f5f6f8;
  --boi-text-muted: #9aa0a6;
  --boi-green: #2ecc71;
  --boi-red: #e74c3c;
  --boi-radius: 12px;
}

/* ==========================================================================
   1. Smart Field Inline Display
   ========================================================================== */
.boi-smart-field-value {
  font-weight: 700;
  color: inherit;
  display: inline;
  transition: opacity 0.2s ease;
}

.boi-smart-field-value.boi-gold {
  color: var(--boi-gold);
}

.boi-smart-field-placeholder {
  color: var(--boi-text-muted);
  font-style: italic;
}

/* ==========================================================================
   2. Infobox Widget Card
   ========================================================================== */
.boi-infobox-container {
  max-width: 680px;
  margin: 24px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  border-radius: var(--boi-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.boi-infobox-container:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

/* Dark Theme (Default) */
.boi-infobox-container.boi-theme-dark {
  background: var(--boi-dark-bg);
  border: 1px solid var(--boi-dark-border);
  color: var(--boi-text-light);
}

.boi-infobox-container.boi-theme-dark .boi-infobox-card {
  background: linear-gradient(180deg, rgba(22, 26, 41, 0.95) 0%, rgba(14, 17, 26, 0.98) 100%);
}

.boi-infobox-container.boi-theme-dark .boi-stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.boi-infobox-container.boi-theme-dark .boi-footer {
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Light Theme */
.boi-infobox-container.boi-theme-light {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1a202c;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.boi-infobox-container.boi-theme-light .boi-infobox-card {
  background: #ffffff;
}

.boi-infobox-container.boi-theme-light .boi-stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.boi-infobox-container.boi-theme-light .boi-footer {
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
}

/* Infobox Header */
.boi-infobox-header {
  display: flex;
  gap: 20px;
  padding: 20px;
  align-items: center;
}

.boi-poster-wrap {
  flex-shrink: 0;
  width: 100px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.boi-poster-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.boi-header-details {
  flex-grow: 1;
}

.boi-movie-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 6px 0;
  line-height: 1.25;
  color: inherit;
}

.boi-movie-meta {
  font-size: 0.85rem;
  color: var(--boi-text-muted);
  margin-bottom: 8px;
}

.boi-verdict-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--boi-gold);
  color: #000;
}

.boi-verdict-tag.verdict-blockbuster { background: #27ae60; color: #fff; }
.boi-verdict-tag.verdict-hit { background: #2ecc71; color: #fff; }
.boi-verdict-tag.verdict-flop { background: #e74c3c; color: #fff; }
.boi-verdict-tag.verdict-average { background: #f39c12; color: #fff; }

/* Grid of Stats */
.boi-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 20px 20px 20px;
}

.boi-stat-box {
  padding: 12px 14px;
  border-radius: 8px;
  text-align: center;
}

.boi-stat-box.highlight {
  border-color: rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.08);
}

.boi-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--boi-text-muted);
  margin-bottom: 4px;
  display: block;
}

.boi-stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: inherit;
  display: block;
}

.boi-stat-box.highlight .boi-stat-value {
  color: var(--boi-gold);
}

/* Footer & Watermark */
.boi-footer {
  padding: 10px 20px;
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--boi-text-muted);
}

.boi-footer a {
  color: var(--boi-gold);
  text-decoration: none;
  font-weight: 600;
}

.boi-theme-light .boi-footer a {
  color: #b45309;
}

.boi-footer a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   3. Daily Pacing Chart
   ========================================================================== */
.boi-chart-container {
  max-width: 680px;
  margin: 24px auto;
  border-radius: var(--boi-radius);
  overflow: hidden;
  padding: 20px;
  font-family: inherit;
}

.boi-chart-container.boi-theme-dark {
  background: var(--boi-dark-bg);
  border: 1px solid var(--boi-dark-border);
  color: var(--boi-text-light);
}

.boi-chart-container.boi-theme-light {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1a202c;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.boi-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  margin: 20px 0 10px 0;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.boi-theme-light .boi-chart-bars {
  border-bottom-color: #e2e8f0;
}

.boi-chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.boi-chart-bar {
  width: 100%;
  max-width: 28px;
  background: linear-gradient(180deg, var(--boi-gold) 0%, rgba(255, 215, 0, 0.4) 100%);
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
  min-height: 4px;
}

.boi-chart-bar-val {
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.boi-chart-bar-day {
  font-size: 0.7rem;
  color: var(--boi-text-muted);
  margin-top: 6px;
}

/* ==========================================================================
   4. Showcase All-in-One Component [boi_showcase]
   ========================================================================== */
.boi-showcase-container {
  max-width: 760px;
  margin: 28px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.boi-showcase-container.boi-theme-dark {
  background: #090b12;
  border: 1px solid var(--boi-dark-border);
  color: var(--boi-text-light);
}

.boi-showcase-container.boi-theme-light {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1a202c;
}

.boi-showcase-hero {
  display: flex;
  gap: 24px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(22, 26, 41, 0.95) 0%, rgba(14, 17, 26, 0.9) 100%);
  align-items: center;
}

.boi-theme-light .boi-showcase-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
}

.boi-showcase-poster {
  width: 120px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.boi-showcase-poster img {
  width: 100%;
  height: auto;
  display: block;
}

.boi-showcase-header-info {
  flex-grow: 1;
}

.boi-showcase-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.2;
}

.boi-showcase-submeta {
  font-size: 0.88rem;
  color: var(--boi-text-muted);
  margin-bottom: 12px;
}

.boi-showcase-metrics-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0;
}

.boi-theme-light .boi-showcase-metrics-banner {
  background: #e2e8f0;
}

.boi-showcase-metric-cell {
  background: #0e111a;
  padding: 16px 10px;
  text-align: center;
}

.boi-theme-light .boi-showcase-metric-cell {
  background: #ffffff;
}

.boi-showcase-metric-lbl {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--boi-text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.boi-showcase-metric-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: inherit;
}

.boi-showcase-metric-cell.highlight .boi-showcase-metric-num {
  color: var(--boi-gold);
}

.boi-theme-light .boi-showcase-metric-cell.highlight .boi-showcase-metric-num {
  color: #b45309;
}

.boi-showcase-attribution {
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.boi-theme-light .boi-showcase-attribution {
  background: #f1f5f9;
  border-top-color: #e2e8f0;
  color: #475569;
}

.boi-showcase-attribution a {
  color: var(--boi-gold);
  font-weight: 700;
  text-decoration: none;
}

.boi-theme-light .boi-showcase-attribution a {
  color: #b45309;
}

.boi-showcase-attribution a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   5. Post Editor Meta Box (Writer Movie Finder)
   ========================================================================== */
.boi-finder-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.boi-finder-search-row {
  position: relative;
  margin-bottom: 12px;
}

.boi-finder-search-row input[type="text"] {
  width: 100%;
  padding: 10px 36px 10px 12px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #ccd0d4;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.boi-finder-search-row .boi-spinner {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 14px;
}

.boi-results-scroll {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
}

.boi-movie-card-row {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: center;
  transition: border-color 0.15s ease;
}

.boi-movie-card-row:hover {
  border-color: #b45309;
}

.boi-card-thumb {
  width: 44px;
  height: 60px;
  border-radius: 4px;
  background: #e2e8f0;
  object-fit: cover;
  flex-shrink: 0;
}

.boi-card-details {
  flex-grow: 1;
  min-width: 0;
}

.boi-card-title {
  font-weight: 700;
  font-size: 13px;
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.boi-card-tags {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
}

.boi-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.boi-btn-insert {
  background: #0f172a;
  color: #ffffff !important;
  border: none;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.boi-btn-insert:hover {
  background: #334155;
}

.boi-btn-copy {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}

.boi-btn-copy:hover {
  background: #e2e8f0;
}

/* ==========================================================================
   6. Responsive
   ========================================================================== */
@media (max-width: 640px) {
  .boi-showcase-hero {
    flex-direction: column;
    text-align: center;
  }
  .boi-showcase-poster {
    width: 90px;
  }
  .boi-showcase-metrics-banner {
    grid-template-columns: repeat(2, 1fr);
  }
  .boi-infobox-header {
    flex-direction: column;
    text-align: center;
  }
  .boi-poster-wrap {
    width: 80px;
  }
  .boi-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   7. BOWBites Slider & Cards
   ========================================================================== */
.boi-bites-widget-wrapper {
  margin: 28px 0;
  border-radius: var(--boi-radius);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.boi-bites-theme-dark {
  background: var(--boi-dark-bg);
  border: 1px solid var(--boi-dark-border);
  color: var(--boi-text-light);
}

.boi-bites-theme-light {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

.boi-bites-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.boi-bites-theme-light .boi-bites-widget-header {
  border-bottom: 1px solid #e2e8f0;
}

.boi-bites-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.boi-bites-nav-arrows {
  display: flex;
  gap: 6px;
}

.boi-bites-prev-btn,
.boi-bites-next-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s;
}

.boi-bites-prev-btn:hover,
.boi-bites-next-btn:hover {
  background: var(--boi-gold);
  color: #000;
}

.boi-bites-slider-container {
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.boi-bites-slider-container::-webkit-scrollbar {
  height: 6px;
}

.boi-bites-slider-container::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.3);
  border-radius: 3px;
}

.boi-bites-track {
  display: flex;
  gap: 16px;
}

.boi-bites-card {
  flex: 0 0 260px;
  background: var(--boi-dark-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.boi-bites-theme-light .boi-bites-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.boi-bites-card-media {
  height: 150px;
  background-size: cover;
  background-position: center;
  position: relative;
  background-color: #1e293b;
}

.boi-bites-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(14, 17, 26, 0.95) 100%);
}

.boi-bites-badge-brand {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--boi-gold);
  color: var(--boi-gold);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.boi-bites-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.boi-bites-movie-title {
  margin: 0 0 6px 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.boi-bites-meta-line {
  font-size: 11px;
  color: var(--boi-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.boi-bites-cast-line {
  font-size: 11px;
  color: var(--boi-text-muted);
  margin-bottom: 12px;
}

.boi-bites-metrics-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.boi-bites-theme-light .boi-bites-metrics-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.boi-bites-metric-item .lbl {
  display: block;
  font-size: 10px;
  color: var(--boi-text-muted);
  text-transform: uppercase;
}

.boi-bites-metric-item .val {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--boi-gold);
}

.boi-bites-card-footer {
  margin-top: auto;
  display: flex;
  gap: 6px;
}

.boi-bites-action-btn {
  flex: 1;
  background: var(--boi-gold);
  color: #0e111a !important;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
}

.boi-bites-share-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   8. Read More Expandable Overlay
   ========================================================================== */
.boi-readmore-wrapper {
  position: relative;
  margin-bottom: 24px;
}

.boi-readmore-curtain {
  position: relative;
  margin-top: -120px;
  padding-top: 60px;
  text-align: center;
  z-index: 5;
}

.boi-readmore-fade {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.95) 45%, #ffffff 100%);
  z-index: 1;
  pointer-events: none;
}

/* Dark mode fallback for fade */
@media (prefers-color-scheme: dark) {
  .boi-readmore-fade {
    background: linear-gradient(180deg, rgba(14, 17, 26, 0) 0%, rgba(14, 17, 26, 0.95) 45%, #0e111a 100%);
  }
}

.boi-readmore-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.boi-readmore-expand-btn {
  background: linear-gradient(135deg, #ffd700 0%, #ff9900 100%);
  color: #0e111a;
  border: none;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(255, 184, 0, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.boi-readmore-expand-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 184, 0, 0.45);
}

.boi-readmore-card {
  max-width: 480px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  text-align: left;
}

.boi-rmc-poster {
  width: 42px;
  height: 58px;
  object-fit: cover;
  border-radius: 4px;
}

.boi-rmc-poster-ph {
  width: 42px;
  height: 58px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 18px;
}

.boi-rmc-center {
  flex: 1;
}

.boi-rmc-badge {
  font-size: 10px;
  font-weight: 700;
  color: #d97706;
  text-transform: uppercase;
}

.boi-rmc-title {
  margin: 2px 0 4px 0;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.boi-rmc-numbers {
  font-size: 11px;
  color: #64748b;
  display: flex;
  gap: 10px;
}

.boi-rmc-numbers strong {
  color: #0f172a;
}

.boi-rmc-link {
  background: #0f172a;
  color: #fff !important;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}

