/**
 * Coca-Cola Pontok – frontend stílusok.
 *
 * @package CocaColaPontok
 */

/* Konténer */
.ccp-wrap {
	max-width: 100%;
	font-family: inherit;
	text-align: center;
}

/* -------------------------------------------------------------------
 * Gombok
 * ---------------------------------------------------------------- */
.ccp-btn {
	display: inline-block;
	padding: 14px 28px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	border: none;
	border-radius: 6px;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.ccp-btn:disabled,
.ccp-btn.is-loading {
	opacity: 0.6;
	cursor: default;
}

/* Piros bejelentkezés/regisztráció gomb – ÉLES (lekerekítetlen) sarkok. */
.ccp-btn--login,
.ccp-btn--square {
	background-color: #f40009; /* Coca-Cola piros */
	color: #fff;
	border-radius: 0; /* éles sarok */
}

.ccp-btn--login:hover {
	background-color: #c41420;
	color: #fff;
}

/* Kód beváltása gomb */
.ccp-btn--redeem {
	background-color: #f40009;
	color: #fff;
}
.ccp-btn--redeem:hover {
	background-color: #c41420;
}

/* Veszély (profiltörlés) gomb – nagy, piros */
.ccp-btn--danger {
	background-color: #f40009;
	color: #fff;
}
.ccp-btn--danger:hover {
	background-color: #c41420;
}
/* Profil törlése – visszafogott, alacsony hangsúlyú "link" megjelenés. */
.ccp-btn--delete-profile {
	background-color: transparent;
	color: #777;
	font-size: 14px;
	font-weight: 400;
	padding: 6px 10px;
	border-radius: 0;
	text-decoration: underline;
}
.ccp-btn--delete-profile:hover {
	background-color: transparent;
	color: #c41420; /* hoverkor finom piros – jelzi a veszélyt */
}

/* Másodlagos / "Mégse" gomb */
.ccp-btn--ghost {
	background-color: #eee;
	color: #333;
}
.ccp-btn--ghost:hover {
	background-color: #ddd;
}

/* -------------------------------------------------------------------
 * Kódbeváltó űrlap
 * ---------------------------------------------------------------- */
.ccp-points-badge {
	margin-bottom: 12px;
	font-size: 16px;
}

.ccp-field-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.ccp-field-row {
	display: flex;
	gap: 8px;
	flex-wrap: nowrap;
	align-items: stretch;
	width: 100%;
}

.ccp-input {
	flex: 1 1 auto;     /* a mező kitölti a rendelkezésre álló helyet, kitolva a gombot a container széléig */
	min-width: 0;       /* enged a flexnek zsugorodni, hogy ne lógjon ki kis kijelzőn */
	padding: 12px 14px;
	font-size: 16px;
	letter-spacing: 1px;
	text-transform: uppercase;
	border: 2px solid #ccc;
	border-radius: 6px;
}

/* A gomb természetes szélességű marad; a mező tolja a container széléig. */
.ccp-field-row .ccp-btn--redeem {
	flex: 0 0 auto;
	white-space: nowrap;
}
.ccp-input:focus {
	border-color: #e61a27;
	outline: none;
}

/* -------------------------------------------------------------------
 * Üzenetek
 * ---------------------------------------------------------------- */
.ccp-message {
	margin-top: 12px;
	padding: 0;
	font-size: 15px;
	display: none; /* alapból rejtve – csak akkor jelenik meg, ha van tényleges üzenet */
}

/* Csak akkor jelenítjük meg, ha ténylegesen van benne szöveg. */
.ccp-message:not(:empty) {
	display: block;
}
.ccp-message--success {
	padding: 10px 14px;
	background-color: #e6f4ea;
	color: #1e7e34;
	border-radius: 6px;
}
.ccp-message--error {
	padding: 10px 14px;
	background-color: #fdecea;
	color: #b71c1c;
	border-radius: 6px;
}

/* Bezárható üzenet: helyet hagyunk a jobb felső "×" gombnak. */
.ccp-message--dismissible {
	position: relative;
	padding-right: 38px;
}

.ccp-message-close {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY( -50% );
	width: 24px;
	height: 24px;
	padding: 0;
	font-size: 20px;
	line-height: 1;
	font-weight: 700;
	color: inherit;
	background: transparent;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	opacity: 0.65;
	transition: opacity 0.15s ease;
}
.ccp-message-close:hover,
.ccp-message-close:focus {
	opacity: 1;
	outline: none;
}

/* -------------------------------------------------------------------
 * Megerősítő modal
 * ---------------------------------------------------------------- */
.ccp-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.55 );
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 20px;
}
.ccp-modal-overlay.is-open {
	display: flex;
}

.ccp-modal {
	background: #fff;
	max-width: 460px;
	width: 100%;
	padding: 28px;
	border-radius: 10px;
	box-shadow: 0 12px 40px rgba( 0, 0, 0, 0.25 );
}
.ccp-modal-title {
	margin: 0 0 12px;
	font-size: 20px;
	color: #e61a27;
}
.ccp-modal-text {
	margin: 0 0 22px;
	font-size: 15px;
	line-height: 1.5;
	color: #333;
}
.ccp-modal-actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	flex-wrap: wrap;
}

/* -------------------------------------------------------------------
 * WooCommerce pontkijelzés
 * ---------------------------------------------------------------- */
.ccp-available-points {
	font-size: 16px;
}

/* -------------------------------------------------------------------
 * Pénztár: csak szállítási cím (számlázási cím nélkül)
 *
 * A számlázási mezőket PHP-ból eltávolítjuk; a maradék (üres) számlázási
 * fejlécet és a "Szállítás másik címre?" kapcsolót itt rejtjük el. A
 * szállítási mezőket mindig láthatóvá tesszük (a kapcsolót PHP-ból bekapcsoltuk).
 * Csak a pénztár oldalra szűkítve (body.woocommerce-checkout).
 * ---------------------------------------------------------------- */
body.woocommerce-checkout .woocommerce-billing-fields {
	display: none;
}
body.woocommerce-checkout #ship-to-different-address {
	display: none;
}
body.woocommerce-checkout .shipping_address {
	display: block !important;
}

/* -------------------------------------------------------------------
 * Pénztár: kevés pont – letiltott "Megrendelés" gomb
 * ---------------------------------------------------------------- */
/* A letiltott rendelés gomb halványan, kattinthatatlanul jelenik meg. */
#place_order.ccp-disabled,
#place_order:disabled,
.button.ccp-disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

/* -------------------------------------------------------------------
 * Pénztár: keretezett termék-összegző (kép + név + ár)
 * ---------------------------------------------------------------- */
.ccp-checkout-items {
	border: 2px solid #f40009; /* Coca-Cola piros keret */
	border-radius: 8px;
	padding: 16px 18px;
	margin: 0 0 20px;
	text-align: left;
}
.ccp-checkout-items__title {
	margin: 0 0 12px;
	font-size: 16px;
}
.ccp-checkout-items__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ccp-checkout-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #eee;
}
.ccp-checkout-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}
.ccp-checkout-item:first-child {
	padding-top: 0;
}
.ccp-checkout-item__image {
	flex: 0 0 60px;
}
.ccp-checkout-item__image img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}
.ccp-checkout-item__details {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.ccp-checkout-item__name {
	font-weight: 600;
	line-height: 1.3;
}
.ccp-checkout-item__price {
	flex: 0 0 auto;
	font-weight: 700;
	white-space: nowrap;
}

/* Mennyiség + eltávolítás vezérlők. */
.ccp-checkout-item__controls {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
}
.ccp-checkout-item__qty {
	width: 64px;
	height: 38px;
	margin: 0; /* a téma alap input-margóját nullázzuk a helyes igazításhoz */
	padding: 6px 8px;
	text-align: center;
	box-sizing: border-box;
	line-height: normal;
}
.ccp-checkout-item__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	color: #b71c1c;
	background: transparent;
	border: 1px solid #e0b4b4;
	border-radius: 4px;
	cursor: pointer;
	box-sizing: border-box;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.ccp-checkout-item__remove:hover {
	background-color: #f40009;
	border-color: #f40009;
	color: #fff;
}

/* "Nincs elég pont" figyelmeztetés a dobozon belül. */
.ccp-checkout-items__notice {
	margin: 12px 0 0;
}

/* Töltés közbeni állapot a kosármódosításnál. */
.ccp-checkout-items.ccp-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* -------------------------------------------------------------------
 * Regisztrációs űrlap (Fiókom)
 * ---------------------------------------------------------------- */

/* Segédszöveg a Név mező alatt. */
.ccp-reg-help {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	line-height: 1.4;
	color: #666;
}

/* Kötelező elfogadó checkboxok. */
.ccp-reg-consent {
	margin: 0 0 12px;
}
.ccp-reg-consent label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 14px;
	line-height: 1.45;
}
.ccp-reg-consent input[type="checkbox"] {
	margin-top: 3px;
	flex: 0 0 auto;
}

/*
 * A jelszót regisztrációkor bekérjük, nincs e-mailes jelszó-link, ezért a
 * "Regisztrációval a fiók létrejön..." segédszöveget elrejtjük. (Ha a Bricks
 * űrlapba kézzel írt szövegelemként került be, azt a Bricks szerkesztőben kell törölni.)
 */
.generate-password-text {
	display: none;
}
