/* assets/css/common.css */

/* layout base */
.ocrdoe { --primary:#0a6fb7; --muted:#f5f7fa; --text:#1a1a1a; font-family:inherit; }

/* tabs */
.ocrdoe-tabs{display:flex;flex-wrap:wrap;gap:.5rem;margin:0 0 1rem;}
.ocrdoe-tab{
  appearance:none;border:0.0625rem solid var(--primary);background:#fff;color:var(--primary);
  padding:.6rem .9rem;border-radius:.4rem;cursor:pointer;font-weight:600;flex:1 1 auto;
}
.ocrdoe-tab.is-active{background:var(--primary);color:#fff}

@media (min-width: 48rem) {
  .ocrdoe-tabs {
    justify-content: flex-start;
  }

  .ocrdoe-tab {
    flex: 0 0 auto;
    min-width: 10.625rem;
    width: auto;
  }
}

/* panels */
.ocrdoe-panel{display:none}
.ocrdoe-panel.is-active{display:block}

/* list/items */
.ocrdoe-list{display:flex;flex-direction:column;gap:.75rem}
.ocrdoe-item{background:#fff;border:0.0625rem solid #e6e9ef;border-radius:.5rem;padding:.75rem}
.ocrdoe-item__hd{font-size:.85rem;color:#556;opacity:.9;margin-bottom:.25rem}
.ocrdoe-item__title{font-weight:600;margin-bottom:.25rem}
.ocrdoe-item__snippet{font-size:.95rem;color:#333}
.ocrdoe-item__actions{margin-top:.5rem}
.ocrdoe-btn{border:0;border-radius:.35rem;padding:.4rem .6rem;cursor:pointer}
.ocrdoe-btn--sm{font-size:.85rem;padding:.3rem .55rem}

/* pagination */
.ocrdoe-pagination{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;margin-top:.75rem}
.ocrdoe-page-btn{
  appearance:none;border:0.0625rem solid var(--primary);background:#fff;color:var(--primary);
  padding:.35rem .6rem;border-radius:.35rem;cursor:pointer;font-weight:600
}
.ocrdoe-page-btn.is-active{background:var(--primary);color:#fff}
.ocrdoe-page-btn[disabled]{opacity:.55;cursor:not-allowed}
.ocrdoe-page-ellipsis{padding:.35rem .4rem;color:#667}

/* modal */
.ocrdoe-modal{position:fixed;inset:0;z-index:9999}
.ocrdoe-modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.7)}
.ocrdoe-modal__dialog{
  position:absolute;inset:2% 2%;background:#fff;border-radius:.6rem;display:flex;flex-direction:column;overflow:hidden;
}
.ocrdoe-modal__hd{display:flex;justify-content:space-between;align-items:center;padding:.8rem 1.5rem;background:var(--muted);border-bottom:0.0625rem solid #e6e9ef}
.ocrdoe-modal__title{margin:0;font-size:1.15rem;font-weight:700}
.ocrdoe-modal__close{border:0;background:#fff;color:#333;border-radius:.35rem;padding:.35rem .8rem;cursor:pointer;font-weight:bold}
.ocrdoe-modal__bd{padding:1rem 0;overflow:auto;height:100%}

.ocrdoe-pub__more {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  padding: 0 1.5rem;
}

.ocrdoe-pub__thumbswrap {
  overflow-x: auto;
  padding: 0 1.5rem;
}

.ocrdoe-pageinfo {
  font-size: .95rem;
  word-break: break-word;
  padding: 0 1.5rem;
}

.ocrdoe-pub {
    padding: 0 1.5rem;
}

/* doc viewer */
.ocrdoe-doc{display:grid;grid-template-columns:minmax(15rem,40%) 1fr;gap:1rem;align-items:flex-start}
.ocrdoe-docimg{max-width:100%;height:auto;border:0.0625rem solid #e6e9ef;border-radius:.4rem}
.ocrdoe-doctext{max-height:70vh;overflow:auto;background:#fafbfe;border:0.0625rem solid #e6e9ef;border-radius:.4rem;padding:.75rem}
.ocrdoe-doctext pre{white-space:pre-wrap;margin:0}

/* publications carousel */
.ocrdoe-pub__bar{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.5rem;margin-bottom:.75rem}
.ocrdoe-pub__thumbs{display:flex;gap:.5rem;overflow:auto;padding:.25rem;background:#fafbfe;border:0.0625rem solid #e6e9ef;border-radius:.4rem}
.ocrdoe-thumb{border:0;background:#fff;padding:.2rem;border-radius:.35rem;cursor:pointer;border:0.0625rem solid #e6e9ef}
.ocrdoe-thumb img{display:block;height:4.5rem}

/* preloader */
.ocrdoe-preloader{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.35)}
.ocrdoe-preloader__box{background:#fff;border-radius:.6rem;padding:1rem 1.25rem;box-shadow:0 0.625rem 1.5625rem rgba(0,0,0,.2);display:flex;align-items:center;gap:.75rem}
.ocrdoe-spinner{width:1.75rem;height:1.75rem;border-radius:50%;border:0.25rem solid #e6e9ef;border-top-color:var(--primary);animation:ocrdoe-spin 0.9s linear infinite}
@keyframes ocrdoe-spin{to{transform:rotate(360deg)}}
.ocrdoe-sr{position:absolute;opacity:0;width:0.0625rem;height:0.0625rem;overflow:hidden}

/* forms */
.ocrdoe-publications-form .card-body > .d-flex {
  flex-wrap: wrap;
}

.ocrdoe-publications-form .card-body > .d-flex > .d-flex.flex-row.flex-grow-1 {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(8.75rem, 1fr));
  width: 100%;
  gap: .75rem !important;
}

.ocrdoe-publications-form .card-body > .d-flex > .d-flex.flex-row.align-items-end.flex-auto {
  width: 100%;
  justify-content: flex-end;
}

.ocrdoe-search-form .row {
  row-gap: .75rem;
}

/* responsive */
@media (max-width: 61.9988rem) {
  .ocrdoe-modal__dialog {
    inset: 2% 2%;
  }

  .ocrdoe-modal__bd {
    padding: .75rem;
  }

  .ocrdoe-modal__hd {
    flex-wrap: wrap;
    gap: .5rem;
  }

  .ocrdoe-modal__title {
    font-size: .95rem;
    line-height: 1.35;
  }

  .ocrdoe-doc {
    grid-template-columns: 1fr;
    gap: .75rem;
  }

  .ocrdoe-modal .ocrdoe-pub {
    gap: .75rem;
  }

  .ocrdoe-modal .ocr-col--img {
    min-height: 56vh;
  }

  .ocrdoe-modal .ocr-panzoom {
    min-height: 54vh;
  }

  .ocrdoe-doctext {
    max-height: none;
  }

  .ocrdoe-pub__thumbs {
    gap: .35rem;
  }

  .ocrdoe-pub__more .ocrdoe-btn,
  .ocrdoe-pub__more .btn {
    flex: 1 1 calc(50% - .5rem);
  }

  .ocrdoe-publications-form .card-body > .d-flex > .d-flex.flex-row.flex-grow-1 {
    grid-template-columns: repeat(2, minmax(8.75rem, 1fr));
  }
}

@media (max-width: 35.9988rem) {
  .ocrdoe-tab {
    width: 100%;
  }

  .ocrdoe-publications-form .card-body > .d-flex > .d-flex.flex-row.flex-grow-1 {
    grid-template-columns: 1fr;
  }

  .ocrdoe-publications-form .card-body > .d-flex > .d-flex.flex-row.align-items-end.flex-auto .btn,
  .ocrdoe-search-form .btn {
    width: 100%;
  }

  .ocrdoe-pub__more .ocrdoe-btn,
  .ocrdoe-pub__more .btn {
    flex: 1 1 100%;
  }
}

