/**
 * GB WooCommerce Coupon Offers
 */

/* =========================================
   CHECKOUT / CART TRIGGER BUTTON
========================================= */

.gb-coupon-offers-wrapper {
	margin-top: 12px;
	width: 100%;
}

.gb-coupon-offers-trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;

	padding: 13px 18px;

	border: 1px solid #198754;
	border-radius: 6px;

	background: #198754;
	color: #ffffff;

	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;

	cursor: pointer;

	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		transform 0.2s ease;
}

.gb-coupon-offers-trigger:hover {
	background: #157347;
	border-color: #157347;
	color: #ffffff;
}

.gb-coupon-offers-trigger:focus {
	outline: 2px solid rgba(25, 135, 84, 0.35);
	outline-offset: 2px;
}

.gb-coupon-offers-trigger-icon {
	width: 22px;
	height: 22px;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 50%;

	font-size: 13px;
	font-weight: 700;
}


/* =========================================
   MODAL
========================================= */

.gb-coupon-offers-modal {
	position: fixed;
	inset: 0;

	z-index: 999999;

	display: none;

	padding: 30px;

	box-sizing: border-box;
}

.gb-coupon-offers-modal.gb-is-open {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #00000094;
}


/* =========================================
   OVERLAY
========================================= */

.gb-coupon-offers-overlay {
	position: absolute;
	inset: 0;

	background: rgba(0, 0, 0, 0.55);
}


/* =========================================
   DIALOG
========================================= */

.gb-coupon-offers-dialog {
	position: relative;

	width: 100%;
	max-width: 1100px;
	max-height: 90vh;

	overflow-y: auto;

	background: #ffffff;

	border-radius: 10px;

	padding: 30px;

	box-sizing: border-box;

	z-index: 2;
}


/* =========================================
   CLOSE BUTTON
========================================= */

.gb-coupon-offers-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ed1c24;
    color: #ffffff;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease,
		color 0.2s ease;
}

.gb-coupon-offers-close:hover {
	background: #f5f5f5;
	color: #000000;
}


/* =========================================
   MODAL HEADER
========================================= */

.gb-coupon-offers-header {
	padding-right: 50px;
	margin-bottom: 25px;
}

body.woocommerce-page .carts-views .gb-coupon-offers-header h2 {
    margin: 0;
    color: #111111;
    font-size: 20px !important;
    font-weight: 700;
    line-height: 1.3;
    padding: 0 !important;
}
.gb-coupon-offers-header p {
	margin: 0;

	color: #666666;

	font-size: 14px;
	line-height: 1.6;
}


/* =========================================
   COUPON GRID
========================================= */

.gb-coupon-offers-grid {
	display: grid;

	grid-template-columns: repeat(3, minmax(0, 1fr));

	gap: 18px;
}


/* =========================================
   COUPON CARD
========================================= */

.gb-coupon-card {
	background: #ffffff;
	border: 2px dashed #dddddd;
	border-radius: 8px;
	padding: 15px;
	box-sizing: border-box;
	transition:
		border-color 0.2s ease,
		transform 0.2s ease;
}

.gb-coupon-card:hover {
	border-color: #198754;
	transform: translateY(-2px);
}


/* =========================================
   IMAGE
========================================= */

.gb-coupon-card-image {
	width: 100%;
	margin-bottom: 14px;
	overflow: hidden;
	border-radius: 6px;
	background: #f7f7f7;
}

.gb-coupon-card-image img {
	display: block;
	width: 100%;
	height: 100%;

	object-fit: cover;
}


/* =========================================
   CONTENT
========================================= */

.gb-coupon-card-content {
	width: 100%;
}

.gb-coupon-card-title {
	margin: 0 0 7px;

	color: #111111;

	font-size: 17px;
	font-weight: 700;

	line-height: 1.4;
}

.gb-coupon-card-description {
	margin-bottom: 15px;

	color: #666666;

	font-size: 13px;
	line-height: 1.6;
}

.gb-coupon-card-description p {
	margin: 0 0 5px;
}

.gb-coupon-card-description p:last-child {
	margin-bottom: 0;
}


/* =========================================
   COUPON CODE
========================================= */

.gb-coupon-card-code-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;

	margin-top: auto;
}

.gb-coupon-code {
	flex: 1;

	min-width: 0;

	padding: 8px 10px;

	border: 1px dashed #cfcfcf;
	border-radius: 5px;

	background: #fafafa;
}

.gb-coupon-code-label {
	display: block;

	margin-bottom: 2px;

	color: #888888;

	font-size: 9px;
	font-weight: 500;

	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.gb-coupon-code strong {
	display: block;

	overflow: hidden;

	color: #111111;

	font-size: 13px;
	font-weight: 700;

	text-overflow: ellipsis;
	white-space: nowrap;
}


/* =========================================
   COPY BUTTON
========================================= */

.gb-coupon-copy-button {
	flex-shrink: 0;

	padding: 9px 12px;

	border: 1px solid #198754;
	border-radius: 5px;

	background: #198754;
	color: #ffffff;

	font-size: 12px;
	font-weight: 600;

	line-height: 1.3;

	cursor: pointer;

	transition:
		background-color 0.2s ease,
		border-color 0.2s ease;
}

.gb-coupon-copy-button:hover {
	background: #157347;
	border-color: #157347;
	color: #ffffff;
}

.gb-coupon-copy-button.gb-copied {
	background: #146c43;
	border-color: #146c43;
}


/* =========================================
   COPY MESSAGE
========================================= */

.gb-coupon-copy-message {
	min-height: 18px;

	margin-top: 7px;

	color: #198754;

	font-size: 11px;
	font-weight: 600;

	text-align: right;
}


/* =========================================
   BODY LOCK
========================================= */

body.gb-coupon-modal-open {
	overflow: hidden;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 991px) {

	.gb-coupon-offers-modal {
		padding: 20px;
	}

	.gb-coupon-offers-dialog {
		padding: 25px;
	}

	.gb-coupon-offers-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 575px) {

	.gb-coupon-offers-modal {
		padding: 10px;
	}

	.gb-coupon-offers-dialog {
		max-height: 95vh;
		padding: 20px 15px;
		border-radius: 8px;
	}

	.gb-coupon-offers-header {
		margin-bottom: 20px;
		padding-right: 40px;
	}

	.gb-coupon-offers-header h2 {
		font-size: 21px;
	}

	.gb-coupon-offers-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.gb-coupon-card-image {
		height: 150px;
	}

	.gb-coupon-offers-close {
		top: 10px;
		right: 10px;
	}

}
/* =========================================
   APPLY COUPON - AVAILABLE OFFERS
========================================= */

.gb-apply-coupon-offers {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    width: 100%;
    max-width: 357px;
}

.gb-apply-coupon-offers-icon {
	width: 30px;
	height: 30px;

	flex: 0 0 30px;

	display: flex;
	align-items: center;
	justify-content: center;

	border-radius: 50%;

	background: #eaf7ef;
	color: #198754;

	font-size: 15px;
	font-weight: 700;
}

.gb-apply-coupon-offers-content {
	display: flex;
	align-items: center;
	justify-content: space-between;

	gap: 12px;

	width: 100%;
}

.gb-apply-coupon-offers-count {
	color: #222222;

	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

.gb-apply-coupon-view-all {
	margin: 0;
	padding: 0;

	border: 0;

	background: transparent !important;
	color: #198754 !important;

	font-size: 13px;
	font-weight: 600;

	line-height: 1.4;

	cursor: pointer;

	text-decoration: none;
}

.gb-apply-coupon-view-all:hover {
	color: #157347 !important;
	text-decoration: underline;
}

.gb-apply-coupon-view-all:focus {
	outline: none;
	box-shadow: none;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 575px) {

	.gb-apply-coupon-offers {
		padding: 9px 10px;
	}

	.gb-apply-coupon-offers-icon {
		width: 28px;
		height: 28px;
		flex-basis: 28px;
	}

	.gb-apply-coupon-offers-count,
	.gb-apply-coupon-view-all {
		font-size: 12px;
	}

}