/**
 * Stripe Embedded Checkout Styles
 * 
 * @package CARE-INF
 * @since 1.0.0
 */

/* ============================================
   Embedded Checkout Container
   ============================================ */
.ci-embedded-checkout-wrap {
	max-width: 600px;
	margin: 40px auto;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(26, 58, 95, 0.1);
	padding: 40px;
	border: 1px solid #e6ecf2;
}

/* ============================================
   Checkout Header
   ============================================ */
.ci-checkout-header {
	text-align: center;
	margin-bottom: 32px;
	padding-bottom: 24px;
	border-bottom: 2px solid #f1f5f9;
}

.ci-checkout-header h2 {
	font-size: 28px;
	font-weight: 700;
	color: #1a3a5f;
	margin: 0 0 16px 0;
}

.ci-checkout-amount {
	font-size: 48px;
	font-weight: 800;
	color: #1a3a5f;
	line-height: 1;
}

.ci-checkout-amount .ci-currency {
	font-size: 20px;
	font-weight: 600;
	color: #64748b;
	margin-left: 4px;
}

/* ============================================
   Payment Form
   ============================================ */
.ci-payment-form {
	margin-top: 32px;
}

.ci-payment-element {
	margin-bottom: 24px;
	min-height: 120px;
}

/* Stripe Elements will inject their own styles here */
#payment-element {
	margin-bottom: 24px;
}

/* ============================================
   Payment Messages
   ============================================ */
.ci-payment-message {
	display: none;
	padding: 14px 18px;
	border-radius: 8px;
	margin-bottom: 20px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
}

.ci-payment-message.ci-message-error {
	background: #fee;
	color: #c41e3a;
	border: 1px solid #fcc;
	display: block;
}

.ci-payment-message.ci-message-success {
	background: #dcfce7;
	color: #0f5132;
	border: 1px solid #bbf7d0;
	display: block;
}

.ci-payment-message.ci-message-info {
	background: #dbeafe;
	color: #1e40af;
	border: 1px solid #bfdbfe;
	display: block;
}

/* ============================================
   Submit Button
   ============================================ */
.ci-submit-payment {
	width: 100%;
	padding: 16px 24px;
	font-size: 18px;
	font-weight: 700;
	background: linear-gradient(135deg, #1a3a5f 0%, #2c5282 100%);
	color: #ffffff;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-shadow: 0 4px 14px rgba(26, 58, 95, 0.3);
}

.ci-submit-payment:hover:not(:disabled) {
	background: linear-gradient(135deg, #2c5282 0%, #1a3a5f 100%);
	box-shadow: 0 6px 20px rgba(26, 58, 95, 0.4);
	transform: translateY(-2px);
}

.ci-submit-payment:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: 0 2px 10px rgba(26, 58, 95, 0.3);
}

.ci-submit-payment:disabled {
	background: #cbd5e1;
	cursor: not-allowed;
	box-shadow: none;
}

.ci-submit-payment .ci-spinner {
	display: inline-block;
	animation: ci-spin 1s linear infinite;
}

.ci-submit-payment .ci-spinner svg {
	display: block;
}

@keyframes ci-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* ============================================
   Checkout Footer
   ============================================ */
.ci-checkout-footer {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #e2e8f0;
}

.ci-secure-notice {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #64748b;
	font-size: 14px;
	margin: 0;
}

.ci-secure-notice svg {
	color: #10b981;
	flex-shrink: 0;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 640px) {
	.ci-embedded-checkout-wrap {
		margin: 20px;
		padding: 24px;
		border-radius: 12px;
	}

	.ci-checkout-header h2 {
		font-size: 24px;
	}

	.ci-checkout-amount {
		font-size: 36px;
	}

	.ci-checkout-amount .ci-currency {
		font-size: 16px;
	}

	.ci-submit-payment {
		padding: 14px 20px;
		font-size: 16px;
	}
}

/* ============================================
   Loading States
   ============================================ */
.ci-payment-element.is-loading {
	position: relative;
	min-height: 200px;
}

.ci-payment-element.is-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border: 4px solid #e2e8f0;
	border-top-color: #1a3a5f;
	border-radius: 50%;
	animation: ci-spin 0.8s linear infinite;
}

/* ============================================
   Success State
   ============================================ */
.ci-payment-success {
	text-align: center;
	padding: 60px 20px;
}

.ci-payment-success-icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 24px;
	border-radius: 50%;
	background: #dcfce7;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #10b981;
	font-size: 48px;
}

.ci-payment-success h3 {
	font-size: 24px;
	font-weight: 700;
	color: #1a3a5f;
	margin: 0 0 12px 0;
}

.ci-payment-success p {
	font-size: 16px;
	color: #64748b;
	margin: 0;
}

/* ============================================
   Enhanced Stripe Element Styling
   ============================================ */
.StripeElement {
	padding: 16px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	background: #ffffff;
	transition: border-color 0.3s ease;
}

.StripeElement--focus {
	border-color: #1a3a5f;
	box-shadow: 0 0 0 3px rgba(26, 58, 95, 0.1);
}

.StripeElement--invalid {
	border-color: #c41e3a;
}

.StripeElement--webkit-autofill {
	background: #fafbfc !important;
}
