/* WooCommerce WhatsApp Integration Public Stylesheet */

/* Divider */
.wc-wa-login-divider {
	text-align: center;
	margin: 20px 0;
	position: relative;
	border-bottom: 1px solid #e2e8f0;
	line-height: 0.1em;
}

.wc-wa-login-divider span {
	background: #fff;
	padding: 0 15px;
	color: #64748b;
	font-size: 13px;
	font-weight: 600;
}

/* Button Trigger style */
.button-whatsapp-login {
	width: 100%;
	background-color: #25D366 !important;
	color: #fff !important;
	border: none !important;
	padding: 12px 20px !important;
	border-radius: 8px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 10px !important;
	cursor: pointer !important;
	transition: background-color 0.2s, transform 0.1s !important;
	box-shadow: 0 4px 6px -1px rgba(37, 211, 102, 0.2), 0 2px 4px -1px rgba(37, 211, 102, 0.1) !important;
}

.button-whatsapp-login:hover {
	background-color: #128c7e !important;
	color: #fff !important;
	transform: translateY(-1px);
}

.button-whatsapp-login:active {
	transform: translateY(0);
}

.button-whatsapp-login .dashicons-whatsapp {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* Modal Overlay with Glassmorphism */
.wc-wa-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

/* Modal Card */
.wc-wa-modal-container {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	width: 100%;
	max-width: 420px;
	overflow: hidden;
	border: 1px solid rgba(226, 232, 240, 0.8);
	animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.wc-wa-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px;
	border-bottom: 1px solid #f1f5f9;
}

.wc-wa-modal-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
}

.close-wa-modal {
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
	padding: 0;
}

.close-wa-modal:hover {
	color: #475569;
}

.wc-wa-modal-body {
	padding: 24px;
}

.wc-wa-modal-body p {
	margin: 0 0 15px 0;
	font-size: 14px;
	line-height: 1.5;
	color: #475569;
}

/* Step Panels */
.wa-step-panel {
	display: none;
}

.wa-step-panel.active {
	display: block;
}

/* Phone input layout */
.wa-input-container {
	display: flex;
	align-items: center;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.wa-input-container:focus-within {
	border-color: #25D366;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.wa-prefix {
	background: #f1f5f9;
	color: #475569;
	padding: 10px 14px;
	font-size: 15px;
	font-weight: 600;
	border-right: 1px solid #e2e8f0;
}

#wa-phone-input {
	border: none !important;
	padding: 12px 14px !important;
	font-size: 15px !important;
	width: 100% !important;
	height: auto !important;
	box-shadow: none !important;
	outline: none !important;
	letter-spacing: 1px;
}

#wa-email-input {
	width: 100% !important;
	padding: 10px 14px !important;
	font-size: 14px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 8px !important;
	outline: none !important;
	height: auto !important;
}

#wa-email-input:focus {
	border-color: #25D366 !important;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15) !important;
}

.wa-note-desc {
	margin: 5px 0 0 0 !important;
	font-size: 11px !important;
	color: #64748b;
	line-height: 1.4 !important;
}

/* 6-Digit Code Squares */
.wa-otp-block-container {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin: 20px 0;
}

.wa-otp-digit {
	width: 48px !important;
	height: 52px !important;
	text-align: center !important;
	font-size: 22px !important;
	font-weight: 700 !important;
	color: #0f172a !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 10px !important;
	outline: none !important;
	background: #f8fafc !important;
	transition: all 0.15s !important;
	padding: 0 !important;
	box-shadow: none !important;
}

.wa-otp-digit:focus {
	border-color: #25D366 !important;
	background: #fff !important;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15) !important;
	transform: scale(1.03);
}

/* Primary Button inside Modal */
.wa-btn-primary {
	width: 100%;
	background: #128c7e;
	color: #fff;
	border: none;
	padding: 12px 20px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s;
}

.wa-btn-primary:hover {
	background: #075e54;
}

.wa-btn-primary:disabled {
	background: #94a3b8;
	cursor: not-allowed;
}

.mt-15 { margin-top: 15px; }

/* Resend section */
.wa-resend-container {
	display: flex;
	justify-content: center;
	gap: 5px;
	margin-top: 15px;
	font-size: 13px;
	color: #64748b;
}

.wa-resend-container a {
	color: #128c7e;
	text-decoration: none;
	font-weight: 600;
}

.wa-resend-container a:hover {
	text-decoration: underline;
}

/* Status Notifications */
.wa-modal-result-log {
	margin-top: 15px;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	background: #f1f5f9;
	color: #334155;
	text-align: center;
}

.wa-modal-result-log.success {
	background: #ecfdf5;
	color: #065f46;
}

.wa-modal-result-log.error {
	background: #fef2f2;
	color: #991b1b;
	animation: shake 0.2s ease-in-out 0s 2;
}

/* Shake animation for errors */
@keyframes shake {
	0% { transform: translateX(0); }
	25% { transform: translateX(-5px); }
	50% { transform: translateX(5px); }
	75% { transform: translateX(-5px); }
	100% { transform: translateX(0); }
}
