/**
 * Pricing Table — Frontend styles.
 *
 * @package IndexGPT
 * @subpackage Pricing
 */

/* ─── Pricing Table Grid ─────────────────────────────────────────── */

.igpt-pricing-table {
	display: grid;
	gap: 24px;
	max-width: 1200px;
	margin: 40px auto;
	padding: 0 16px;
}

.igpt-pricing-cols-1 { grid-template-columns: 1fr; max-width: 400px; }
.igpt-pricing-cols-2 { grid-template-columns: repeat(2, 1fr); }
.igpt-pricing-cols-3 { grid-template-columns: repeat(3, 1fr); }
.igpt-pricing-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ─── Pricing Card ───────────────────────────────────────────────── */

.igpt-pricing-card {
	background: #fff;
	border: 2px solid #e5e7eb;
	border-radius: 16px;
	padding: 32px 24px;
	text-align: center;
	position: relative;
	transition: transform 0.3s, box-shadow 0.3s;
}

.igpt-pricing-card:hover {
	box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Highlighted / Recommended card */
.igpt-pricing-card--highlighted {
	border-color: var(--igpt-primary, #2563eb);
	transform: scale(1.05);
	z-index: 1;
	box-shadow: 0 8px 30px rgba(37,99,235,0.15);
}

.igpt-pricing-card--highlighted:hover {
	box-shadow: 0 12px 40px rgba(37,99,235,0.2);
}

/* Badge */
.igpt-pricing-badge {
	position: absolute;
	top: -14px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--igpt-primary, #2563eb);
	color: #fff;
	padding: 4px 16px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	white-space: nowrap;
}

/* Plan name */
.igpt-pricing-name {
	font-size: 22px;
	font-weight: 700;
	margin: 8px 0 16px;
	color: #1f2937;
}

/* Price */
.igpt-pricing-price {
	margin-bottom: 24px;
}

.igpt-pricing-amount {
	font-size: 42px;
	font-weight: 800;
	color: #1f2937;
	line-height: 1;
}

.igpt-pricing-amount.igpt-pricing-free {
	font-size: 36px;
	color: #10b981;
}

.igpt-pricing-cycle {
	display: block;
	font-size: 14px;
	color: #6b7280;
	margin-top: 4px;
}

/* Features list */
.igpt-pricing-features {
	list-style: none;
	padding: 0;
	margin: 0 0 24px;
	text-align: left;
}

.igpt-pricing-features li {
	padding: 8px 0;
	border-bottom: 1px solid #f3f4f6;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.igpt-pricing-features li:last-child {
	border-bottom: none;
}

.igpt-feature-icon {
	font-size: 16px;
	flex-shrink: 0;
	width: 20px;
	text-align: center;
}

.igpt-feature--enabled .igpt-feature-icon {
	color: #10b981;
}

.igpt-feature--disabled {
	opacity: 0.5;
}

.igpt-feature--disabled .igpt-feature-icon {
	color: #d1d5db;
}

.igpt-feature-label {
	flex: 1;
	color: #374151;
}

/* CTA button */
.igpt-pricing-cta {
	display: inline-block;
	width: 100%;
	padding: 12px 24px;
	background: var(--igpt-primary, #2563eb);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
	box-sizing: border-box;
}

.igpt-pricing-cta:hover {
	background: var(--igpt-primary-dark, #1d4ed8);
	color: #fff;
	text-decoration: none;
	transform: translateY(-1px);
}

.igpt-pricing-card--highlighted .igpt-pricing-cta {
	background: var(--igpt-primary, #2563eb);
}

/* ─── Submit Page Plan Selection ─────────────────────────────────── */

.igpt-submit-plan-selection {
	margin-bottom: 32px;
}

.igpt-submit-plan-selection h3 {
	margin-bottom: 4px;
	text-align: center;
}

.igpt-submit-plan-subtitle {
	text-align: center;
	color: var(--igpt-gray, #6b7280);
	font-size: 0.9rem;
	margin-bottom: 20px;
}

.igpt-submit-plans {
	display: grid;
	gap: 16px;
}

.igpt-submit-plans--2 { grid-template-columns: repeat(2, 1fr); }
.igpt-submit-plans--3 { grid-template-columns: repeat(3, 1fr); }
.igpt-submit-plans--4 { grid-template-columns: repeat(4, 1fr); }

.igpt-submit-plan {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 24px 20px 20px;
	background: var(--igpt-white, #fff);
	border: 2px solid #e5e7eb;
	border-radius: var(--igpt-radius-lg, 12px);
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
	position: relative;
}

.igpt-submit-plan:hover {
	border-color: var(--igpt-accent, #2563eb);
	transform: translateY(-2px);
	box-shadow: var(--igpt-shadow-md, 0 4px 12px rgba(0,0,0,0.08));
}

.igpt-submit-plan:has(input[type="radio"]:checked) {
	border-color: var(--igpt-accent, #2563eb);
	box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
	background: #f8faff;
}

.igpt-submit-plan:has(input[type="radio"]:checked) .igpt-submit-plan-select {
	background: var(--igpt-accent, #2563eb);
	color: #fff;
}

/* Highlighted / Recommended plan */
.igpt-submit-plan--highlighted {
	border-color: var(--igpt-accent, #2563eb);
}

.igpt-submit-plan-badge {
	position: absolute;
	top: -11px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--igpt-accent, #2563eb);
	color: #fff;
	font-size: 11px;
	padding: 3px 14px;
	border-radius: 20px;
	font-weight: 600;
	white-space: nowrap;
}

/* Plan name */
.igpt-submit-plan-name {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--igpt-dark, #1f2937);
	margin-bottom: 4px;
}

/* Price */
.igpt-submit-plan-price {
	margin-bottom: 16px;
}

.igpt-submit-plan-amount {
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--igpt-dark, #1f2937);
}

.igpt-submit-plan-cycle {
	font-size: 0.85rem;
	font-weight: 400;
	color: var(--igpt-gray, #6b7280);
}

/* Features list */
.igpt-submit-plan-features {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	text-align: left;
	border-top: 1px solid #f0f0f0;
	padding-top: 14px;
	margin-bottom: 16px;
	flex: 1;
}

.igpt-submit-plan-features li {
	padding: 3px 0;
	font-size: 0.82rem;
	line-height: 1.5;
	color: #374151;
}

.igpt-submit-plan-features li.igpt-feature--off {
	color: #c0c0c0;
	text-decoration: line-through;
}

.igpt-feature-check {
	display: inline-block;
	width: 16px;
	text-align: center;
	font-weight: 700;
}

.igpt-feature--on .igpt-feature-check {
	color: #16a34a;
}

.igpt-feature--off .igpt-feature-check {
	color: #d4d4d4;
}

.igpt-submit-plan-features small {
	color: var(--igpt-gray, #888);
}

/* Select button */
.igpt-submit-plan-select {
	display: inline-block;
	padding: 8px 24px;
	border: 2px solid var(--igpt-accent, #2563eb);
	border-radius: var(--igpt-radius-full, 50px);
	color: var(--igpt-accent, #2563eb);
	font-size: 0.85rem;
	font-weight: 600;
	transition: background 0.2s, color 0.2s;
}

.igpt-submit-plan:hover .igpt-submit-plan-select {
	background: var(--igpt-accent, #2563eb);
	color: #fff;
}

/* ─── Empty state ────────────────────────────────────────────────── */

.igpt-pricing-empty {
	text-align: center;
	padding: 40px 20px;
	color: #6b7280;
}

/* ─── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
	.igpt-pricing-table {
		grid-template-columns: 1fr !important;
	}

	.igpt-pricing-card--highlighted {
		transform: none;
	}

	.igpt-submit-plans {
		grid-template-columns: 1fr !important;
	}

	.igpt-submit-plan {
		min-width: auto;
	}
}
