/* Responsive fixes for phones, landscape phones and tablets (2026-10-24).
   Loaded after style_v2.css and mobile.css from includes/head.php.
   Desktop (>= 1025px) is untouched: every rule below sits in a max-width (or 1001-1024) media query,
   except the close button that general.js adds to the off-canvas menu, which is hidden by default. */

.mobileNavClose {
	display: none;
}

/* ---------- <= 1024px: tablets and phones ---------- */
@media screen and (max-width: 1024px) {
	/* header login/register links: bigger tap area, same box size */
	.header_userBox {
		padding: 0 9px;
	}

	.header_userBox a {
		display: inline-block;
		padding: 11px 6px;
	}

	/* the profile photo link is the real tap target */
	.profileList .profileBox figure a {
		display: block;
	}

	/* card description: two whole lines with an ellipsis instead of a cut third line */
	.profileList .profileBox .desc {
		line-height: 15px;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	/* first-visit popup: grow with its content and never run past the screen */
	.popUpContainer {
		top: 0;
		left: 0;
	}

	.popUpContainer .box .container {
		height: auto;
		max-height: calc(100vh - 40px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* the 9px close icon gets a 44px tap area centred on the same spot */
	.popUpContainer .box .bar .close {
		width: 44px;
		height: 44px;
		right: -2px;
		top: -2px;
		background-position: center center;
	}

	/* registration form: a real-size gender select */
	#tl_registration select {
		width: 335px;
		max-width: 100%;
		height: 35px;
		font-size: 14px;
		box-sizing: border-box;
	}

	/* footer links */
	footer ul li a {
		display: inline-block;
		padding: 8px 4px;
	}

	/* "Spletni piskotki" tab: same 12px as the cookie bar text */
	#cookieTabOpen {
		font-size: 12px;
	}
}

/* 1001-1024px (iPad landscape): the page is not floated here, so contain its floats to make the
   cookie-bar reserve work, and pin the popup to the viewport (it would otherwise sit after .pageAlign).
   The full-width note under the private-album gallery was 100% + 18px margin = 6px sideways scroll. */
@media screen and (min-width: 1001px) and (max-width: 1024px) {
	.pageAlign {
		display: flow-root;
		padding-bottom: 50px;
	}

	.pageAlign::after {
		content: "";
		display: table;
		clear: both;
	}

	.regularContent.fullWidth {
		width: calc(100% - 18px);
	}
}

/* ---------- <= 1000px ---------- */
@media screen and (max-width: 1000px) {
	/* private-album gallery: grid instead of floats (4 x 25.52% did not fit and left float holes) */
	.mod_ed_gallery_list {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		grid-gap: 20px;
		gap: 20px;
	}

	.mod_ed_gallery_list .item,
	.mod_ed_gallery_list .item:nth-child(n) {
		float: none;
		width: auto;
		margin: 0;
	}

	/* SMS-price disclosure and copyright: readable size and contrast */
	footer .copyright {
		font-size: 13px;
		color: #8c8c8c;
	}

	footer .fullWidth p {
		font-size: 13px;
		line-height: 1.4;
		color: #8c8c8c;
		text-align: left;
	}
}

/* ---------- 651-980px: search gets its own row under the menu bar (mobile.css hid it) ---------- */
@media screen and (min-width: 651px) and (max-width: 980px) {
	#topBar {
		height: auto;
		background: none;
	}

	#topBar .mainNav {
		height: 44px;
		background: url(../img/sprites.png) 0 -99px no-repeat;
	}

	#topBar .mod_catalogfilter {
		display: block;
		float: none;
		width: 283px;
		margin: 6px auto 0;
	}

	#topBar .mod_catalogfilter .search_group {
		display: flow-root;
	}

	#topBar .mod_catalogfilter .search_group::after {
		content: "";
		display: table;
		clear: both;
	}

	#topBar .mod_catalogfilter #tl_videoclips_search {
		margin-top: 0;
	}
}

/* ---------- <= 650px: phones ---------- */
@media screen and (max-width: 650px) {
	.mod_ed_gallery_list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		grid-gap: 15px;
		gap: 15px;
	}

	/* off-canvas menu: close button (added by general.js), a dimmed backdrop, and the search at the top */
	.mainNav > nav {
		padding-top: 95px;
	}

	.mainNav.open {
		box-shadow: 2px 0 10px rgba(50, 50, 50, 0.5), 0 0 0 100vmax rgba(0, 0, 0, 0.55);
	}

	.mobileNavClose {
		display: block;
		position: absolute;
		top: 0;
		right: 0;
		width: 44px;
		height: 44px;
		line-height: 44px;
		text-align: center;
		font-size: 32px;
		color: #000;
		cursor: pointer;
		z-index: 1;
	}

	#topBar .mod_catalogfilter {
		display: block;
		position: fixed;
		top: 44px;
		left: -100%;
		width: 60%;
		float: none;
		margin: 0;
		padding: 0 20px;
		box-sizing: border-box;
		z-index: 4;
		visibility: hidden;
		-webkit-transition: left 0.5s ease, visibility 0.5s;
		transition: left 0.5s ease, visibility 0.5s;
	}

	#topBar .mainNav.open ~ .mod_catalogfilter {
		left: 0;
		visibility: visible;
	}

	#topBar .mod_catalogfilter #tl_videoclips_search {
		margin-top: 0;
	}

	#topBar .mod_catalogfilter #ctrl_filter_search {
		width: calc(100% - 64px);
		padding-left: 35px;
		box-sizing: border-box;
		background-color: #000;
		font-size: 16px;
	}

	/* registration/login: 16px inputs so iOS does not zoom on focus */
	#tl_registration input[type="text"],
	#tl_registration input[type="email"],
	#tl_registration input[type="password"],
	#tl_registration select,
	#tl_login input[type="text"],
	#tl_login input[type="password"] {
		font-size: 16px;
	}
}

@media screen and (max-width: 580px) {
	#tl_registration select {
		width: 100%;
		margin-top: 5px;
	}
}

@media screen and (max-width: 540px) {
	.mod_ed_gallery_list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 360px) {
	#topBar .mod_catalogfilter {
		width: 80%;
	}
}

/* ---------- landscape phones: compact header and popup ---------- */
@media screen and (max-width: 1000px) and (max-height: 500px) and (orientation: landscape) {
	header {
		text-align: left;
	}

	#logo a {
		float: left;
		display: block;
		width: 290px;
		height: 50px;
		margin: 10px 0;
		background: url(../img/logo_mobile.png) 0 0 no-repeat;
	}

	.header_userBox {
		float: right;
		display: block;
		margin: 15px 0 10px;
	}

	#topBar {
		clear: both;
	}

	.popUpContainer .box {
		margin-top: 10px;
	}

	.popUpContainer .box .container {
		max-height: calc(100vh - 20px);
		padding: 15px 25px;
	}

	.popUpContainer .box .bar {
		font-size: 22px;
	}

	.popUpContainer .box .bar .title span {
		font-size: 30px;
	}

	.popUpContainer .box .inside {
		padding: 10px 0 0;
	}

	.popUpContainer .box .inside form {
		margin-top: 15px;
	}

	.popUpContainer .box .inside form input[type="text"] {
		height: 40px;
	}

	.popUpContainer .box .inside form input[type="submit"] {
		margin-top: 12px;
		font-size: 20px;
	}
}
