/* Narrow screens: phones, and tablets in portrait. _Layout.cshtml loads this file after styles_screen.css
   with media="screen and (max-width: 979px)", so below the 980px desktop width the fixed-width
   layout becomes one fluid column. Desktop is not affected. */

BODY { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Page frame */
DIV.mw01, DIV.mw02 { width: auto; padding-left: 15px; padding-right: 15px; }
DIV.mw01 DIV.mw01 { padding-left: 0; padding-right: 0; }
IMG { max-width: 100%; height: auto; }

/* Columns stack */
.col01, .col02, .col03, .col04 { float: none; width: auto; margin-right: 0; }

/* Forms: full width, and 16px text so that iOS does not zoom in on focus */
INPUT[type="text"], INPUT[type="password"], INPUT[type="email"], INPUT[type="search"], INPUT[type="url"],
INPUT[type="tel"], INPUT[type="number"], INPUT[type="file"], TEXTAREA, SELECT { max-width: 100%; font-size: 16px; }
INPUT[type="checkbox"], INPUT[type="radio"] { width: 18px; height: 18px; vertical-align: -4px; }
.w500 { width: 100%; }
DIV.block01 DIV.pad01 { padding-left: 15px; padding-right: 15px; }
DIV.block01 DIV.block01headline { margin-left: -15px; margin-right: -15px; }
DIV.block01 DIV.block01headline A.toggler, DIV.block01 DIV.block01headline DIV { padding-left: 15px; padding-right: 15px; }
DIV.block01 DIV.block01headline A.toggler SPAN.desc { display: block; padding-left: 0; }
DIV.form01 DIV.item { float: none; width: auto; }
/* Hints sit beside the fields on desktop; here they go under them */
DIV.block01 DIV.tip, DIV.form01 DIV.item DIV.tip { position: static; width: auto; background: none; font-size: 18px; line-height: 22px; margin-top: 10px !important; }
DIV.block01 DIV.tip P { padding-left: 0; }
DIV.block03 { padding-left: 15px; padding-right: 15px; }
DIV.block03 DIV.input { float: none; margin-right: 0; }
DIV.block03 SELECT.default, DIV.block03 INPUT.default, DIV.block03 INPUT.default.wide { width: 100%; }

/* Header */
DIV.header01 UL.menu00 LI { padding-left: 15px; }
DIV.header01 UL.menu00 LI A.user { min-width: 0; }

/* Home page */
DIV.front-block03 H1 { font-size: 34px; line-height: 40px; padding-top: 10px; }
DIV.front-block03 P.tagline { font-size: 22px; line-height: 28px; padding-bottom: 20px; }
DIV.front-block03 DIV.front-start { height: auto; background: #fff; border-bottom: 1px solid #ddd; }
DIV.front-block03 DIV.front-start DIV.mw01 { padding: 12px 15px; }
DIV.front-block03 DIV.a { height: auto; }
DIV.front-block03 DIV.a DIV.pad { padding: 5px 0 10px 0; }
DIV.front-block03 DIV.a INPUT.maininput { float: none; width: 100%; margin: 0 0 10px 0; font-size: 20px; }
DIV.front-block03 DIV.a INPUT.bigbutton { float: none; width: 100%; }
DIV.front-block03 DIV.a SPAN.howitworks { float: none; display: block; width: auto; }
DIV.front-block03 SPAN.pointer { display: none; }
DIV.front-block03 DIV.b { height: auto; padding-bottom: 20px; }
DIV.front-block03 UL.info { margin-right: 0; }
DIV.front-block03 UL.info LI { float: none; width: auto; margin-right: 0; }
/* Example contests: the cards keep the 330px width their backgrounds are drawn for, one or two to a row.
   The clearfix boxes of .clear would be flex items, so they go. */
DIV.frontblocks01 { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; column-gap: 20px; margin-left: 0; margin-right: 0; }
DIV.frontblocks01:before, DIV.frontblocks01:after { display: none; }
DIV.frontblocks01 DIV.col-a,
DIV.frontblocks01 DIV.col-a.nomargin { float: none; width: 330px; max-width: 100%; margin: 0 0 20px 0 !important; }
DIV.front-block02 DIV.c { margin: 0; padding: 0; }
DIV.front-block02 DIV.col-a, DIV.front-block02 DIV.col-b { float: none; width: auto; margin-right: 0; }
DIV.front-benefits DIV.col-a { float: none; width: auto; margin-right: 0; }

/* Footer */
DIV.footer01 A.bigbutton { float: none; display: block; width: auto; max-width: 300px; margin: 0 auto 30px auto; }
DIV.footer01 DIV.col-a { min-width: 0; width: 45%; margin: 0 5% 20px 0; }

/* Contest and profile headers */
DIV.contestlogo, DIV.contesttitle, DIV.holderheader { float: none; width: auto; margin: 15px 0 0 0; }
DIV.holderheader DIV.logo, DIV.holderheader DIV.text { float: none; width: auto; margin-right: 0; }
DIV.sub-block02 DIV.col { float: none; }
DIV.sub-block02 DIV.mw01 > DIV.clear > P.f-right { float: none !important; }
DIV.contestprize { margin: 15px auto 0 auto; }
P.follow, P.manage { float: none; display: inline-block; margin: 15px 0 0 0; }
UL.tabs01 { display: flex; flex-wrap: wrap; margin-top: 15px; font-size: 16px; }
UL.tabs01 LI { margin: 0; }
UL.tabs01 A { padding: 10px 9px; }
UL.tabs01 A.active { padding-top: 9px; }

/* Content blocks */
.col01 DIV.block02 { padding-left: 15px; padding-right: 15px; }
.col01 DIV.block02 UL.services01 { margin-left: -15px; margin-right: -15px; }
.col01 DIV.block02 UL.services01 LI { padding: 0 15px 20px 65px; }
.col01 DIV.block02 UL.services01 LI[class] { background-position: 15px 20px; }
DIV.block02 A.connect { float: none; display: inline-block; margin: 10px 0 0 0; }
DIV.iframe IFRAME { width: 100%; height: auto; aspect-ratio: 16 / 9; }
DIV.promotion01 H2 { font-size: 28px; }
DIV.promotion01 A.bigbutton { float: none; display: block; width: auto; }
DIV.promotion01 UL.meta01 { float: none; }
DIV.promotion01 SPAN.pointer { display: none; }
UL.listing01 { margin-right: -12px; }
UL.listing01 LI.item { width: calc(50% - 12px); margin: 12px 12px 0 0; }
UL.listing01 LI.item DIV.a { padding: 0 14px; }
UL.listing01 UL.actions02 LI { margin: 0 8px 8px 0; }
/* Tables scroll sideways; the entries list leaves out Chat and Date added (columns 4 and 5) */
DIV.listing02 { overflow-x: auto; -webkit-overflow-scrolling: touch; }
DIV.listing02 TABLE TH, DIV.listing02 TABLE TD { padding: 14px 10px; }
DIV.nc-entries-list DIV.listing02 TH:nth-child(4), DIV.nc-entries-list DIV.listing02 TD:nth-child(4),
DIV.nc-entries-list DIV.listing02 TH:nth-child(5), DIV.nc-entries-list DIV.listing02 TD:nth-child(5) { display: none; }
DIV.entrydetails01 DIV.txt, DIV.addcomment01 DIV.txt, DIV.addphoto01 DIV.txt, DIV.col01 DIV.addphoto01 DIV.txt { float: none; width: auto; }

/* Lightbox: scripts.js sets a pixel width inline */
#lightbox01box { left: 10px; right: 10px; margin: 0; width: auto !important; }
#lightbox01content01, #lightbox01content02 { float: none; width: auto; }
#lightbox01close { right: 0; bottom: 0; }

/* Tablets: room for more than one column again */
@media (min-width: 600px) {
    DIV.front-block03 UL.info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; }
    DIV.front-block03 UL.info:before, DIV.front-block03 UL.info:after { display: none; }
    UL.listing01 LI.item { width: calc(33.333% - 12px); }
}
