/* Roleta de Jogos consolidated styles (urgent fixes)
   - Remove plugin-imposed backgrounds so theme controls page background.
   - Remove blur on modal (force none).
   - Ensure selects have fixed sizing and text truncation.
*/

/* Don't override site background; inherit theme */
body { font-family: Poppins, Arial, sans-serif; color: inherit; background: transparent; }

/* plugin root spacing only */
.rdj-root{ padding:18px; }

/* PANEL: transparent so it adapts to site/theme background */
.rdj-panel{ max-width:1100px; margin:22px auto; background:transparent; padding:20px 28px; border-radius:12px; border:none; box-shadow:none; }
.rdj-panel--no-bg{ background:transparent;border:none; box-shadow:none; }

.rdj-title{ font-size:32px; text-align:center; margin:0 0 6px; color:#ffd600; }
.rdj-subtitle{ font-size:16px; margin-top:6px; margin-bottom:14px; font-weight:600; text-align:center; color:#d8c7ff; }

/* FILTERS: inline on wide viewports; allow wrap on small screens */
.rdj-filters{ display:flex; gap:12px; justify-content:center; align-items:center; margin-bottom:14px; padding:10px 0; border-radius:8px; flex-wrap:nowrap; }
.rdj-filters > div { flex: 0 0 auto; min-width:160px; box-sizing:border-box; }

/* labels */
.rdj-filter-label{ font-size:13px; color:#eae6ff; margin-bottom:6px; }
.rdj-filter-label-bold{ font-weight:700; }

/* selects: fixed sizing + ellipsis */
.rdj-select{
  padding:10px 12px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.06);
  background: rgba(255, 255, 255, 0);
  color:inherit;
  min-height:38px;
  box-sizing:border-box;
  display:block;
  width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* year input */
.rdj-input-year{
  padding:10px 12px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.06);
  background:#fff;
  color:#111;
  min-height:38px;
  box-sizing:border-box;
  width:120px;
  max-width:140px;
}

/* actions */
.rdj-actions{ text-align:center; margin-bottom:12px; display:flex; justify-content:center; gap:8px; align-items:center; flex-wrap:wrap; }
.rdj-spin-button, .rdj-reset-button{ padding:12px 22px; border-radius:10px; border:none; color:#fff; font-weight:bold; cursor:pointer; order:1; }
.rdj-spin-button:hover, .rdj-reset-button:hover{ transform: translateY(-4px); box-shadow:0 12px 30px rgba(0,0,0,0.35); }
.rdj-spins-left{ order:2; width:100%; text-align:center; margin-top:8px; }

/* result area & cards */
.rdj-result-area{ margin-top:12px; min-height:120px; }
.rdj-game-card{ display:flex; gap:16px; background: rgba(255,255,255,0.03); padding:12px; border-radius:10px; align-items:flex-start; }

/* card left/right */
.card-left{ display:flex; flex-direction:column; align-items:center; gap:8px; }
.game-cover{ width:140px; min-width:140px; height:180px; overflow:hidden; border-radius:8px; background:#000; display:flex; align-items:center; justify-content:center; }
.game-cover img{ width:140px; height:180px; object-fit:cover; border-radius:6px; display:block; max-width:100%; }
.card-right{ flex:1 1 auto; min-width:0; }
.card-right h3{ margin:0 0 6px 0; font-size:20px; word-break:break-word; overflow-wrap:anywhere; }
.card-right .meta-year,
.card-right .meta-dev,
.card-right .meta-platforms,
.card-right .meta-genres{ margin-top:6px; font-size:13px; word-break:break-word; overflow-wrap:anywhere; }
.card-right p{ margin-top:10px; line-height:1.45; word-break:break-word; overflow-wrap:anywhere; white-space:normal; }

/* history */
.rdj-history{ display:flex; gap:12px; justify-content:center; margin-top:18px; flex-wrap:wrap; }
.rdj-history-slot{ width:300px; height:240px; background: rgba(162 89 255); border-radius:8px; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding:14px; box-sizing:border-box; overflow:hidden; }
.thumb-full{ width:100%; height:160px; overflow:hidden; border-radius:8px; display:flex; align-items:center; justify-content:center; background:#ffffff; cursor:pointer; }
.thumb-full img{ width:100%; height:100%; object-fit:contain; border-radius:6px; display:block; max-width:100%; max-height:100%; }
.history-name{ margin-top:10px; font-weight:700; text-align:center; color:#bdfb7a; max-width:260px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.placeholder{ display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; color:rgba(162 89 255); font-size:16px; }

/* modal: compact + no blur */
.rdj-modal{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:9999; padding:20px; }
.rdj-modal--visible{ animation: rdj-modal-in .28s ease both; }
.rdj-modal .rdj-modal-content{ background: rgba(8,8,8,0.95); padding:20px; border-radius:8px; width:88%; max-width:980px; color:#fff; position:relative; box-shadow:0 10px 40px rgba(0,0,0,0.6); transform-origin:center; max-height: calc(100vh - 40px); overflow:auto; }

/* close button more visible */
.rdj-modal-close{
  position:absolute;
  top:10px;
  right:10px;
  background:#ffffff;
  color:#111;
  border:none;
  border-radius:6px;
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  cursor:pointer;
  z-index:10001;
  box-shadow:0 6px 18px rgba(0,0,0,0.5);
}

/* modal columns */
.rdj-modal-grid { display:flex; gap:20px; align-items:flex-start; }
.rdj-modal-left { flex:0 0 260px; max-width:260px; display:flex; flex-direction:column; gap:12px; }
.rdj-modal-title-over { font-size:20px; font-weight:700; text-align:left; color:#fff; }
.rdj-modal-cover { width:100%; border-radius:6px; overflow:hidden; background:#000; display:block; }
.rdj-modal-cover img { width:100%; height:auto; display:block; object-fit:cover; }
.rdj-modal-meta-boxes { display:flex; flex-direction:column; gap:10px; margin-top:6px; }
.rdj-modal-meta { background:rgba(255,255,255,0.03); padding:10px 12px; border-radius:6px; font-size:13px; color:#fff; line-height:1.4; }
.rdj-modal-center { flex:1 1 auto; min-width:300px; display:flex; flex-direction:column; gap:12px; }
.rdj-modal-media { width:100%; background:#000; border-radius:6px; overflow:hidden; display:flex; align-items:center; justify-content:center; min-height:220px; }
.rdj-modal-media iframe, .rdj-modal-media img { width:100%; height:100%; border:0; display:block; object-fit:cover; }
.rdj-modal-summary { font-size:15px; line-height:1.6; color:rgba(255,255,255,0.95); }
.rdj-modal-right { flex:0 0 140px; max-width:350px; display:flex; flex-direction:column; gap:10px; overflow:auto; }
.rdj-thumb-small { width:100%; height:80px; object-fit:cover; border-radius:6px; cursor:pointer; display:block; }

/* confetti/share */
.rdj-confetti-container{ position:fixed; inset:0; pointer-events:none; overflow:hidden; z-index:9998; }
.rdj-confetti{ position:absolute; top:-10px; width:10px; height:18px; opacity:0.95; transform-origin:center; border-radius:2px; }
.rdj-share-buttons { display:flex; gap:8px; justify-content:center; align-items:center; }
.rdj-share-link { padding:8px 12px; background:rgba(255,255,255,0.04); border-radius:8px; color:#fff; text-decoration:none; display:inline-flex; gap:8px; align-items:center; }
.rdj-year-help{ font-size:12px; color:rgba(255,255,255,0.6); }

/* Remove blur entirely; modal still blocks interaction */
body.rdj-modal-open .rdj-root { filter: none !important; transition: filter .18s ease; pointer-events: none; }
body.rdj-modal-open .rdj-modal { pointer-events: auto; }

/* animation */
@keyframes rdj-modal-in { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Corrige a cor do texto APENAS dentro do bloco do plugin (não afeta o restante do site) */
.rdj-root,
.rdj-root p,
.rdj-root span,
.rdj-root a,
.rdj-root li,
.rdj-root .card-right p,
.rdj-root .history-name,
.rdj-root .placeholder,
.rdj-root .rdj-modal-content,
.rdj-root .rdj-modal-meta {
  color: #ffffff !important;
}

/* Mobile */
@media (max-width:800px){
  .rdj-filters{ flex-direction:column; align-items:stretch; gap:12px; flex-wrap:wrap; }
  .rdj-filters > div { width:100% !important; min-width:0; }
  .rdj-input-year{ width:100% !important; max-width:100%; }
  .game-cover img{ width:110px; height:140px; }
  .rdj-history{ flex-direction:column; align-items:center; }
  .rdj-history-slot{ width:90%; max-width:420px; }
  .rdj-game-card{ flex-direction:column; align-items:center; }
  .card-left{ margin-bottom:12px; }
  .card-right{ width:100%; }
  .rdj-actions{ flex-direction:column; align-items:center; }
  .rdj-actions .rdj-spin-button, .rdj-actions .rdj-reset-button { width:100%; max-width:320px; box-sizing:border-box; }
  .rdj-modal .rdj-modal-content{ width:96%; max-width:720px; padding:18px; }
  .rdj-modal-grid{ flex-direction:column; }
  .rdj-modal-left{ width:100%; max-width:100%; }
/*  .rdj-modal-right{ flex-direction:row; flex-wrap:wrap; gap:8px; display:flex; } */
  .rdj-thumb-small{ width:30%; height:70px; }
  .rdj-modal-media{ min-height:180px; }
  .rdj-modal-center{ width:100%; }
}

/* ensure modal content doesn't overflow and paragraphs wrap */
.rdj-modal .rdj-modal-content p { word-break:break-word; overflow-wrap:break-word; white-space:normal; }