/**
 * Ree Frontend Styles — cart widget, usage widget, plan cards
 */

/* ============================================================
   BASE BUTTONS
   ============================================================ */
.ree-btn {
	display: inline-flex;
	align-items: center;
	gap: .375rem;
	padding: .5625rem 1.25rem;
	border: none;
	border-radius: .5rem;
	font-size: .875rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s, transform .1s, opacity .15s;
	white-space: nowrap;
}
.ree-btn--primary,
.ree-btn:not([class*='--']) {
	background: linear-gradient( 135deg, #6366f1, #8b5cf6 );
	color: #fff;
}
.ree-btn--primary:hover,
.ree-btn:not([class*='--']):hover {
	opacity: .9;
	transform: translateY(-1px);
}
.ree-btn--ghost {
	background: transparent;
	border: 1.5px solid rgba(99,102,241,.45);
	color: #6366f1;
}
.ree-btn--ghost:hover { background: rgba(99,102,241,.08); }
.ree-btn:disabled {
	opacity: .55;
	cursor: not-allowed;
	transform: none;
}

/* ============================================================
   ADD-TO-CART BUTTON
   ============================================================ */
.ree-atc-btn {
	background: linear-gradient( 135deg, #6366f1, #8b5cf6 );
	color: #fff;
	transition: background .2s, transform .1s;
}
.ree-atc-btn--added {
	background: linear-gradient( 135deg, #059669, #10b981 ) !important;
}

/* ============================================================
   VARIANT SELECTOR  [ree_add_to_cart] with variants
   ============================================================ */
.ree-variant-wrap {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	flex-wrap: wrap;
}
.ree-variant-select {
	padding: .5rem .75rem;
	border: 1px solid #d1d5db;
	border-radius: .5rem;
	font-size: .875rem;
	background: #fff;
	color: #111827;
	cursor: pointer;
	min-height: 40px;
}
.ree-variant-select:focus {
	outline: 2px solid #6366f1;
	outline-offset: 1px;
	border-color: #6366f1;
}

/* ============================================================
   CART WIDGET  [ree_cart]
   ============================================================ */
.ree-cart-empty {
	text-align: center;
	padding: 2.5rem 1.5rem;
	color: #64748b;
}
.ree-cart-empty a {
	display: inline-block;
	margin-top: 1rem;
}

.ree-cart-wrap {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: .875rem;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0,0,0,.06);
	max-width: 560px;
}

.ree-cart-items {
	padding: .5rem 0;
}

.ree-cart-item {
	display: flex;
	align-items: center;
	gap: .75rem;
	padding: .875rem 1.25rem;
	border-bottom: 1px solid #f1f5f9;
	transition: background .12s;
}
.ree-cart-item:last-child { border-bottom: none; }
.ree-cart-item:hover { background: #f8fafc; }

.rci-name {
	flex: 1;
	font-weight: 600;
	font-size: .9rem;
	color: #1e293b;
	display: flex;
	align-items: center;
	gap: .5rem;
}
.rci-price {
	font-weight: 700;
	font-size: .9rem;
	color: #334155;
	min-width: 4rem;
	text-align: right;
}
.rci-remove {
	background: none;
	border: none;
	color: #94a3b8;
	cursor: pointer;
	font-size: .8rem;
	padding: .25rem .375rem;
	border-radius: .375rem;
	line-height: 1;
	transition: color .12s, background .12s;
}
.rci-remove:hover {
	color: #dc2626;
	background: #fee2e2;
}

/* Badges */
.ree-cart-badge {
	display: inline-block;
	font-size: .7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: .1em .5em;
	border-radius: 99px;
	background: #f1f5f9;
	color: #64748b;
}
.ree-cart-badge--sub {
	background: rgba(99,102,241,.12);
	color: #6366f1;
}

/* Cart footer */
.ree-cart-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	background: #f8fafc;
	border-top: 1px solid #e2e8f0;
	flex-wrap: wrap;
}
.ree-cart-total {
	display: flex;
	flex-direction: column;
	gap: .125rem;
}
.ree-cart-total span {
	font-size: .75rem;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: .05em;
}
.ree-cart-total strong {
	font-size: 1.25rem;
	color: #1e293b;
}
.ree-cart-checkout-btn {
	flex-shrink: 0;
}

/* ============================================================
   MINI CART ICON BADGE
   ============================================================ */
.ree-cart-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
}
.ree-cart-count {
	position: absolute;
	top: -6px;
	right: -8px;
	min-width: 18px;
	height: 18px;
	border-radius: 99px;
	background: #6366f1;
	color: #fff;
	font-size: .6875rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	line-height: 1;
}

/* ============================================================
   PLANS GRID  [ree_plans]
   ============================================================ */
.ree-plans-grid {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 220px, 1fr ) );
	gap: 1.25rem;
	padding: 1rem 0;
}
.ree-plan-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: .875rem;
	padding: 1.5rem 1.25rem;
	text-align: center;
	box-shadow: 0 2px 8px rgba(0,0,0,.05);
	transition: transform .15s, box-shadow .15s;
}
.ree-plan-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(99,102,241,.12);
}
.ree-plan-name {
	font-size: 1rem;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: .5rem;
}
.ree-plan-price {
	font-size: 1.75rem;
	font-weight: 800;
	color: #6366f1;
	margin-bottom: 1rem;
}
.ree-plan-price span {
	font-size: .875rem;
	font-weight: 500;
	color: #64748b;
}

/* ============================================================
   CREDITS WIDGET  [ree_credits_widget]
   ============================================================ */
.ree-credits-widget {
	display: inline-flex;
	flex-direction: column;
	gap: .25rem;
	background: linear-gradient( 135deg, #6366f1 0%, #8b5cf6 100% );
	color: #fff;
	border-radius: .875rem;
	padding: 1.125rem 1.5rem;
	min-width: 180px;
	box-shadow: 0 4px 16px rgba(99,102,241,.25);
}
.rcw-label {
	font-size: .75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	opacity: .85;
}
.rcw-value {
	font-size: 2rem;
	font-weight: 800;
	line-height: 1;
}
.rcw-unit {
	font-size: .875rem;
	font-weight: 500;
	opacity: .8;
}
.rcw-cost {
	font-size: .8rem;
	opacity: .75;
}

/* ============================================================
   USAGE TABLE  [ree_usage_table]
   ============================================================ */
.ree-usage-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .875rem;
	color: #334155;
}
.ree-usage-table thead tr {
	border-bottom: 2px solid #e2e8f0;
}
.ree-usage-table th {
	padding: .625rem .875rem;
	text-align: left;
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #64748b;
}
.ree-usage-table td {
	padding: .625rem .875rem;
	border-bottom: 1px solid #f1f5f9;
}
.ree-usage-table tbody tr:hover td {
	background: #f8fafc;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media ( max-width: 480px ) {
	.ree-cart-footer {
		flex-direction: column;
		align-items: stretch;
	}
	.ree-cart-checkout-btn {
		width: 100%;
		justify-content: center;
	}
}
