/**
 * Masrawy Store - Authentication Suite Styles
 * Modern Arabic RTL, Tabs, Input Fields, Password Toggle & Social Login Buttons
 */

.masrawy-auth-wrapper {
	max-width: 500px;
	margin: 20px auto 40px auto;
	font-family: "Cairo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	direction: rtl;
	text-align: right;
}

/* Tabs Header */
.masrawy-auth-tabs-header {
	margin-bottom: 24px;
}

.masrawy-auth-tabs-header .login-tabs-nav {
	display: flex !important;
	justify-content: center;
	align-items: center;
	gap: 12px;
	background: #f1f5f9;
	padding: 6px;
	border-radius: 14px;
	border: 1px solid #e2e8f0;
	margin: 0 auto !important;
	max-width: 380px;
}

.masrawy-auth-tabs-header .login-tabs-nav .tab-nav {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 700;
	color: #64748b;
	cursor: pointer;
	transition: all 0.25s ease;
	background: transparent;
	text-align: center;
	user-select: none;
}

.masrawy-auth-tabs-header .login-tabs-nav .tab-nav:hover {
	color: #0f172a;
	background: rgba(255, 255, 255, 0.6);
}

.masrawy-auth-tabs-header .login-tabs-nav .tab-nav.active {
	color: #0284c7 !important;
	background: #ffffff !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.masrawy-auth-tabs-header .login-tabs-nav .tab-nav.active .tab-icon {
	stroke: #0284c7;
}

.masrawy-auth-tabs-header .login-tabs-nav .tab-nav .tab-icon {
	transition: stroke 0.2s;
}

/* Auth Card */
.masrawy-auth-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	padding: 32px 28px;
	box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
	transition: border-color 0.2s;
}

/* Auth Badge */
.masrawy-auth-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	background: #e0f2fe;
	color: #0369a1;
	font-size: 12px;
	font-weight: 700;
	border-radius: 20px;
	margin-bottom: 12px;
}

.masrawy-auth-badge.badge-new {
	background: #dcfce7;
	color: #15803d;
}

.masrawy-auth-badge .badge-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #0284c7;
}

.masrawy-auth-badge .badge-dot.dot-green {
	background: #22c55e;
}

.masrawy-auth-title {
	font-size: 20px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 6px 0;
	line-height: 1.4;
}

.masrawy-auth-subtitle {
	font-size: 13.5px;
	color: #64748b;
	margin: 0 0 22px 0;
	line-height: 1.5;
}

/* Social Login Grid */
.masrawy-social-login-grid {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 20px;
}

.masrawy-social-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	height: 48px;
	padding: 0 18px;
	border-radius: 12px;
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none !important;
	transition: all 0.2s ease;
	border: 1.5px solid #e2e8f0;
	background: #ffffff;
	color: #1e293b !important;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.masrawy-social-btn:hover {
	border-color: #cbd5e1;
	background: #f8fafc;
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.masrawy-social-btn.btn-google {
	border-color: #e2e8f0;
}

.masrawy-social-btn.btn-google:hover {
	border-color: #4285F4;
	color: #0f172a !important;
}

.masrawy-social-btn.btn-facebook {
	border-color: #e2e8f0;
}

.masrawy-social-btn.btn-facebook:hover {
	border-color: #1877F2;
	color: #1877F2 !important;
}

.masrawy-social-btn .social-icon {
	flex-shrink: 0;
}

/* Auth Divider */
.masrawy-auth-divider {
	position: relative;
	text-align: center;
	margin: 22px 0 20px 0;
}

.masrawy-auth-divider::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 1px;
	background: #e2e8f0;
	z-index: 1;
}

.masrawy-auth-divider span {
	position: relative;
	z-index: 2;
	background: #ffffff;
	padding: 0 14px;
	color: #94a3b8;
	font-size: 12.5px;
	font-weight: 600;
}

/* Forms & Inputs */
.masrawy-form {
	margin: 0;
}

.masrawy-input-group {
	margin-bottom: 16px !important;
}

.masrawy-input-group label {
	display: block;
	font-size: 13.5px;
	font-weight: 700;
	color: #334155;
	margin-bottom: 7px;
}

.masrawy-input-group label .required {
	color: #ef4444;
	margin-right: 2px;
}

.masrawy-field-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.masrawy-field-icon {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
	pointer-events: none;
	display: flex;
	align-items: center;
	z-index: 2;
}

.masrawy-styled-input {
	width: 100% !important;
	height: 48px !important;
	padding: 0 44px 0 16px !important;
	border: 1.5px solid #e2e8f0 !important;
	border-radius: 12px !important;
	font-size: 14.5px !important;
	color: #0f172a !important;
	background: #ffffff !important;
	transition: all 0.2s ease !important;
	outline: none !important;
	box-sizing: border-box !important;
	font-family: "Cairo", sans-serif !important;
}

.masrawy-styled-input:focus {
	border-color: #0284c7 !important;
	box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.12) !important;
	background: #ffffff !important;
}

.masrawy-styled-input::placeholder {
	color: #94a3b8;
	font-size: 13.5px;
}

/* Password Toggle Eye */
.masrawy-password-wrap .masrawy-styled-input {
	padding-left: 44px !important;
}

.masrawy-password-toggle {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none !important;
	border: none !important;
	color: #94a3b8 !important;
	cursor: pointer !important;
	padding: 6px !important;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 3;
	border-radius: 6px;
	transition: color 0.2s, background-color 0.2s;
}

.masrawy-password-toggle:hover {
	color: #0284c7 !important;
	background: #f1f5f9 !important;
}

/* Meta Row (Remember & Lost Password) */
.masrawy-auth-meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 14px 0 20px 0;
	flex-wrap: wrap;
	gap: 8px;
}

.masrawy-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13.5px;
	color: #475569;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
	margin: 0 !important;
}

.masrawy-checkbox-label input[type="checkbox"] {
	width: 17px;
	height: 17px;
	border-radius: 4px;
	accent-color: #0284c7;
	cursor: pointer;
}

.masrawy-auth-meta-row .lost_password {
	margin: 0 !important;
}

.masrawy-auth-meta-row .lost_password a {
	font-size: 13px;
	color: #0284c7;
	font-weight: 700;
	text-decoration: none;
	transition: color 0.2s;
}

.masrawy-auth-meta-row .lost_password a:hover {
	color: #0369a1;
	text-decoration: underline;
}

/* Submit Buttons */
.masrawy-submit-row {
	margin: 0 !important;
}

.masrawy-btn-primary {
	width: 100% !important;
	height: 48px !important;
	background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 12px !important;
	font-size: 15.5px !important;
	font-weight: 800 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 10px !important;
	cursor: pointer !important;
	transition: all 0.25s ease !important;
	box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3) !important;
	font-family: "Cairo", sans-serif !important;
}

.masrawy-btn-primary:hover {
	background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
	transform: translateY(-1.5px);
	box-shadow: 0 6px 18px rgba(2, 132, 199, 0.4) !important;
}

.masrawy-btn-primary:active {
	transform: translateY(0);
}

.masrawy-btn-primary .masrawy-btn-icon {
	font-size: 17px;
	transition: transform 0.2s;
}

.masrawy-btn-primary:hover .masrawy-btn-icon {
	transform: translateX(-4px);
}

/* Privacy policy text in registration */
.masrawy-form .woocommerce-privacy-policy-text {
	font-size: 12.5px;
	color: #64748b;
	line-height: 1.6;
	margin: 14px 0 18px 0;
	padding: 10px 12px;
	background: #f8fafc;
	border-radius: 8px;
	border: 1px solid #f1f5f9;
}

.masrawy-form .woocommerce-privacy-policy-text a {
	color: #0284c7;
	font-weight: 700;
	text-decoration: underline;
}

/* Modal specific overrides */
.login-modal .modal-content {
	padding: 15px 0 25px 0 !important;
}

.login-modal .masrawy-auth-wrapper {
	margin: 0 auto;
	max-width: 440px;
}

.login-modal .masrawy-auth-card {
	border: none;
	box-shadow: none;
	padding: 15px 10px;
}

.login-modal .modal-header h4 {
	font-family: "Cairo", sans-serif !important;
	font-weight: 800;
}

/* Tab Panels Transitions */
.tab-panels .tab-panel {
	display: none;
}

.tab-panels .tab-panel.active {
	display: block;
	animation: masrawyFadeIn 0.3s ease;
}

@keyframes masrawyFadeIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive tweaks */
@media (max-width: 576px) {
	.masrawy-auth-card {
		padding: 22px 16px;
		border-radius: 14px;
	}

	.masrawy-auth-tabs-header .login-tabs-nav {
		max-width: 100%;
	}

	.masrawy-auth-title {
		font-size: 18px;
	}

	.masrawy-social-btn {
		font-size: 13.5px;
	}
}
