/**
 * Manmulro Social Login Stylesheet
 * Supports Login, Signup, Find Password, wp-login.php integration, and My Account pages.
 * Mobile full-bleed (left-to-right 100% full width) and zero-overlap optimization.
 */

.mm-sl-card {
	max-width: 440px;
	width: 100%;
	margin: 32px auto;
	padding: 32px 28px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
	font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
	color: #111827;
	box-sizing: border-box;
	-webkit-text-size-adjust: 100%;
}

.mm-sl-card *, .mm-sl-card *::before, .mm-sl-card *::after,
.mm-sl-account-wrap, .mm-sl-account-wrap *, .mm-sl-account-wrap *::before, .mm-sl-account-wrap *::after {
	box-sizing: border-box;
}

.mm-sl-header {
	text-align: center;
	margin-bottom: 20px;
}

.mm-sl-brand-badge {
	display: inline-block;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: #2563eb;
	background: #eff6ff;
	border-radius: 999px;
	margin-bottom: 8px;
}

.mm-sl-title {
	margin: 0;
	font-size: 23px;
	font-weight: 800;
	color: #111827;
	line-height: 1.3;
	word-break: keep-all;
}

.mm-sl-subtitle {
	margin: 8px 0 0;
	font-size: 14px;
	color: #6b7280;
	line-height: 1.5;
	word-break: keep-all;
}

.mm-sl-notice {
	width: 100%;
	padding: 12px 14px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.5;
	margin-bottom: 16px;
	word-break: keep-all;
	overflow-wrap: anywhere;
}

.mm-sl-notice--error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.mm-sl-notice--success {
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
}

.mm-sl-notice--info {
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

.mm-sl-social-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 18px;
	width: 100%;
}

/* Ensure clean fit when embedded inside default wp-login.php #loginform */
#loginform .mm-sl-social-buttons {
	margin: 0 0 16px;
	width: 100%;
}
#loginform .mm-sl-btn {
	width: 100%;
	font-size: 14px;
	padding: 10px 12px;
}

.mm-sl-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 48px;
	padding: 10px 16px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none !important;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
	word-break: keep-all;
}

.mm-sl-btn:hover {
	transform: translateY(-1px);
	opacity: 0.95;
}

.mm-sl-btn:active {
	transform: scale(0.99);
}

.mm-sl-btn--kakao {
	background: #FEE500;
	color: #191919 !important;
}

.mm-sl-btn--naver {
	background: #03C75A;
	color: #ffffff !important;
}

.mm-sl-btn--google {
	background: #ffffff;
	color: #1f2937 !important;
	border: 1px solid #d1d5db;
}

.mm-sl-btn__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.mm-sl-btn__label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mm-sl-divider {
	display: flex;
	align-items: center;
	margin: 18px 0;
	color: #9ca3af;
	font-size: 13px;
}

.mm-sl-divider::before,
.mm-sl-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e5e7eb;
}

.mm-sl-divider span {
	padding: 0 12px;
	white-space: nowrap;
}

.mm-sl-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
}

.mm-sl-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	width: 100%;
}

.mm-sl-field--inline {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
}

.mm-sl-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	cursor: pointer;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.mm-sl-checkbox input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	flex-shrink: 0;
}

.mm-sl-field label {
	font-size: 13px;
	font-weight: 600;
	color: #374151;
}

.mm-sl-field input[type="text"],
.mm-sl-field input[type="email"],
.mm-sl-field input[type="password"],
.mm-sl-field textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: 46px;
	padding: 11px 13px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.4;
	color: #111827;
	background: #f9fafb;
	-webkit-appearance: none;
	appearance: none;
}

.mm-sl-field textarea {
	min-height: 76px;
	resize: vertical;
	line-height: 1.5;
}

.mm-sl-field input:focus,
.mm-sl-field textarea:focus {
	outline: none;
	border-color: #2563eb;
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.mm-sl-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 8px;
	width: 100%;
}

.mm-sl-submit-btn,
.mm-sl-primary-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	padding: 10px 20px;
	background: #111827;
	color: #ffffff !important;
	border: none;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	text-decoration: none !important;
}

.mm-sl-submit-btn:hover,
.mm-sl-primary-btn:hover {
	background: #1f2937;
}

.mm-sl-secondary-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 16px;
	background: #f3f4f6;
	color: #1f2937 !important;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	text-decoration: none !important;
	white-space: nowrap;
}

.mm-sl-footer-links {
	margin-top: 18px;
	text-align: center;
	font-size: 13px;
	color: #6b7280;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px;
}

.mm-sl-footer-links a {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 4px 6px;
	color: #2563eb;
	text-decoration: none;
	font-weight: 600;
}

.mm-sl-dot {
	margin: 0 4px;
}

.mm-sl-privacy-note {
	margin: 0;
	font-size: 12px;
	color: #6b7280;
	line-height: 1.5;
	word-break: keep-all;
}

/* My Account Layout */
.mm-sl-account-wrap {
	max-width: 1560px;
	width: 100%;
	margin: 24px auto;
	padding: 0 24px;
	font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
	-webkit-text-size-adjust: 100%;
}

.mm-sl-account-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	padding: 22px 24px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	margin-bottom: 18px;
}

.mm-sl-account-user {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	flex: 1 1 auto;
}

.mm-sl-account-user > div {
	min-width: 0;
	flex: 1 1 auto;
}

.mm-sl-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #e5e7eb;
	flex-shrink: 0;
}

.mm-sl-account-name {
	margin: 0 0 2px;
	font-size: 19px;
	font-weight: 700;
	word-break: keep-all;
	overflow-wrap: anywhere;
}

.mm-sl-account-email {
	margin: 0;
	font-size: 13px;
	color: #6b7280;
	overflow-wrap: anywhere;
}

.mm-sl-logout-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.mm-sl-account-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 18px;
	margin-bottom: 18px;
}

.mm-sl-panel {
	padding: 22px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	min-width: 0;
}

.mm-sl-panel--full {
	margin-bottom: 18px;
}

.mm-sl-panel--danger {
	border-color: #fecaca;
	background: #fffafa;
}

.mm-sl-panel-title {
	margin: 0 0 14px;
	font-size: 17px;
	font-weight: 700;
	word-break: keep-all;
}

.mm-sl-panel-desc {
	margin: 0 0 14px;
	font-size: 13px;
	color: #6b7280;
}

.mm-sl-provider-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mm-sl-provider-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #f9fafb;
	min-width: 0;
}

.mm-sl-provider-info {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 10px;
	min-width: 0;
	flex: 1 1 auto;
}

.mm-sl-provider-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 10px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
	flex-shrink: 0;
}

.mm-sl-provider-badge--kakao {
	background: #FEE500;
	color: #191919;
}

.mm-sl-provider-badge--naver {
	background: #03C75A;
	color: #ffffff;
}

.mm-sl-provider-badge--google {
	background: #ffffff;
	color: #1f2937;
	border: 1px solid #d1d5db;
}

.mm-sl-provider-badge--email {
	background: #e5e7eb;
	color: #374151;
}

.mm-sl-status {
	font-size: 13px;
	font-weight: 600;
	min-width: 0;
	overflow-wrap: anywhere;
	word-break: keep-all;
}

.mm-sl-status--connected {
	color: #059669;
}

.mm-sl-status--disconnected {
	color: #9ca3af;
}

.mm-sl-provider-action {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
}

.mm-sl-connect-btn,
.mm-sl-unlink-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 6px 12px;
	border-radius: 8px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.mm-sl-connect-btn {
	background: #2563eb;
	color: #ffffff !important;
}

.mm-sl-unlink-btn {
	background: #ffffff;
	color: #dc2626 !important;
	border: 1px solid #fca5a5;
}

.mm-sl-unlink-btn--disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.mm-sl-services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 12px;
}

.mm-sl-service-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 16px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #f9fafb;
}

.mm-sl-service-card h4 {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
}

.mm-sl-withdraw-details summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 14px;
	color: #b91c1c;
	padding: 4px 0;
	user-select: none;
}

.mm-sl-withdraw-details[open] summary {
	margin-bottom: 12px;
}

.mm-sl-danger-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 16px;
	border-radius: 10px;
	background: #dc2626;
	color: #ffffff;
	border: none;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

/* === Mobile Full-Width (Left-to-Right Edge-to-Edge) Optimization === */
@media (max-width: 768px) {
	/* Prevent iOS Safari auto-zoom on input focus */
	.mm-sl-field input[type="text"],
	.mm-sl-field input[type="email"],
	.mm-sl-field input[type="password"],
	.mm-sl-field textarea {
		font-size: 16px;
	}

	/* Break out to 100% full viewport width on mobile regardless of WP theme wrapper padding */
	.mm-sl-card {
		width: 100vw;
		max-width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		margin-top: 0;
		margin-bottom: 0;
		padding: 24px 16px calc(28px + env(safe-area-inset-bottom, 0px));
		border-radius: 0;
		border-left: none;
		border-right: none;
		box-shadow: none;
	}

	.mm-sl-account-wrap {
		width: 100vw;
		max-width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		margin-top: 0;
		margin-bottom: 0;
		padding: 0 0 calc(28px + env(safe-area-inset-bottom, 0px));
		background: #f3f4f6;
		overflow-x: clip;
	}

	.mm-sl-account-header {
		padding: 18px 16px;
		border-radius: 0;
		border-left: none;
		border-right: none;
		border-top: none;
		margin-bottom: 8px;
	}

	.mm-sl-account-wrap > .mm-sl-notice {
		margin: 0 0 8px;
		border-radius: 0;
		border-left: none;
		border-right: none;
	}

	.mm-sl-account-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 8px;
		margin-bottom: 8px;
	}

	.mm-sl-panel {
		padding: 18px 16px;
		border-radius: 0;
		border-left: none;
		border-right: none;
	}

	.mm-sl-panel--full {
		margin-bottom: 8px;
	}

	.mm-sl-service-card {
		flex-direction: column;
		align-items: stretch;
	}

	.mm-sl-service-card .mm-sl-secondary-btn {
		width: 100%;
	}

	.mm-sl-danger-btn {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.mm-sl-title {
		font-size: 21px;
	}
	.mm-sl-account-header {
		flex-direction: column;
		align-items: stretch;
	}
	.mm-sl-logout-link {
		width: 100%;
		min-height: 42px;
	}
	.mm-sl-avatar {
		width: 48px;
		height: 48px;
	}
	.mm-sl-account-name {
		font-size: 17px;
	}
	.mm-sl-connect-btn,
	.mm-sl-unlink-btn {
		min-height: 38px;
		padding: 6px 14px;
	}
}
