/**
 * WooCommerce Password Validator - Frontend Styles
 */

/* Main feedback container */
.wc-password-validator-feedback {
	margin-top: 15px;
	padding: 16px 20px;
	background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Password match feedback */
.wc-password-match-feedback {
	margin-top: 10px;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: all 0.3s ease;
	direction: rtl !important;
	text-align: right !important;
	justify-content: flex-start !important;
}

.wc-password-match-feedback.match {
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	border: 1px solid #28a745;
	color: #155724;
}

.wc-password-match-feedback.no-match {
	background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
	border: 1px solid #dc3545;
	color: #721c24;
}

.wc-password-match-feedback .match-icon {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #fff;
}

.wc-password-match-feedback.match .match-icon {
	background: #28a745;
}

.wc-password-match-feedback.no-match .match-icon {
	background: #dc3545;
}

/* Disabled submit button */
form.register button[type="submit"].disabled,
form.checkout button[type="submit"].disabled,
form.edit-account button[type="submit"].disabled,
form.lost_reset_password button[type="submit"].disabled,
form.woocommerce-EditAccountForm button[type="submit"].disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

/* WooCommerce error notices (RTL align) */
form.register .woocommerce-error,
form.checkout .woocommerce-error,
form.edit-account .woocommerce-error,
form.woocommerce-EditAccountForm .woocommerce-error,
form.lost_reset_password .woocommerce-error {
	direction: rtl;
	text-align: right;
}

/* Requirements list */
.wc-password-validator-requirements {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 8px;
	grid-auto-rows: 1fr;
}

.wc-password-validator-requirements li {
	padding: 10px 14px;
	font-size: 13px;
	line-height: 1.4;
	display: flex;
	align-items: center;
	border-radius: 8px;
	transition: all 0.3s ease;
	background: #fff;
	border: 1px solid #e9ecef;
	height: 100%;
}

.wc-password-validator-requirements li .icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin-left: 10px;
	border-radius: 50%;
	font-size: 12px;
	font-weight: bold;
	flex-shrink: 0;
	transition: all 0.3s ease;
}

/* Passed state */
.wc-password-validator-requirements li.passed {
	color: #155724;
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	border-color: #28a745;
}

.wc-password-validator-requirements li.passed .icon {
	background: #28a745;
	color: #fff;
	box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Failed state */
.wc-password-validator-requirements li.failed {
	color: #721c24;
	background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
	border-color: #dc3545;
}

.wc-password-validator-requirements li.failed .icon {
	background: #dc3545;
	color: #fff;
	box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Progress bar */
.wc-password-strength-bar {
	margin-top: 12px;
	height: 6px;
	background: #e9ecef;
	border-radius: 3px;
	overflow: hidden;
}

.wc-password-strength-bar .progress {
	height: 100%;
	border-radius: 3px;
	transition: width 0.4s ease, background 0.4s ease;
}

.wc-password-strength-bar .progress.weak {
	background: linear-gradient(90deg, #dc3545, #e4606d);
	width: 25%;
}

.wc-password-strength-bar .progress.fair {
	background: linear-gradient(90deg, #ffc107, #ffcd39);
	width: 50%;
}

.wc-password-strength-bar .progress.good {
	background: linear-gradient(90deg, #17a2b8, #3dd5f3);
	width: 75%;
}

.wc-password-strength-bar .progress.strong {
	background: linear-gradient(90deg, #28a745, #48c774);
	width: 100%;
}

/* Strength label */
.wc-password-strength-label {
	margin-top: 8px;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
}

.wc-password-strength-label.weak { color: #dc3545; }
.wc-password-strength-label.fair { color: #d39e00; }
.wc-password-strength-label.good { color: #138496; }
.wc-password-strength-label.strong { color: #28a745; }

/* RTL Support */
[dir="rtl"] .wc-password-validator-requirements li .icon,
.rtl .wc-password-validator-requirements li .icon {
	margin-left: 0;
	margin-right: 10px;
}

[dir="rtl"] .wc-password-match-feedback,
.rtl .wc-password-match-feedback {
	flex-direction: row-reverse;
}
