/*
Theme Name: Metering
Theme URI: https://metering.ba
Author: Metering d.o.o.
Description: Samostalna tema koja replicira izgled stranice (bivši Elementor + Hello Elementor) bez ovisnosti o page builderu. Proizvodi se vode kroz ACF post type "proizvod".
Version: 1.0.0
Requires PHP: 7.4
License: GNU General Public License v3 or later.
Text Domain: metering
*/

/* ---- naslijeđeno iz Customizer CSS-a starih tema ---- */
* {
	-webkit-tap-highlight-color: rgba(255, 255, 255, 0) !important;
	outline: none !important;
}
.elementor-widget-text-editor p:last-child {
	margin-bottom: 0px;
}

/* ---- naslijeđeno iz hello-theme-child-master ---- */
.dokumentacija .woocommerce-Tabs-panel h2,
.related.products
{
	display: none !important;
}

/* ---- Dokumentacija na stranici proizvoda (naslov + lista, bez taba) ---- */
.metering-dokumentacija {
	font-family: "Cairo", sans-serif;
}
.metering-dokumentacija__title {
	font-size: 22px;
	font-weight: 600;
	color: #363636;
	margin: 0 0 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #ddd;
}
.metering-dokumentacija .wcpoa_attachment {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	padding: 10px 0;
	border-bottom: 1px solid #eee;
}
.metering-dokumentacija .wcpoa_attachment h4 {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	color: #333333;
}

/* Preuzmi dugme — replika wcpoa stila s originalne stranice
   (a.wcpoa_attachmentbtn radi specifičnosti: plugin CSS ima isti selektor) */
a.wcpoa_attachmentbtn {
	display: block;
	float: none;
	width: 100px;
	padding: 5px 5px 5px 6px;
	background: #018b94;
	color: #ffffff;
	font-family: "Cairo", sans-serif;
	font-size: 14px;
	font-weight: 400;
	text-align: center;
	text-decoration: none;
	border-radius: 5px;
	flex-shrink: 0;
}
a.wcpoa_attachmentbtn:hover,
a.wcpoa_attachmentbtn:focus {
	background: #016d74;
	color: #ffffff;
}

#wpadminbar #wp-admin-bar-elementor_edit_page > .ab-item::before {
	content: "\f345";
	top: 3px;
}

/* ---- sticky header (zamjena za Elementor sticky) ---- */
.elementor-element-0fb84ea,
.elementor-element-56e2e55,
.elementor-element-d7cdb20 {
	position: sticky;
	top: 0;
	z-index: 99;
}

/* ---- mobilni meni (zamjena za Elementor popup 719) ---- */
.metering-mm {
	position: fixed;
	inset: 0;
	z-index: 9999;
	visibility: hidden;
	pointer-events: none;
}
.metering-mm[aria-hidden="false"] {
	visibility: visible;
	pointer-events: auto;
}
.metering-mm__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
	opacity: 0;
	transition: opacity .3s;
}
.metering-mm[aria-hidden="false"] .metering-mm__overlay {
	opacity: 1;
}
.metering-mm__panel {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 320px;
	max-width: 85vw;
	background: #ffffff;
	padding: 60px 25px 25px;
	transform: translateX(-100%);
	transition: transform .3s;
	overflow-y: auto;
}
.metering-mm[aria-hidden="false"] .metering-mm__panel {
	transform: translateX(0);
}
.metering-mm__close {
	position: absolute;
	top: 12px;
	right: 15px;
	background: none;
	border: 0;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	color: #333;
}
.metering-mm .elementor-nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.metering-mm .elementor-nav-menu li a {
	display: block;
	padding: 12px 10px;
	font-family: "Cairo", sans-serif;
	font-size: 17px;
	font-weight: 600;
	color: #1f1f1f;
	border-bottom: 1px solid #eee;
}
.metering-mm .elementor-nav-menu li.current-menu-item > a {
	color: #e67817;
}

/* ---- poruka kontakt forme ---- */
.metering-form-notice {
	margin-bottom: 20px;
	padding: 12px 18px;
	border-radius: 6px;
	font-family: "Cairo", sans-serif;
}
.metering-form-notice.is-ok {
	background: #e7f6e7;
	color: #1e6b1e;
	border: 1px solid #bfe3bf;
}
.metering-form-notice.is-err {
	background: #fdecea;
	color: #a4271c;
	border: 1px solid #f3c2bd;
}

/* ---- pretraga u headeru (zamjena za Ajax Search Lite) ---- */
.metering-search {
	position: relative;
	width: 100%;
}
.metering-search form {
	display: flex;
	align-items: center;
	background: #ffffff;
	border: 1px solid #e1e1e1;
	border-radius: 5px;
	height: 44px;
	padding: 0 8px 0 14px;
}
.metering-search__input {
	flex: 1;
	min-width: 0;
	border: 0 !important;
	background: transparent !important;
	font-family: "Cairo", "Open Sans", sans-serif;
	font-size: 13px;
	color: #333;
	outline: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	height: 100%;
}
.metering-search__input::placeholder {
	color: #9a9a9a;
}
.metering-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}
.metering-search__btn {
	flex-shrink: 0;
	background: none;
	border: 0;
	padding: 4px;
	cursor: pointer;
	line-height: 0;
}
.metering-search__btn svg {
	fill: #363636;
}
.metering-search.is-loading .metering-search__btn svg {
	animation: metering-search-pulse 0.8s linear infinite;
}
@keyframes metering-search-pulse {
	50% { opacity: .3; }
}
.metering-search__results {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 999;
	background: #ffffff;
	border: 1px solid #e1e1e1;
	border-radius: 5px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	overflow: hidden;
}
.metering-search__item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 10px 14px;
	text-decoration: none;
	border-bottom: 1px solid #efefef;
}
.metering-search__item:last-child {
	border-bottom: 0;
}
.metering-search__item:hover,
.metering-search__item:focus,
.metering-search__item.is-active {
	background: #f7f7f7;
}
.metering-search__item img {
	width: 60px;
	height: 60px;
	object-fit: contain;
	flex-shrink: 0;
	background: #fff;
}
.metering-search__item h3 {
	margin: 0 0 2px;
	font-family: "Cairo", sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #1f1f1f;
	line-height: 1.3;
}
.metering-search__item p {
	margin: 0;
	font-family: "Cairo", sans-serif;
	font-size: 12px;
	color: #777;
	line-height: 1.45;
}
.metering-search__item strong {
	font-weight: 700;
	color: inherit;
}
.metering-search__empty {
	padding: 12px 14px;
	font-family: "Cairo", sans-serif;
	font-size: 13px;
	color: #777;
}

/* ---- document library ---- */
.metering-doclib {
	max-width: 1140px;
	margin: 40px auto 60px;
	padding: 0 20px;
	font-family: "Cairo", sans-serif;
}
.metering-doclib h2 {
	margin: 30px 0 10px;
}
.metering-doclib .wcpoa_attachment {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	padding: 10px 0;
	border-bottom: 1px solid #eee;
}
