/* ==========================================================================
   Social Poster — SaaS Frontend Styles
   Prefix: .spf-
   ========================================================================== */

/* --------------------------------------------------------------------------
   Pricing Grid
   -------------------------------------------------------------------------- */

.spf-pricing-section {
	padding: 40px 0;
}

.spf-pricing-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	margin-top: 32px;
}

.spf-plan-card {
	background: #fff;
	border: 2px solid #e5e7eb;
	border-radius: 12px;
	padding: 32px 24px;
	position: relative;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
	display: flex;
	flex-direction: column;
}

.spf-plan-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

.spf-plan-card.is-featured {
	border-color: #6366f1;
	box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.spf-plan-badge {
	display: inline-block;
	background: #6366f1;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 3px 10px;
	border-radius: 20px;
	margin-bottom: 12px;
}

.spf-plan-badge.is-current {
	background: #10b981;
}

.spf-plan-name {
	font-size: 20px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 8px;
}

.spf-plan-price {
	font-size: 42px;
	font-weight: 800;
	color: #111827;
	line-height: 1;
	margin: 16px 0 4px;
}

.spf-plan-price .spf-currency {
	font-size: 22px;
	font-weight: 600;
	vertical-align: top;
	margin-top: 8px;
	display: inline-block;
}

.spf-plan-price .spf-period {
	font-size: 14px;
	font-weight: 400;
	color: #6b7280;
}

.spf-plan-description {
	font-size: 14px;
	color: #6b7280;
	margin: 8px 0 20px;
}

.spf-plan-features {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	flex: 1;
}

.spf-plan-features li {
	padding: 6px 0;
	font-size: 14px;
	color: #374151;
	display: flex;
	align-items: center;
	gap: 8px;
}

.spf-plan-features li::before {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	background-color: #10b981;
	border-radius: 50%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M3 8l3.5 3.5L13 5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 10px;
	flex-shrink: 0;
}

.spf-plan-features li.is-disabled {
	color: #9ca3af;
}

.spf-plan-features li.is-disabled::before {
	background-color: #d1d5db;
}

.spf-plan-cta {
	display: block;
	text-align: center;
	padding: 12px 20px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, opacity 0.2s;
	text-decoration: none;
	border: 2px solid transparent;
	margin-top: auto;
}

.spf-plan-cta.is-primary {
	background: #6366f1;
	color: #fff;
}

.spf-plan-cta.is-primary:hover {
	background: #4f46e5;
}

.spf-plan-cta.is-secondary {
	background: transparent;
	color: #6366f1;
	border-color: #6366f1;
}

.spf-plan-cta.is-secondary:hover {
	background: #eef2ff;
}

.spf-plan-cta.is-current-plan {
	background: #f3f4f6;
	color: #9ca3af;
	cursor: default;
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   Auth Box (Register / Login)
   -------------------------------------------------------------------------- */

.spf-auth-wrap {
	padding: 40px 20px;
}

.spf-auth-box {
	max-width: 440px;
	margin: 60px auto;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 40px 36px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.spf-auth-box h2 {
	font-size: 24px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 8px;
	text-align: center;
}

.spf-auth-subtitle {
	text-align: center;
	color: #6b7280;
	font-size: 14px;
	margin-bottom: 28px;
}

.spf-auth-form .spf-form-group {
	margin-bottom: 16px;
}

.spf-auth-form label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 6px;
}

.spf-auth-form input[type="text"],
.spf-auth-form input[type="email"],
.spf-auth-form input[type="password"] {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 15px;
	color: #111827;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.spf-auth-form input:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.spf-auth-btn {
	display: block;
	width: 100%;
	padding: 12px 20px;
	background: #6366f1;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, opacity 0.2s;
	margin-top: 8px;
}

.spf-auth-btn:hover {
	background: #4f46e5;
}

.spf-auth-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.spf-auth-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 20px 0;
	color: #9ca3af;
	font-size: 13px;
}

.spf-auth-divider::before,
.spf-auth-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: #e5e7eb;
}

.spf-google-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 11px 20px;
	background: #fff;
	color: #374151;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.spf-google-btn:hover {
	background: #f9fafb;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	color: #374151;
	text-decoration: none;
}

.spf-google-btn svg {
	flex-shrink: 0;
}

.spf-auth-links {
	text-align: center;
	margin-top: 20px;
	font-size: 14px;
	color: #6b7280;
}

.spf-auth-links a {
	color: #6366f1;
	text-decoration: none;
}

.spf-auth-links a:hover {
	text-decoration: underline;
}

.spf-auth-forgot {
	text-align: right;
	margin-top: -8px;
	margin-bottom: 12px;
}

.spf-auth-forgot a {
	font-size: 13px;
	color: #6b7280;
	text-decoration: none;
}

.spf-auth-forgot a:hover {
	color: #6366f1;
}

/* --------------------------------------------------------------------------
   Alerts in auth forms
   -------------------------------------------------------------------------- */

.spf-auth-alert {
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 16px;
	display: none;
}

.spf-auth-alert.is-error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
	display: block;
}

.spf-auth-alert.is-success {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
	display: block;
}

/* --------------------------------------------------------------------------
   Account Page
   -------------------------------------------------------------------------- */

.spf-account-wrap {
	padding: 40px 24px;
	max-width: 1200px;
	margin: 0 auto;
}

.spf-account-plan {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 28px;
	margin-bottom: 24px;
}

.spf-account-plan-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
}

.spf-account-plan-name {
	font-size: 22px;
	font-weight: 700;
	color: #111827;
	margin: 0;
}

.spf-account-plan-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.spf-account-plan-badge.is-free     { background: #f3f4f6; color: #6b7280; }
.spf-account-plan-badge.is-starter  { background: #eff6ff; color: #1d4ed8; }
.spf-account-plan-badge.is-pro      { background: #eef2ff; color: #4338ca; }
.spf-account-plan-badge.is-agency   { background: #fdf4ff; color: #7e22ce; }

/* --------------------------------------------------------------------------
   Usage Bar
   -------------------------------------------------------------------------- */

.spf-usage-section {
	margin-bottom: 20px;
}

.spf-usage-label {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	color: #374151;
	margin-bottom: 8px;
}

.spf-usage-bar {
	height: 10px;
	background: #e5e7eb;
	border-radius: 99px;
	overflow: hidden;
}

.spf-usage-bar-fill {
	height: 100%;
	border-radius: 99px;
	transition: width 0.4s ease;
	background: #10b981;
}

.spf-usage-bar-fill.is-warning {
	background: #f59e0b;
}

.spf-usage-bar-fill.is-danger {
	background: #ef4444;
}

.spf-usage-unlimited {
	font-size: 14px;
	color: #10b981;
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   Account Info Card
   -------------------------------------------------------------------------- */

.spf-account-info {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 28px;
	margin-bottom: 24px;
}

.spf-account-info h3 {
	font-size: 16px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 16px;
}

.spf-account-info-row {
	display: flex;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid #f3f4f6;
	font-size: 14px;
}

.spf-account-info-row:last-child {
	border-bottom: none;
}

.spf-account-info-label {
	width: 140px;
	color: #6b7280;
	flex-shrink: 0;
}

.spf-account-info-value {
	color: #111827;
	font-weight: 500;
}

/* --------------------------------------------------------------------------
   Account Actions
   -------------------------------------------------------------------------- */

.spf-account-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}

.spf-btn-portal {
	padding: 10px 20px;
	background: #fff;
	color: #374151;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	text-decoration: none;
}

.spf-btn-portal:hover {
	background: #f9fafb;
	color: #374151;
	text-decoration: none;
}

.spf-btn-upgrade {
	padding: 10px 20px;
	background: #6366f1;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	text-decoration: none;
}

.spf-btn-upgrade:hover {
	background: #4f46e5;
	color: #fff;
	text-decoration: none;
}

.spf-btn-logout {
	padding: 10px 20px;
	background: transparent;
	color: #ef4444;
	border: 1px solid #fecaca;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s;
}

.spf-btn-logout:hover {
	background: #fef2f2;
	color: #ef4444;
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
	.spf-pricing-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.spf-pricing-grid {
		grid-template-columns: 1fr;
	}

	.spf-auth-box {
		margin: 20px auto;
		padding: 28px 20px;
	}

	.spf-account-actions {
		flex-direction: column;
	}

	.spf-account-plan-header {
		flex-wrap: wrap;
	}
}
