/**
 * HostingTags — Provider Coupons Page Styles
 *
 * Styles for /provider/{slug}/coupons/ pages.
 *
 * @package HostingTags
 * @since 2.3.0
 */

/* ============================
   COUPONS PAGE CONTAINER
   ============================ */
.htc-coupons-page {
	padding-bottom: 40px;
}

/* ============================
   HERO SECTION
   ============================ */
.htc-hero {
	background: linear-gradient(135deg, var(--ht-gray-900, #0f172a) 0%, var(--ht-primary-dark, #1e3a5f) 50%, var(--ht-primary, #1e40af) 100%);
	border-radius: 14px;
	overflow: hidden;
	margin-bottom: 28px;
}

.htc-hero__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 32px 28px 24px;
	gap: 24px;
	flex-wrap: wrap;
}

.htc-hero__left {
	display: flex;
	align-items: center;
	gap: 18px;
	flex: 1;
	min-width: 0;
}

.htc-hero__logo-link {
	flex-shrink: 0;
}

.htc-hero__logo {
	width: 80px;
	height: 80px;
	border-radius: 14px;
	object-fit: contain;
	background: #fff;
	padding: 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.htc-hero__info {
	flex: 1;
	min-width: 0;
}

.htc-hero__title {
	margin: 0 0 8px;
	font-size: calc(var(--ht-body-size, 14px) * 1.57);
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

.htc-hero__subtitle {
	margin: 0;
	font-size: var(--ht-body-size, 14px);
	color: rgba(255, 255, 255, 0.75);
	line-height: 1.6;
}

/* Stats */
.htc-hero__stats {
	display: flex;
	gap: 16px;
	flex-shrink: 0;
}

.htc-stat {
	text-align: center;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 10px;
	padding: 14px 18px;
	min-width: 90px;
}

.htc-stat__value {
	display: block;
	font-size: calc(var(--ht-body-size, 14px) * 1.57);
	font-weight: 800;
	color: #fff;
	line-height: 1.2;
}

.htc-stat__value small {
	font-size: calc(var(--ht-body-size, 14px) * 0.93);
	font-weight: 500;
	opacity: 0.7;
}

.htc-stat__label {
	display: block;
	font-size: calc(var(--ht-body-size, 14px) * 0.79);
	color: rgba(255, 255, 255, 0.6);
	margin-top: 2px;
	white-space: nowrap;
}

/* Hero Nav */
.htc-hero__nav {
	display: flex;
	gap: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.htc-hero__nav-item {
	padding: 12px 24px;
	font-size: calc(var(--ht-body-size, 14px) * 0.93);
	font-weight: 600;
	color: rgba(255, 255, 255, 0.6);
	text-decoration: none;
	transition: color 0.2s, background 0.2s;
	border-bottom: 2px solid transparent;
}

.htc-hero__nav-item:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.05);
}

.htc-hero__nav-item--active {
	color: #fff;
	border-bottom-color: var(--ht-primary, #3b82f6);
	background: rgba(255, 255, 255, 0.05);
}

/* ============================
   OFFERS HEADER
   ============================ */
.htc-offers-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 12px;
}

.htc-offers-title {
	margin: 0;
	font-size: calc(var(--ht-body-size, 14px) * 1.29);
	font-weight: 700;
	color: var(--ht-gray-900, #111827);
}

/* ============================
   SECTION TITLE
   ============================ */
.htc-section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	font-size: calc(var(--ht-body-size, 14px) * 1.43);
	font-weight: 700;
	color: var(--ht-gray-900, #111827);
	padding-bottom: 14px;
	border-bottom: 2px solid var(--ht-gray-200, #e5e7eb);
}

.htc-section-title svg {
	color: var(--ht-primary, #2563eb);
	flex-shrink: 0;
}

/* ============================
   OFFER CARD
   ============================ */
.htc-offers-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 40px;
}

.htc-offer-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px;
	background: #fff;
	border: 1px solid var(--ht-gray-200, #e5e7eb);
	border-radius: 12px;
	transition: box-shadow 0.2s, border-color 0.2s;
	position: relative;
}

.htc-offer-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
	border-color: var(--ht-gray-300, #d0d5dd);
}

/* Rank Number */
.htc-offer-card__rank {
	position: absolute;
	top: -8px;
	left: 12px;
	background: var(--ht-primary, #1e40af);
	color: #fff;
	font-size: calc(var(--ht-body-size, 14px) * 0.79);
	font-weight: 700;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Discount Badge */
.htc-offer-card__badge {
	flex-shrink: 0;
	width: 90px;
	height: 80px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	border: 2px dashed;
	text-align: center;
}

.htc-offer-card__badge--code {
	background: linear-gradient(135deg, var(--ht-success-light, #f0fdf4), var(--ht-success-light, #dcfce7));
	border-color: var(--ht-success, #86efac);
}

.htc-offer-card__badge--deal {
	background: linear-gradient(135deg, #eff6ff, #dbeafe);
	border-color: var(--ht-primary-light, #93c5fd);
}

.htc-offer-card__discount {
	font-size: calc(var(--ht-body-size, 14px) * 1.43);
	font-weight: 800;
	color: var(--ht-success-dark, #166534);
	line-height: 1.1;
}

.htc-offer-card__badge--deal .htc-offer-card__discount {
	color: var(--ht-primary, #1e40af);
}

.htc-offer-card__badge-label {
	font-size: calc(var(--ht-body-size, 14px) * 0.79);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ht-success, #16a34a);
}

.htc-offer-card__badge--deal .htc-offer-card__badge-label {
	color: var(--ht-primary, #2563eb);
	font-size: var(--ht-body-size, 14px);
	font-weight: 700;
}

/* Info */
.htc-offer-card__info {
	flex: 1;
	min-width: 0;
}

.htc-offer-card__title {
	margin: 0 0 6px;
	font-size: calc(var(--ht-body-size, 14px) * 1.14);
	font-weight: 600;
	line-height: 1.4;
}

.htc-offer-card__title a {
	color: var(--ht-gray-900, #111827);
	text-decoration: none;
}

.htc-offer-card__title a:hover {
	color: var(--ht-primary, #2563eb);
}

.htc-offer-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 6px;
	font-size: calc(var(--ht-body-size, 14px) * 0.86);
}

.htc-offer-card__type {
	background: var(--ht-gray-100, #f3f4f6);
	color: var(--ht-gray-600, #4b5563);
	padding: 2px 8px;
	border-radius: 4px;
	font-weight: 500;
}

.htc-offer-card__price {
	color: var(--ht-success, #059669);
	font-weight: 600;
}

.htc-offer-card__price small {
	font-weight: 400;
	color: var(--ht-gray-500, #6b7280);
}

.htc-offer-card__expiry {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: var(--ht-gray-400, #9ca3af);
}

.htc-offer-card__desc {
	margin: 0;
	font-size: calc(var(--ht-body-size, 14px) * 0.93);
	color: var(--ht-gray-500, #6b7280);
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Action Buttons */
.htc-offer-card__action {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: 150px;
}

/* Reveal Button (Coupon Code) */
.htc-reveal-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding: 10px 16px;
	background: linear-gradient(135deg, var(--ht-success, #16a34a), var(--ht-success-dark, #15803d));
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.15s;
	box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
	position: relative;
	overflow: hidden;
}

.htc-reveal-btn::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 28px;
	height: 100%;
	background: repeating-linear-gradient(
		-45deg,
		transparent,
		transparent 3px,
		rgba(255, 255, 255, 0.15) 3px,
		rgba(255, 255, 255, 0.15) 6px
	);
	border-left: 2px dashed rgba(255, 255, 255, 0.4);
}

.htc-reveal-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}

.htc-reveal-btn__hint {
	font-family: 'Courier New', Courier, monospace;
	font-size: calc(var(--ht-body-size, 14px) * 1.07);
	font-weight: 700;
	color: #fff;
	letter-spacing: 1px;
}

.htc-reveal-btn__label {
	font-size: calc(var(--ht-body-size, 14px) * 0.71);
	color: rgba(255, 255, 255, 0.8);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600;
}

/* Revealed state */
.htc-reveal-btn.htc-revealed {
	background: #fff;
	border: 2px dashed var(--ht-success, #16a34a);
	box-shadow: none;
	padding: 8px 16px;
}

.htc-reveal-btn.htc-revealed::after {
	display: none;
}

.htc-reveal-btn.htc-revealed .htc-reveal-btn__hint {
	color: var(--ht-success-dark, #166534);
	font-size: calc(var(--ht-body-size, 14px) * 1.14);
}

.htc-reveal-btn.htc-revealed .htc-reveal-btn__label {
	color: var(--ht-success, #16a34a);
}

/* Deal Button (No Code) */
.htc-deal-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 12px 20px;
	background: linear-gradient(135deg, var(--ht-primary, #2563eb), var(--ht-primary-dark, #1d4ed8));
	color: #fff !important;
	border-radius: 8px;
	text-decoration: none !important;
	font-weight: 600;
	font-size: var(--ht-body-size, 14px);
	transition: transform 0.15s, box-shadow 0.15s;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.htc-deal-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
	color: #fff !important;
}

/* Users Count */
.htc-offer-card__users {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: calc(var(--ht-body-size, 14px) * 0.79);
	color: var(--ht-gray-400, #9ca3af);
}

/* ============================
   NO OFFERS EMPTY STATE
   ============================ */
.htc-no-offers {
	text-align: center;
	padding: 60px 20px;
	color: var(--ht-gray-500, #6b7280);
}

.htc-no-offers h3 {
	margin: 16px 0 8px;
	font-size: calc(var(--ht-body-size, 14px) * 1.29);
	color: var(--ht-gray-700, #374151);
}

.htc-no-offers p {
	margin: 0 0 20px;
	font-size: var(--ht-body-size, 14px);
}

.htc-back-link {
	color: var(--ht-primary, #2563eb);
	text-decoration: none;
	font-weight: 600;
}

.htc-back-link:hover {
	text-decoration: underline;
}

/* ============================
   RECOMMENDED PROVIDERS
   ============================ */
.htc-recommended {
	margin: 40px 0 32px;
}

.htc-recommended__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 12px;
}

.htc-recommended__card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid var(--ht-gray-200, #e5e7eb);
	border-radius: 10px;
	text-decoration: none !important;
	color: var(--ht-gray-700, #374151);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.htc-recommended__card:hover {
	border-color: var(--ht-primary, #2563eb);
	box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}

.htc-recommended__logo {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	object-fit: contain;
	flex-shrink: 0;
	background: var(--ht-gray-50, #f9fafb);
	padding: 3px;
}

.htc-recommended__info {
	flex: 1;
	min-width: 0;
}

.htc-recommended__name {
	display: block;
	font-size: var(--ht-body-size, 14px);
	font-weight: 600;
	color: var(--ht-gray-900, #111827);
}

.htc-recommended__meta {
	font-size: calc(var(--ht-body-size, 14px) * 0.86);
	color: var(--ht-success, #16a34a);
	font-weight: 500;
}

.htc-recommended__count {
	flex-shrink: 0;
	font-size: calc(var(--ht-body-size, 14px) * 0.79);
	background: var(--ht-primary-lighter, #eff6ff);
	color: var(--ht-primary, #1e40af);
	padding: 4px 10px;
	border-radius: 12px;
	font-weight: 600;
	white-space: nowrap;
}

/* ============================
   PROVIDER INFO SECTION
   ============================ */
.htc-provider-info {
	margin: 32px 0 0;
}

.htc-provider-info__card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 24px;
	background: linear-gradient(135deg, var(--ht-gray-50, #f8fafc) 0%, var(--ht-primary-lighter, #eff6ff) 100%);
	border: 1px solid var(--ht-primary-light, #dbeafe);
	border-radius: 12px;
}

.htc-provider-info__left {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: 1;
	min-width: 0;
}

.htc-provider-info__logo {
	width: 60px;
	height: 60px;
	border-radius: 12px;
	object-fit: contain;
	background: #fff;
	padding: 6px;
	flex-shrink: 0;
}

.htc-provider-info__text h3 {
	margin: 0 0 6px;
	font-size: calc(var(--ht-body-size, 14px) * 1.29);
	font-weight: 700;
	color: var(--ht-gray-900, #111827);
}

.htc-provider-info__text p {
	margin: 0;
	font-size: calc(var(--ht-body-size, 14px) * 0.93);
	color: var(--ht-gray-500, #6b7280);
	line-height: 1.5;
}

.htc-provider-info__actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

/* ============================
   BUTTONS
   ============================ */
.htc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border-radius: 8px;
	font-weight: 600;
	font-size: var(--ht-body-size, 14px);
	text-decoration: none !important;
	transition: all 0.15s;
	white-space: nowrap;
}

.htc-btn--primary {
	background: linear-gradient(135deg, var(--ht-primary, #2563eb), var(--ht-primary-dark, #1d4ed8));
	color: #fff !important;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.htc-btn--primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
	color: #fff !important;
}

.htc-btn--outline {
	background: #fff;
	color: var(--ht-gray-700, #374151) !important;
	border: 1px solid var(--ht-gray-300, #d1d5db);
}

.htc-btn--outline:hover {
	border-color: var(--ht-primary, #2563eb);
	color: var(--ht-primary, #2563eb) !important;
}

/* ============================
   COPY TOAST
   ============================ */
.htc-toast {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: var(--ht-gray-900, #111827);
	color: #fff;
	padding: 10px 22px;
	border-radius: 8px;
	font-size: calc(var(--ht-body-size, 14px) * 0.93);
	font-weight: 600;
	z-index: 9999;
	opacity: 0;
	transition: opacity 0.3s, transform 0.3s;
	pointer-events: none;
}

.htc-toast.htc-toast--show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
	.htc-hero__inner {
		flex-direction: column;
		align-items: flex-start;
		padding: 24px 20px 16px;
	}

	.htc-hero__left {
		flex-direction: column;
		align-items: flex-start;
	}

	.htc-hero__stats {
		width: 100%;
		justify-content: space-between;
	}

	.htc-stat {
		flex: 1;
		min-width: 0;
		padding: 10px 8px;
	}

	.htc-stat__value {
		font-size: calc(var(--ht-body-size, 14px) * 1.29);
	}

	.htc-offer-card {
		flex-direction: column;
		align-items: stretch;
		padding: 16px;
		gap: 12px;
	}

	.htc-offer-card__badge {
		width: 100%;
		height: auto;
		flex-direction: row;
		gap: 6px;
		padding: 8px 14px;
	}

	.htc-offer-card__rank {
		left: auto;
		right: 12px;
	}

	.htc-offer-card__action {
		min-width: 100%;
	}

	.htc-recommended__grid {
		grid-template-columns: 1fr;
	}

	.htc-provider-info__card {
		flex-direction: column;
		align-items: flex-start;
	}

	.htc-provider-info__actions {
		width: 100%;
	}

	.htc-provider-info__actions .htc-btn {
		flex: 1;
	}
}

@media (max-width: 480px) {
	.htc-hero__title {
		font-size: calc(var(--ht-body-size, 14px) * 1.29);
	}

	.htc-hero__nav-item {
		padding: 10px 16px;
		font-size: calc(var(--ht-body-size, 14px) * 0.86);
	}

	.htc-offer-card__title {
		font-size: var(--ht-body-size, 14px);
	}
}

/* ============================
   RTL SUPPORT
   ============================ */
[dir="rtl"] .htc-offer-card__rank {
	left: auto;
	right: 12px;
}

[dir="rtl"] .htc-reveal-btn::after {
	right: auto;
	left: 0;
	border-left: none;
	border-right: 2px dashed rgba(255, 255, 255, 0.4);
}
