/* SparkAI Main - Login Modal, Login Page, Share Modal */
/* Login Modal */
.modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s, visibility 0.2s;
}
.modal.open {
	opacity: 1;
	visibility: visible;
}
.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(1px);
}
.modal-content {
	position: relative;
	width: 100%;
	max-width: 340px;
	margin: 24px;
	padding: 16px;
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border);
	border-radius: 14px;
	transform: translateY(20px);
	transition: transform 0.2s;
}
.modal.open .modal-content {
	transform: translateY(-20px);
}
.close-btn {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	background: transparent;
	border: none;
	border-radius: 8px;
	color: #71717a;
	font-size: 24px;
	cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease, transform 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}
.close-btn:hover {
	background: rgba(239, 68, 68, 0.1);
	color: #ef4444;
	transform: rotate(90deg);
}
.modal-footer {
	margin-top: 16px;
	text-align: center;
}
.modal-footer p {
	font-size: 12px;
	color: #52525b;
	margin: 0;
}
.modal-footer a {
	color: #71717a;
	text-decoration: underline;
}
.btn-google {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 8px 16px;
	background: var(--color-bg-elevated);
	color: #e4e4e7;
	text-decoration: none;
	border: 1px solid var(--color-bg-subtle);
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	overflow: hidden;
}
.btn-google::after {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 60%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.12), transparent);
	animation: btnShimmer 3s ease-in-out infinite;
	pointer-events: none;
}
@keyframes btnShimmer {
	0%,
	100% {
		left: -100%;
	}
	40%,
	60% {
		left: 150%;
	}
}
.btn-google:hover {
	background: #818cf8;
	color: #fff;
	border-color: #818cf8;
	transform: translateY(-1px);
	box-shadow: 0 8px 24px rgba(129, 140, 248, 0.3);
}
.btn-google.loading {
	opacity: 0.7;
	cursor: default;
}
.btn-google.loading:hover {
	background: var(--color-bg-elevated);
	color: #e4e4e7;
	border-color: var(--color-bg-subtle);
	transform: none;
	box-shadow: none;
}
.btn-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	position: relative;
	margin-right: 10px;
	vertical-align: middle;
}

.btn-spinner::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 1px dashed rgba(228, 228, 231, 0.15);
	animation: spin 8s linear infinite reverse;
}

.btn-spinner::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid transparent;
	border-top-color: #e4e4e7;
	border-right-color: rgba(228, 228, 231, 0.3);
	animation: spin 0.6s linear infinite;
	filter: drop-shadow(0 0 3px rgba(228, 228, 231, 0.4));
}
.modal-footer {
	margin-top: 12px;
	padding-top: 0;
}
.modal-footer p {
	color: #52525b;
	font-size: clamp(10px, 2vw, 12px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.modal-footer a {
	color: #71717a;
	text-decoration: none;
}
.modal-footer a:hover {
	color: #a1a1aa;
}

/* Login Page */
.login-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}
.login-icon {
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	object-fit: contain;
}
.login-header-text h1 {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 2px 0;
	color: #fafafa;
}
.login-header-text p {
	font-size: 12px;
	color: #818cf8;
	margin: 0;
}
.google-icon {
	width: 16px;
	height: 16px;
	object-fit: contain;
}
.login-agreement a {
	color: #71717a;
	text-decoration: underline;
	text-decoration-color: rgba(113, 113, 122, 0.4);
	text-underline-offset: 2px;
	transition: color 0.15s;
}
.login-agreement a:hover {
	color: #a1a1aa;
}

/* Share Modal styles → /components/social/styles.css */
.share-modal-container .modal-app-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	object-fit: contain;
}
