
/* assets/css/enhancements.css */

/* Respect Ceará palette (greens) while inheriting existing tokens */
.ocrdoe {
  --primary: #0a8f3e;           /* darker green */
  --muted:   #f3faf4;           /* light greenish background */
}

/* Thumb page badges */
.ocrdoe-thumb { position: relative; }
.ocrdoe-thumb::after {
  z-index:2;
  content: attr(data-page);
  position: absolute;
  bottom: 6px; right: 6px;
  font-size: 11px; line-height: 1;
  padding: 3px 6px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}

/* Status text inside the bar */
.ocrdoe-pub__bar {
  grid-template-columns: auto 1fr auto; /* keep buttons + thumbs + button */
  gap: .5rem;
  align-items: center;
}
.ocrdoe-pub__status {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #2a2a2a;
  opacity: .85;
  margin-top: .25rem;
}

/* Hide disabled nav buttons completely (only show "próximo" if there is more) */
.ocrdoe-pub__bar .ocrdoe-btn[disabled] { display: none; }

/* Make viewer fill the modal and keep image/text within bounds */
.ocrdoe-modal .ocrdoe-modal__bd { height: 100%; }
.ocrdoe-modal .ocrdoe-pub { display: grid; grid-template-rows: auto 1fr; height: 100%; min-height: 0; }
.ocrdoe-modal .ocrdoe-pub__viewer { min-height: 0; overflow: hidden; }

/* Two-pane viewer: image left (scroll if needed), text right (scroll) */
.ocrdoe-modal .ocrdoe-doc {
  display: grid;
  grid-template-columns: minmax(320px, 48%) 1fr;
  gap: 1rem;
  height: 100%;
  min-height: 0;
}
.ocrdoe-modal .ocrdoe-docimg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.ocrdoe-modal .ocrdoe-docimg, 
.ocrdoe-modal .ocrdoe-doctext { overflow: auto; }

.ocrdoe-modal .ocrdoe-doctext {
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: .4rem;
  padding: .75rem;
}
.ocrdoe-modal .ocrdoe-doctext pre {
  white-space: pre-wrap;
  margin: 0;
}

/* Buttons keep the green tone */
.ocrdoe .ocrdoe-btn {
  display:inline-flex; align-items:center; justify-content:center;
  padding:.45rem .7rem; border-radius:.35rem;
  background: var(--primary); color:#fff; border:0; cursor:pointer;
  font: inherit; line-height:1; text-decoration:none; appearance:none;
}
.ocrdoe .ocrdoe-btn--sm { font-size:.85rem; padding:.35rem .5rem; }
.ocrdoe .ocrdoe-btn[disabled] { opacity:.55; cursor:not-allowed; }
.ocrdoe .ocrdoe-btn:hover:not([disabled]),
.ocrdoe .ocrdoe-btn:focus-visible { filter:brightness(.95); color:#fff; }


/* Prevent theme from stretching nav buttons */
.ocrdoe .ocrdoe-pub__bar .ocrdoe-btn { width:auto; min-width: auto; }
