/* HTML5 spēles (2026-10-05): saraksts (templates/game/game.htm.inc), spēles lapa (game_play.htm.inc), jvs/games.js */
.tab-box .tab-box-top-games{background:url(/images/layout/icons/game_32px.png) no-repeat 14px 4px;}
.tab-box-top-games .games-crumb{float:right;font-size:13px;color:#808080;padding-top:4px;}
.games-wrap{padding:14px 18px 18px;}
.games-preview{margin:0 0 14px;padding:7px 12px;background:#fff4d6;border:1px dashed #e0a800;color:#7a5a00;font-size:12px;border-radius:4px;}

/* saraksts */
.games-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px;}
.games-item{display:flex;flex-direction:column;align-items:center;text-align:center;padding:14px 12px 16px;border:1px solid #d8e2ea;border-radius:8px;background:#fff;color:#333;text-decoration:none!important;transition:border-color .15s,box-shadow .15s;}
.games-item:hover{border-color:#2a8fc9;box-shadow:0 2px 10px rgba(42,143,201,.18);}
.games-thumb{display:block;width:96px;height:96px;margin-bottom:10px;}
.games-thumb svg,.games-thumb img{width:96px;height:96px;border-radius:12px;display:block;}
.games-name{font-size:16px;font-weight:bold;color:#1b3d5c;margin-bottom:4px;}
.games-desc{font-size:12px;line-height:1.4;color:#666;min-height:34px;margin-bottom:12px;}
.games-btn{display:inline-block;background:#f5b400;color:#fff;font-weight:bold;font-size:13px;padding:6px 22px;border-radius:5px;box-shadow:0 2px 0 #c98f00;}
.games-item:hover .games-btn{background:#e6a800;}
.games-pages{padding:8px 4px;text-align:center;}

/* spēles lapa */
.games-title{margin:0 0 4px;font-size:22px;color:#1b3d5c;font-weight:normal;}
.games-text{margin:0 0 14px;font-size:13px;color:#555;line-height:1.5;}
.games-play{display:flex;gap:18px;align-items:flex-start;}
.games-stage{flex:1 1 auto;min-width:0;}
.games-side{flex:0 0 200px;font-size:13px;}
.games-box-title{font-weight:bold;color:#1b3d5c;border-bottom:1px solid #e3e9ee;padding-bottom:4px;margin:0 0 8px;}
.games-best{margin-bottom:16px;line-height:1.6;}
.games-top{margin:0 0 10px;padding-left:22px;}
.games-top li{padding:2px 0;}
.games-top li span{display:inline-block;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom;}
.games-top li b{float:right;}
.games-top li.me{font-weight:bold;color:#2a8fc9;}
.games-top-note{color:#808080;font-size:12px;}
.games-back{margin-top:16px;font-size:13px;}

/* spēles rāmis */
.h5game{max-width:520px;}
.h5game.h5-wide{max-width:none;}   /* pasjanss - pa visu spēles kolonnu */
.h5-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin-bottom:8px;font-size:13px;}
.h5-score{font-size:15px;}
.h5-score b{color:#d9531e;}
.h5-bestl{color:#808080;font-size:12px;}
.h5-btns,.h5-levels{display:inline-flex;gap:6px;}
.h5-btns{margin-left:auto;}
.h5-btn{font:bold 12px Arial,sans-serif;padding:6px 12px;border:0;border-radius:5px;background:#f5b400;color:#fff;cursor:pointer;box-shadow:0 2px 0 #c98f00;}
.h5-btn:hover{background:#e6a800;}
.h5-btn-light{background:#eef3f7;color:#1b3d5c;box-shadow:0 2px 0 #cfdbe4;}
.h5-btn-light:hover{background:#e1eaf1;}
.h5-btn-light.on{background:#2a8fc9;color:#fff;box-shadow:0 2px 0 #1d6f9f;}
.h5-board{position:relative;width:fit-content;max-width:100%;line-height:0;touch-action:none;user-select:none;-webkit-user-select:none;}
.h5-board-side{display:flex;gap:10px;align-items:flex-start;}
.h5-canvas{display:block;border-radius:6px;max-width:100%;height:auto;}
.h5-board-side .h5-canvas{max-width:calc(100% - 90px);}
.h5-overlay{position:absolute;inset:0;display:none;align-items:center;justify-content:center;background:rgba(20,32,44,.55);border-radius:6px;line-height:1.4;z-index:2;}
.h5-ov-box{background:#fff;border-radius:8px;padding:16px 20px;max-width:80%;text-align:center;box-shadow:0 6px 20px rgba(0,0,0,.25);}
.h5-ov-box h3{margin:0 0 6px;font-size:18px;color:#1b3d5c;}
.h5-ov-box p{margin:0 0 12px;font-size:13px;color:#444;}
.h5-ov-box .h5-small{font-size:12px;color:#808080;margin-top:-4px;}
.h5-ov-btn{font-size:14px;padding:8px 22px;}
.h5-next{line-height:1.3;font-size:12px;color:#555;text-align:center;}
.h5-next canvas{display:block;background:#1e2a36;border-radius:6px;margin-top:4px;}
.h5-msg{margin-top:8px;font-size:12px;color:#808080;min-height:16px;}
.h5-msg .h5-small{margin:0;}
.h5-record{color:#3b6d11;font-weight:bold;font-size:13px;}

/* bultiņu pogas zem laukuma - telefonā un datorā (spiež ar peli; turot nospiestu - atkārto) */
.h5-pad{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:10px;max-width:420px;}
.h5-pad:empty{display:none;}
.h5-padbtn{width:64px;height:52px;font-size:22px;border:0;border-radius:8px;background:#eef3f7;color:#1b3d5c;box-shadow:0 2px 0 #cfdbe4;touch-action:manipulation;}
.h5-padbtn:active{background:#d6e4ef;}
.h5-padbtn{cursor:pointer;user-select:none;-webkit-user-select:none;}
.h5-padbtn:hover{background:#e1eaf1;}
.h5-padbtn.wide{width:100%;}
.h5-pad-cross{display:grid;grid-template-columns:64px 64px 64px;grid-template-areas:". up ." "left down right";justify-content:center;}
.h5-pad-cross .up{grid-area:up;}.h5-pad-cross .left{grid-area:left;}.h5-pad-cross .down{grid-area:down;}.h5-pad-cross .right{grid-area:right;}
@media (hover:none) and (pointer:coarse){
    .h5-pad{display:flex;flex-wrap:wrap;justify-content:center;}
    .h5-pad-cross{display:grid;}
}
.h5-flagbtn{display:inline-block;}
.h5-pad .h5-flagbtn{margin:0 auto;}

/* 2048 */
.h5-2048{width:min(440px, calc(100vw - 40px));aspect-ratio:1;font-size:clamp(18px,7vw,40px);display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(4,1fr);gap:8px;padding:8px;box-sizing:border-box;background:#bbada0;border-radius:8px;font-family:Arial,sans-serif;font-weight:bold;line-height:1;}
.h5-t{display:flex;align-items:center;justify-content:center;border-radius:5px;background:#cdc1b4;color:#776e65;}
.h5-t2{background:#eee4da;}.h5-t4{background:#ede0c8;}
.h5-t8{background:#f2b179;color:#fff;}.h5-t16{background:#f59563;color:#fff;}.h5-t32{background:#f67c5f;color:#fff;}.h5-t64{background:#f65e3b;color:#fff;}
.h5-t128{background:#edcf72;color:#fff;font-size:.85em;}.h5-t256{background:#edcc61;color:#fff;font-size:.85em;}.h5-t512{background:#edc850;color:#fff;font-size:.85em;}
.h5-t1024{background:#edc53f;color:#fff;font-size:.7em;}.h5-t2048{background:#edc22e;color:#fff;font-size:.7em;}.h5-tbig{background:#3c3a32;color:#fff;font-size:.6em;}
.h5-new{animation:h5pop .18s ease-out;}
@keyframes h5pop{from{transform:scale(.4);}to{transform:scale(1);}}

/* mīnu meklētājs */
.h5-mines{display:grid;gap:2px;padding:6px;background:#c9d3dc;border-radius:6px;line-height:1;}
.h5-c{padding:0;border:0;border-radius:3px;background:#eef3f7;box-shadow:inset 0 -2px 0 #cfdbe4;font-family:Arial,sans-serif;font-weight:bold;color:#1b3d5c;cursor:pointer;touch-action:manipulation;}
.h5-c:hover{background:#e1eaf1;}
.h5-c.o{background:#fff;box-shadow:none;cursor:default;}
.h5-c.f{color:#d9531e;}
.h5-c.boom{background:#f5b7b1;}
.h5-c.mine{color:#333;}
.h5-c.wrong{background:#fbe7e7;text-decoration:line-through;}
.h5-c.n1{color:#2a6fc9;}.h5-c.n2{color:#3b8a1e;}.h5-c.n3{color:#d9534f;}.h5-c.n4{color:#1b3d8c;}.h5-c.n5{color:#8a3b1e;}.h5-c.n6{color:#1e8a8a;}.h5-c.n7{color:#333;}.h5-c.n8{color:#808080;}

@media (max-width:760px){
    .games-play{flex-direction:column;}
    .games-side{flex:none;width:100%;}
    .games-wrap{padding:12px;}
    .tab-box-top-games .games-crumb{display:none;}
    .h5-btns{margin-left:0;}
}

/* pasjanss (Klondaika) */
.h5-sol{position:relative;background:#2e7d4f;border-radius:8px;user-select:none;-webkit-user-select:none;touch-action:none;line-height:1;max-width:100%;}
.h5-slot{position:absolute;box-sizing:border-box;border:2px dashed rgba(255,255,255,.35);border-radius:6px;display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.4);font-family:Arial,sans-serif;font-weight:bold;}
.h5-stock{cursor:pointer;}
.h5-card{position:absolute;box-sizing:border-box;border-radius:6px;background:#fff;border:1px solid #b9c3cc;box-shadow:0 1px 2px rgba(0,0,0,.25);font-family:Arial,sans-serif;font-weight:bold;cursor:pointer;touch-action:none;}
.h5-card.r{color:#c62828;}
.h5-card.b{color:#1b1b1b;}
.h5-card .cr{position:absolute;left:4px;top:4px;text-align:center;line-height:1;}
.h5-card .cs{position:absolute;right:5px;bottom:4px;line-height:1;}
.h5-card.back{background:repeating-linear-gradient(45deg,#2a8fc9 0 5px,#2380b6 5px 10px);border:3px solid #fff;box-shadow:0 0 0 1px #b9c3cc,0 1px 2px rgba(0,0,0,.25);}
.h5-card.drag{box-shadow:0 8px 18px rgba(0,0,0,.35);transition:none;}
.h5-shake{animation:h5shake .3s;}
@keyframes h5shake{25%{margin-left:-4px;}75%{margin-left:4px;}}
.h5-sol-finish{display:none;margin-top:10px;}

/* pilnā ekrānā (poga "Pilnā ekrānā" - klase h5-full; iPhone nav elementu pilnekrāna, tāpēc fixed visai lapai) */
html.h5-noscroll,html.h5-noscroll body{overflow:hidden;}
.h5game.h5-full{position:fixed;inset:0;z-index:100000;max-width:none;margin:0;padding:12px 16px;box-sizing:border-box;background:#eef3f7;overflow:auto;display:flex;flex-direction:column;align-items:center;}
.h5game.h5-full .h5-bar{width:100%;max-width:1100px;}
.h5game.h5-full .h5-board{margin:0 auto;}
.h5game.h5-full .h5-canvas{width:auto!important;height:calc(100vh - 150px);max-width:calc(100vw - 32px);}
.h5game.h5-full .h5-board-side .h5-canvas{max-width:calc(100vw - 132px);}
.h5game.h5-full .h5-2048{width:min(calc(100vh - 150px), calc(100vw - 32px))!important;max-width:none!important;font-size:clamp(20px,6vh,64px);}
.h5game.h5-full .h5-msg{text-align:center;}
.h5game.h5-full .h5-pad{margin-left:auto;margin-right:auto;}

/* "Kā spēlēt" zem laukuma (jvs/games.js howto) */
.h5-help{margin-top:14px;padding:10px 14px;background:#f4f8fb;border:1px solid #d6e4ef;border-radius:6px;font-size:13px;line-height:1.5;color:#333;max-width:520px;}
.h5game.h5-wide .h5-help{max-width:none;}
.h5-help-t{font-weight:bold;color:#1b3d5c;margin-bottom:4px;}
.h5-help-goal{margin:0 0 6px;}
.h5-help ul{margin:0;padding:0;list-style:none;}
.h5-help li{margin:3px 0;padding-left:26px;position:relative;}
.h5-help-i{position:absolute;left:0;top:0;width:20px;text-align:center;font-size:15px;}
.h5game.h5-full .h5-help{display:none;}

/* mahjong pasjanss */
.h5-mj{position:relative;background:#2e7d4f;border-radius:8px;user-select:none;-webkit-user-select:none;max-width:100%;}
.h5-mjt{position:absolute;box-sizing:border-box;background:#fffdf5;border:1px solid #c9b98f;border-radius:5px;box-shadow:3px 3px 0 #b8a676,4px 5px 4px rgba(0,0,0,.35);display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;font-family:Arial,sans-serif;font-weight:bold;line-height:1;}
.h5-mjt.blocked{filter:brightness(.72) saturate(.7);cursor:default;}
.h5-mjt.sel{background:#fff1a8;box-shadow:0 0 0 3px #f5b400,3px 3px 0 #b8a676;}
.h5-mjt.hint{box-shadow:0 0 0 3px #2a8fc9,3px 3px 0 #b8a676;}
.h5-mjt .mj-s{font-size:.45em;margin-top:3px;}
.h5-mjt .mj-sym{font-size:1.15em;}

/* pogas vietnes kopējā stilā (kā .button-linkO / .button-link - layout.css): fona attēls, dubulta apmale */
.games-btn,.h5-btn,.brain-popup-go{background:url(/images/layout/linkO.png) repeat-x left top!important;color:#fff!important;border:1px solid #C1C8CB!important;box-shadow:0 0 0 1px #fff,0 0 0 2px #fcde8a!important;border-radius:5px;font:bold 12px Arial,Helvetica,sans-serif;padding:4px 12px;text-shadow:none;}
.games-btn{padding:4px 22px;margin:2px;}
.games-item:hover .games-btn,.h5-btn:hover{background:url(/images/layout/linkO.png) 0 24px!important;color:#fff!important;}
.h5-btn-light{background:url(/images/layout/link.png) repeat-x left top!important;color:#686C6E!important;box-shadow:0 0 0 1px #fff,0 0 0 2px #E6E6E6!important;}
.h5-btn-light:hover{background:url(/images/layout/link.png) 0 66px!important;color:#000!important;}
.h5-btn-light.on{background:url(/images/layout/linkO.png) repeat-x left top!important;color:#fff!important;box-shadow:0 0 0 1px #fff,0 0 0 2px #fcde8a!important;}
.h5-ov-btn{font-size:13px;padding:6px 22px;}
.h5-btn[disabled]{opacity:.5;cursor:default;}
.h5-padbtn{background:url(/images/layout/link.png) repeat-x left top!important;color:#686C6E!important;border:1px solid #C1C8CB!important;box-shadow:0 0 0 1px #fff,0 0 0 2px #E6E6E6!important;border-radius:6px;}
.h5-padbtn:hover,.h5-padbtn:active{background:url(/images/layout/link.png) 0 66px!important;color:#000!important;}
/* pogas nekad nelaužas divās rindās; ja poga augstāka par fona attēlu - zem tā tāda pati krāsa */
.games-btn,.h5-btn{white-space:nowrap;background-color:#f6b300!important;}
.h5-btn-light{background-color:#e9ecee!important;}
.h5-btn-light.on{background-color:#f6b300!important;}
.h5-padbtn{background-color:#e9ecee!important;}
@media (max-width:760px){
    .h5-bar{gap:6px 8px;}
    .h5-btns,.h5-levels{flex-wrap:wrap;gap:6px;}
    .h5-btn{padding:4px 8px;font-size:12px;}
}

/* rezultāta/sākuma logs - vietnes vispārējie virsrakstu stili netraucē (teksts nesatilpa) */
.h5-overlay .h5-ov-box{line-height:1.45;}
.h5-overlay .h5-ov-box h3{height:auto;line-height:1.3;margin:0 0 8px;padding:0;float:none;background:none;}
.h5-overlay .h5-ov-box p{height:auto;line-height:1.45;margin:0 0 12px;padding:0;}
/* darbības pogas zem laukuma ("Mest āķi", "Nomest", "Šaut") - dzeltenā vietnes poga ar tekstu */
.h5-padbtn.act{background:#f6b300 url(/images/layout/linkO.png) repeat-x left top!important;color:#fff!important;box-shadow:0 0 0 1px #fff,0 0 0 2px #fcde8a!important;font:bold 14px Arial,Helvetica,sans-serif;width:auto;min-width:110px;padding:0 18px;height:40px;}
.h5-padbtn.act.wide{width:100%;}
.h5-padbtn.act:hover,.h5-padbtn.act:active{background:#f6b300 url(/images/layout/linkO.png) 0 24px!important;color:#fff!important;}
/* pilnekrāns: laukums saglabā proporcijas (--ar = platums/augstums) */
.h5game.h5-full .h5-canvas{width:min(calc(100vw - 32px), calc((100vh - 230px) * var(--ar, 1)))!important;height:auto!important;max-width:none;}
.h5game.h5-full .h5-board-side .h5-canvas{width:min(calc(100vw - 132px), calc((100vh - 230px) * var(--ar, 1)))!important;}
@supports (height:100dvh){
    .h5game.h5-full .h5-canvas{width:min(calc(100vw - 32px), calc((100dvh - 230px) * var(--ar, 1)))!important;}
    .h5game.h5-full .h5-board-side .h5-canvas{width:min(calc(100vw - 132px), calc((100dvh - 230px) * var(--ar, 1)))!important;}
}

/* dzeltenās pogas - tas pats gradients kā linkO.png augšējā daļā (#ffd800 -> #fbad01), der jebkuram augstumam
   (attēls ir tikai 24 px poga + balta hover daļa, augstākām pogām rādījās balts) */
.games-btn,.h5-btn:not(.h5-btn-light),.h5-btn-light.on,.h5-padbtn.act{background:linear-gradient(#ffd800,#fbad01)!important;}
.games-item:hover .games-btn,.h5-btn:not(.h5-btn-light):hover,.h5-padbtn.act:hover,.h5-padbtn.act:active{background:linear-gradient(#ffe24a,#fcc23a)!important;}

/* sākumlapas bloks "Spēles" (cls_game_control::front_block) - kompaktākas kartītes */
.games-front{padding:12px 14px 14px;}
.games-front .games-list{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;}
.games-front .games-item{padding:10px 8px 12px;}
.games-front .games-thumb,.games-front .games-thumb svg,.games-front .games-thumb img{width:72px;height:72px;}
.games-front .games-name{font-size:14px;margin-bottom:8px;}

/* pogas zem laukuma - vienā rindā, viena augstuma, vietnes stilā: bultiņas pelēkas, darbības poga dzeltena, normāla platuma (2026-10-06) */
.h5-pad{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:6px;max-width:none;}
.h5-pad.h5-pad-cross{display:grid;grid-template-columns:44px 44px 44px;grid-template-rows:34px 34px;gap:4px;justify-content:start;}
.h5-padbtn{width:44px;height:34px;font-size:15px;line-height:1;padding:0;border-radius:5px;}
.h5-padbtn.wide{width:auto;}
.h5-padbtn.act,.h5-padbtn.act.wide{width:auto;min-width:0;height:34px;padding:0 18px;font:bold 12px Arial,Helvetica,sans-serif;}
.h5game.h5-full .h5-pad{justify-content:center;}
@media (hover:none) and (pointer:coarse){
    .h5-pad{justify-content:center;}
    .h5-pad.h5-pad-cross{grid-template-columns:58px 58px 58px;grid-template-rows:46px 46px;justify-content:center;}
    .h5-padbtn{width:58px;height:46px;font-size:20px;}
    .h5-padbtn.act,.h5-padbtn.act.wide{height:46px;font-size:14px;padding:0 22px;}
}

/* spēļu tops (?tops) */
.tab-box-top-games .games-tops-link{float:right;}
.games-top-tabs{display:flex;gap:6px;margin:0 0 10px;}
.games-top-tabs a{font:bold 12px Arial,Helvetica,sans-serif;padding:5px 14px;border:1px solid #C1C8CB;border-radius:5px;background:linear-gradient(#fff,#e9ecee);color:#686C6E;text-decoration:none;}
.games-top-tabs a.on{background:linear-gradient(#ffd800,#fbad01);color:#fff;border-color:#fcde8a;}
.games-top-intro{margin:0 0 14px;font-size:12px;color:#666;}
.games-tops{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;}
.games-top-card{border:1px solid #d8e2ea;border-radius:8px;padding:12px 14px 14px;background:#fff;display:flex;flex-direction:column;}
.games-top-head{display:flex;align-items:center;gap:10px;font-size:15px;font-weight:bold;color:#1b3d5c;text-decoration:none!important;margin-bottom:8px;}
.games-top-thumb svg{width:40px;height:40px;border-radius:8px;display:block;}
.games-top-card .games-top{flex:1;font-size:13px;}
.games-top-card .games-btn{align-self:flex-start;margin-top:8px;text-decoration:none;}
.games-top-more{margin-top:10px;font-size:13px;}
