/* =====================================================================
 * SCHELE EGEA — Cere ofertă: modal + formular + butoane catalog.
 *
 * Tot stilul e prefixat cu .egea- pentru izolare față de tema părinte.
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * BUTOANE — pe pagina de produs (single) și pe lista de produse (loop)
 * ------------------------------------------------------------------- */
.egea-cere-oferta-wrapper {
	margin-top: 20px;
}

.egea-cere-oferta-btn,
.egea-cere-oferta-loop-btn {
	display: inline-block;
	background: #d61a23;
	color: #fff !important;
	border: 0;
	padding: 14px 28px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.1s ease;
	line-height: 1.2;
}

.egea-cere-oferta-btn:hover,
.egea-cere-oferta-btn:focus,
.egea-cere-oferta-loop-btn:hover,
.egea-cere-oferta-loop-btn:focus {
	background: #b3141c;
	color: #fff !important;
	outline: none;
}

.egea-cere-oferta-btn:active,
.egea-cere-oferta-loop-btn:active {
	transform: translateY(1px);
}

/* Loop button mai compact pe carduri */
.egea-cere-oferta-loop-btn {
	padding: 10px 20px;
	font-size: 13px;
}

/* ---------------------------------------------------------------------
 * MODAL
 * ------------------------------------------------------------------- */
.egea-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.egea-modal[hidden] {
	display: none;
}

.egea-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.egea-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 18, 25, 0.7);
	backdrop-filter: blur(2px);
	cursor: pointer;
}

.egea-modal__dialog {
	position: relative;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	max-width: 560px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 22px 24px 20px;
	transform: translateY(20px);
	transition: transform 0.25s ease;
}

.egea-modal.is-open .egea-modal__dialog {
	transform: translateY(0);
}

.egea-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	font-size: 28px;
	line-height: 1;
	color: #555;
	cursor: pointer;
	border-radius: 50%;
	transition: background 0.15s ease, color 0.15s ease;
}

.egea-modal__close:hover,
.egea-modal__close:focus {
	background: #f1f1f1;
	color: #000;
	outline: none;
}

/* Header modal — logo (stânga) + titlu */
.egea-modal__header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 14px;
	padding-right: 36px;
	padding-bottom: 12px;
	border-bottom: 1px solid #ececec;
}

.egea-modal__logo {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	line-height: 0;
}

.egea-modal__logo img {
	display: block;
	max-height: 44px;
	width: auto;
	max-width: 140px;
	height: auto;
	object-fit: contain;
}

.egea-modal__title {
	margin: 0;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 700;
	color: #1a1a1a;
	flex: 1;
	min-width: 0;
}

.egea-modal__product-name {
	display: block;
	margin-top: 2px;
	color: #d61a23;
	font-size: 14px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.egea-modal__body {
	font-size: 13px;
	color: #333;
}

.egea-modal__body p {
	margin: 0;
}

/* ---------------------------------------------------------------------
 * FORMULAR — grid 2 coloane, full-width pentru câmpul mesaj și accept.
 * ------------------------------------------------------------------- */
.egea-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 12px;
	margin-bottom: 8px;
}

.egea-form-row {
	margin: 0;
}

.egea-form-row--full,
.egea-form-row--accept {
	grid-column: 1 / -1;
}

/* Câmpul „Detalii suplimentare" — ocupă o singură coloană (jumătate de rând). */
.egea-form-row--half {
	grid-column: 1 / -1;
}

.egea-form-hint {
	font-size: 11px;
	font-weight: 400;
	color: #888;
	margin-left: 4px;
}

.egea-modal__body label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #333;
	margin-bottom: 2px;
	line-height: 1.4;
}

.egea-modal__body .required {
	color: #d61a23;
}

.egea-modal__body input[type="text"],
.egea-modal__body input[type="email"],
.egea-modal__body input[type="tel"],
.egea-modal__body textarea {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid #d4d4d4;
	border-radius: 4px;
	font-size: 13px;
	background: #fafafa;
	transition: border-color 0.15s ease, background 0.15s ease;
	font-family: inherit;
	line-height: 1.4;
}

.egea-modal__body textarea {
	min-height: 36px;
	height: 36px;
	max-height: 90px;
	resize: vertical;
	line-height: 1.4;
}

.egea-modal__body input:focus,
.egea-modal__body textarea:focus {
	outline: none;
	border-color: #d61a23;
	background: #fff;
}

/* Acceptance — bifa GDPR */
.egea-form-row--accept {
	margin-top: 2px;
	padding: 4px 0 0;
}

.egea-form-row--accept .wpcf7-list-item {
	margin: 0;
	display: flex;
	align-items: flex-start;
	gap: 7px;
}

.egea-form-row--accept .wpcf7-list-item-label {
	font-size: 12px;
	line-height: 1.4;
	color: #555;
}

.egea-form-row--accept input[type="checkbox"] {
	margin-top: 2px;
	flex-shrink: 0;
	width: 15px;
	height: 15px;
	accent-color: #d61a23;
	cursor: pointer;
}

.egea-form-row--accept a {
	color: #d61a23;
	text-decoration: underline;
}

.egea-form-row--accept a:hover {
	color: #b3141c;
}

/* Submit */
.egea-form-submit {
	margin: 12px 0 0;
	text-align: center;
}

.egea-modal__body .wpcf7-submit {
	background: #d61a23;
	color: #fff;
	border: 0;
	padding: 11px 30px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s ease;
	width: 100%;
}

.egea-modal__body .wpcf7-submit:hover {
	background: #b3141c;
}

.egea-modal__body .wpcf7-submit:disabled {
	background: #aaa;
	cursor: wait;
}

/* CF7 messages */
.egea-modal__body .wpcf7-response-output {
	margin: 16px 0 0 !important;
	padding: 10px 14px !important;
	font-size: 13px;
	border-radius: 4px;
}

.egea-modal__body .wpcf7 form.sent .wpcf7-response-output {
	border-color: #46b450 !important;
	background: #ecf7ed;
	color: #1e6b30;
}

.egea-modal__body .wpcf7 form.invalid .wpcf7-response-output,
.egea-modal__body .wpcf7 form.unaccepted .wpcf7-response-output {
	border-color: #d61a23 !important;
	background: #fdecec;
	color: #b3141c;
}

.egea-modal__body .wpcf7-not-valid-tip {
	color: #d61a23;
	font-size: 12px;
	margin-top: 4px;
	display: block;
}

/* Loader spinner */
.egea-modal__body .wpcf7-spinner {
	margin: 0 0 0 8px;
}

/* ---------------------------------------------------------------------
 * BODY LOCK când modalul e deschis
 * ------------------------------------------------------------------- */
body.egea-modal-open {
	overflow: hidden;
}

/* ---------------------------------------------------------------------
 * ASCUNDERE COMPLETĂ A IC0NIȚELOR DE COȘ / CHECKOUT / CONT
 *
 *  - Tema părinte: `.tx-sideInfoWrapper` (sidebar mini-cart) + `.tx-cart-count`
 *  - Selectori generici WooCommerce: link-uri către cart, checkout, my-account
 *  - Elementor cart icon widget (folosit dacă header-ul e construit cu Elementor)
 *
 * Folosim un selector larg ca să prindem orice variantă, dar fără să rupem layout-ul.
 * ------------------------------------------------------------------- */
.tx-sideInfoWrapper,
.tx-cart-count,
.header-mini-cart,
.tx-sideMenu-toggle,
.elementor-menu-cart__wrapper,
.elementor-menu-cart__toggle,
.elementor-button-icon .eicon-cart,
.widget_shopping_cart,
.cart-contents,
.site-header-cart,
li.menu-item a[href*="/cart"],
li.menu-item a[href*="/checkout"],
li.menu-item a[href*="/my-account"],
.elementor-nav-menu a[href*="/cart"],
.elementor-nav-menu a[href*="/checkout"],
.elementor-nav-menu a[href*="/my-account"] {
	display: none !important;
}

/* ---------------------------------------------------------------------
 * RESPONSIVE
 * ------------------------------------------------------------------- */
@media (max-width: 640px) {
	.egea-modal {
		padding: 0;
	}
	.egea-modal__dialog {
		max-width: 100%;
		min-height: 100vh;
		max-height: 100vh;
		border-radius: 0;
		padding: 20px 18px;
	}
	.egea-modal__header {
		gap: 10px;
	}
	.egea-modal__logo img {
		max-height: 36px;
		max-width: 110px;
	}
	.egea-modal__title {
		font-size: 14px;
	}
	.egea-modal__product-name {
		font-size: 13px;
	}
	.egea-form-grid {
		grid-template-columns: 1fr;
	}
	.egea-cere-oferta-btn {
		width: 100%;
	}
}
