/* OLIMP Sports Archive v0.2.13 — category tabs + media card grid.
   Frontend only. Inactive panels keep their contents and rights, but are hidden. */
.oa-match-tabs {
  position:sticky;top:0;z-index:16;display:flex;gap:6px;
  width:100%;overflow-x:auto;overscroll-behavior-x:contain;
  margin:15px 0 16px;padding:8px 0 9px;background:#f7f7f6;
  border-bottom:1px solid #d6dadb;scrollbar-width:thin;
}
.oa-match-tab {
  flex:1 0 170px;min-width:0;display:flex;align-items:center;justify-content:center;gap:10px;
  min-height:53px;padding:10px 13px;border:1px solid #d5dadd;background:#fff;
  color:#131719;font:700 11px/1.35 Unbounded,Arial,sans-serif;cursor:pointer;
  text-align:left;white-space:normal;transition:border-color .15s ease,background .15s ease;
}
.oa-match-tab svg{flex:0 0 18px;color:#e51f2b}
.oa-match-tab-label{flex:0 1 auto;min-width:0}
.oa-match-tab-count{flex:0 0 auto;min-width:25px;min-height:23px;display:grid;place-items:center;
  border:1px solid #d7dbdd;font:700 10px/1 Unbounded,Arial,sans-serif;padding:5px;}
.oa-match-tab:hover{border-color:#b7bdc1}
.oa-match-tab.is-active{background:#111517;color:#fff;border-color:#111517;border-bottom:3px solid #ee1e2d}
.oa-match-tab.is-active .oa-match-tab-count{border-color:#4d5357}
.oa-match-tab:focus-visible{outline:3px solid #ed1d2c;outline-offset:2px}
.match-folders.oa-match-tabbed{display:block}
.match-folders.oa-match-tabbed>.files-panel{width:100%;min-width:0}
.match-folders.oa-match-tabbed>.files-panel[hidden]{display:none!important}
.oa-match-tabbed .files-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:13px;align-items:stretch;margin:14px 0;}
.oa-match-tabbed .files-grid>.oa-media-tile{min-width:0;background:#fff;border:1px solid #d9dddf;display:flex;flex-direction:column;overflow:hidden}
.oa-media-tile .oa-media-poster{min-height:126px;aspect-ratio:16/9;background:#edeff0;display:grid;place-items:center;border-bottom:1px solid #dee2e3;color:#e71e2b}
.oa-media-tile .oa-media-poster svg{width:47px;height:47px;stroke-width:1.45}
.oa-match-tabbed .oa-media-tile .file-card{display:flex;align-items:flex-start;flex-wrap:wrap;gap:10px;padding:11px 12px 13px;border:0;min-height:100px;}
.oa-media-tile .file-card .file-icon{width:35px;height:35px;display:grid;place-items:center;padding:4px;flex:0 0 35px}
.oa-video-tile .file-card .file-icon{display:none}
.oa-media-tile .file-card>div:nth-child(2){min-width:0;flex:1 1 calc(100% - 50px)}
.oa-video-tile .file-card>div:nth-child(2){flex-basis:100%}
.oa-media-tile .file-name{font-size:11px;white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.5}
.oa-media-tile .file-card small{display:block;margin-top:4px}
.oa-media-tile .file-card .stream-link{order:3;margin-top:auto;font-size:10px;display:inline-block}
.oa-media-tile .file-card .file-download{order:4;margin-left:auto;align-self:flex-end;font-size:19px;line-height:1}
.oa-media-tile .preview-media{margin:0 11px 11px;padding:9px;min-width:0}
.oa-media-tile .preview-media video,.oa-media-tile .preview-media img{max-height:240px}
.oa-match-tabbed .oa-upload-near-top{margin:10px 0 18px}
.oa-match-tabbed .archive-gallery{margin-top:12px;}
.oa-match-tabbed .archive-gallery-mode .archive-gallery{display:grid}
.oa-match-tabbed .archive-gallery-mode .archive-photo-list-row{display:none!important}
.oa-match-tabbed .files-panel .files-heading{flex-wrap:wrap;gap:10px}
@media(min-width:1250px){.oa-match-tabbed .files-grid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}}
@media(max-width:850px){
  .oa-match-tabs{gap:6px;}
  .oa-match-tab{flex:0 0 185px;justify-content:flex-start;min-height:50px;font-size:10px;padding:8px 10px}
  .oa-match-tabbed .files-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
}
@media(max-width:520px){
  .oa-match-tabs{margin:10px 0 12px;padding:6px 0 9px}
  .oa-match-tab{flex-basis:155px;gap:7px;min-height:48px;font-size:9px}
  .oa-match-tab svg{width:15px;height:15px;flex-basis:15px}
  .oa-match-tab-count{min-width:21px;min-height:21px;font-size:9px}
  .oa-match-tabbed .files-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .oa-media-tile .oa-media-poster{min-height:92px}
  .oa-media-tile .oa-media-poster svg{width:30px;height:30px}
  .oa-match-tabbed .oa-media-tile .file-card{padding:8px;gap:6px;min-height:93px}
  .oa-media-tile .file-name{font-size:10px}
  .oa-media-tile .file-card .stream-link{font-size:9px}
}
@media(prefers-reduced-motion:reduce){.oa-match-tab{transition:none}}
/* v0.2.12 keeps photo list rows for the List switch; hide their grid wrappers in Gallery mode. */
.oa-match-tabbed .archive-gallery-mode .files-grid > .oa-photo-tile{display:none!important}
