/**
 * GiftAura — Stripe / Payment Section Styles
 * Matches the GiftAura design system.
 * Loaded on checkout page only.
 */

/* ================================================
   UPLOAD BOX STYLES (Product page personalization)
   ================================================ */

.ga-file-input-hidden {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* Mobile upload box */
.m-upload[data-ga-upload-box],
.d-upload-box {
	position: relative;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
}

.m-upload[data-ga-upload-box]:hover,
.d-upload-box:hover {
	border-color: var(--color-primary);
	background: var(--color-promo-tint);
}

.m-upload.ga-has-photo,
.d-upload-box.ga-has-photo {
	border-style: solid;
	border-color: var(--color-primary);
	padding: 12px;
}

/* Desktop upload box */
.d-upload-box {
	border: 2px dashed #e0e0e0;
	border-radius: 12px;
	padding: 35px 20px;
	text-align: center;
	color: var(--color-primary);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.d-upload-box strong { font-size: 15px; font-weight: 800; }
.d-upload-box span   { font-size: 12px; color: #888; }

/* Photo preview */
.ga-photo-preview {
	width: 100%;
	max-height: 200px;
	object-fit: contain;
	border-radius: 10px;
	margin-bottom: 8px;
}

.m-upload .ga-photo-preview {
	max-height: 140px;
}

/* Upload status messages */
.ga-upload-status {
	font-size: 13px;
	font-weight: 600;
	padding: 10px 14px;
	border-radius: 8px;
	margin-top: 10px;
	text-align: center;
}

.ga-upload-status--loading {
	background: #f0f0f0;
	color: #555;
}

.ga-upload-status--success {
	background: #ebf9f1;
	color: #00a859;
}

.ga-upload-status--error {
	background: #fff3f5;
	color: var(--color-primary);
}

/* Hide placeholder once photo chosen */
.ga-has-photo .ga-upload-placeholder { display: none; }


/* ================================================
   PAYMENT SECTION — CHECKOUT
   ================================================ */

/* Payment section wrapper */
.ga-payment-section {
	margin-top: 32px;
}

.ga-payment-section .ga-payment-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.ga-payment-section .ga-payment-title {
	font-size: 20px;
	font-weight: 800;
	color: #1a1a1a;
	margin: 0;
}

.ga-payment-section .ga-card-logos {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ga-payment-section .ga-card-logos img {
	height: 20px;
	opacity: 0.7;
	filter: grayscale(0.2);
}

/* WooCommerce payment methods list */
#payment {
	background: #fff !important;
	border: 1px solid #f0ebe8 !important;
	border-radius: 16px !important;
	overflow: hidden;
}

#payment ul.payment_methods {
	padding: 0 !important;
	margin: 0 !important;
	border-bottom: 1px solid #f5f5f5 !important;
	list-style: none;
}

#payment ul.payment_methods li {
	padding: 18px 24px !important;
	border-bottom: 1px solid #f8f8f8 !important;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

#payment ul.payment_methods li:last-child {
	border-bottom: none !important;
}

#payment ul.payment_methods li label {
	display: flex !important;
	align-items: center;
	gap: 12px;
	font-size: 15px;
	font-weight: 700;
	color: #1a1a1a;
	cursor: pointer;
}

#payment ul.payment_methods li label img {
	height: 22px;
	margin: 0 !important;
}

#payment ul.payment_methods input[type="radio"] {
	width: 18px;
	height: 18px;
	accent-color: var(--color-primary);
	flex-shrink: 0;
}

/* Payment box (Stripe card element area) */
#payment div.payment_box {
	background: #fafafa !important;
	border-top: 1px solid #f0f0f0;
	padding: 20px 24px !important;
	margin: 0 !important;
}

/* Stripe card element iframe wrapper */
#payment .StripeElement,
#payment #stripe-card-element,
#payment .stripe-card-element {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 14px 16px;
	font-size: 15px;
	transition: border-color 0.2s;
}

#payment .StripeElement--focus {
	border-color: #1a1a1a;
	box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.06);
}

#payment .StripeElement--invalid {
	border-color: var(--color-primary);
}

/* Stripe error message */
#stripe-payment-data .woocommerce-error,
.wc-stripe-elements-field .stripe-source-errors,
#wc-stripe-payment-element-errors {
	background: #fff3f5;
	color: var(--color-primary);
	border: none;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13px;
	font-weight: 600;
	margin-top: 12px;
	list-style: none;
}

/* Desktop Place Order button */
#place_order,
.woocommerce-checkout #place_order {
	background: var(--color-primary) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 10px !important;
	height: 58px !important;
	font-size: 16px !important;
	font-weight: 800 !important;
	width: 100% !important;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s;
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 16px !important;
}

#place_order:hover {
	background: var(--color-primary-dark) !important;
	transform: translateY(-1px);
}

/* Secure checkout line below button */
.ga-secure-checkout-desktop {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	color: #bbb;
	margin-top: 14px;
}

/* Mobile: keep #place_order in DOM for Stripe — visually hidden in form-checkout.php */
@media (max-width: 1023px) {
	#ga-step-payment button#place_order {
		position: absolute !important;
		width: 1px !important;
		height: 1px !important;
		overflow: hidden !important;
		clip: rect(0, 0, 0, 0) !important;
		opacity: 0 !important;
	}
}

/* Apple Pay / Google Pay wallet buttons */
.wc-stripe-payment-request-button-separator {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	color: #888;
	font-size: 13px;
	font-weight: 600;
}

.wc-stripe-payment-request-button-separator::before,
.wc-stripe-payment-request-button-separator::after {
	content: '';
	flex: 1;
	height: 1px;
	background: #f0f0f0;
}

/* WooCommerce notices inside checkout */
.woocommerce-checkout .woocommerce-error,
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-info {
	border-radius: 10px;
	border-left: 4px solid var(--color-primary);
	background: #fff3f5;
	padding: 14px 18px;
	margin-bottom: 20px;
	font-size: 14px;
	font-weight: 600;
	color: #333;
	list-style: none;
}


body.ga-page-checkout .woocommerce-notices-wrapper,
body.ga-page-checkout .woocommerce-NoticeGroup-checkout {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
}
body.ga-page-checkout #ga-step-delivery .wc-stripe-express-checkout,
body.ga-page-checkout #ga-step-delivery #wc-stripe-express-checkout-element,
body.ga-page-checkout #ga-step-review .wc-stripe-express-checkout,
body.ga-page-checkout .woocommerce > .wc-stripe-express-checkout {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
}

.ga-recipient-section {
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: 16px;
	padding: 24px;
	margin: 24px 0;
}

.ga-recipient-header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid #f5f5f5;
}

.ga-recipient-icon {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #d97706;
	flex-shrink: 0;
}

.ga-recipient-title {
	font-family: var(--font-heading);
	font-size: 20px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 2px;
}

.ga-recipient-subtitle {
	font-size: 13px;
	color: var(--color-text-muted);
	margin: 0;
}

/* Field rows */
.ga-recipient-fields {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ga-recipient-row {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ga-recipient-row--2col {
	flex-direction: column;
}

@media (min-width: 600px) {
	.ga-recipient-row--2col {
		flex-direction: row;
		gap: 16px;
	}
	.ga-recipient-row--2col .ga-field {
		flex: 1;
	}
}

/* Field */
.ga-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ga-field label {
	font-size: 13px;
	font-weight: 700;
	color: #555;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.ga-city-browse-btn {
	border: none;
	background: none;
	color: var(--color-primary);
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
}

.ga-city-autocomplete-wrap {
	position: relative;
}

.ga-city-suggestions {
	position: fixed;
	z-index: 10050;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	max-height: 240px;
	overflow-y: auto;
}

.ga-city-suggestion-item {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 14px;
	border: none;
	background: transparent;
	text-align: left;
	cursor: pointer;
	font-size: 13px;
	color: #1a1a1a;
}

.ga-city-suggestion-item:hover,
.ga-city-suggestion-item:focus {
	background: #fdf8fa;
	outline: none;
}

.ga-city-suggestion-badge {
	font-size: 11px;
	font-weight: 700;
	color: var(--color-primary);
	white-space: nowrap;
}

.ga-field label abbr.required {
	color: var(--color-primary);
	text-decoration: none;
	font-weight: 800;
}

.ga-optional {
	color: #aaa;
	font-weight: 500;
	font-size: 12px;
}

/* Input wrapper with icon */
.ga-field-input-wrap {
	position: relative;
}

.ga-field-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #bbb;
	pointer-events: none;
	z-index: 1;
}

.ga-field-icon--textarea {
	top: 16px;
	transform: none;
}

.ga-input {
	width: 100%;
	height: 48px;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 0 16px;
	font-size: 14px;
	font-family: var(--font-body);
	color: #1a1a1a;
	background: #fafafa;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.ga-field-input-wrap .ga-input:not(.ga-input-phone) {
	padding-right: 42px;
}

.ga-field-icon-right {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #bbb;
	pointer-events: none;
	z-index: 1;
}

.ga-field-phone-wrap {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	overflow: hidden;
	background: #fafafa;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.ga-field-phone-wrap:focus-within {
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.08);
	background: #fff;
}

.ga-phone-prefix {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 12px;
	background: #f3f3f3;
	border-right: 1px solid #e0e0e0;
	font-size: 13px;
	font-weight: 600;
	color: #1a1a1a;
	flex-shrink: 0;
}

.ga-phone-dot {
	color: #ccc;
}

.ga-input-phone {
	flex: 1;
	min-width: 0;
	border: none !important;
	border-radius: 0 !important;
	padding: 0 16px !important;
	height: 48px;
	background: transparent !important;
	box-shadow: none !important;
}

.ga-field-phone-wrap .ga-input-phone:focus {
	outline: none;
	box-shadow: none !important;
	background: transparent !important;
}

.ga-select-icon {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: #bbb;
}

.ga-input:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.08);
	background: #fff;
}

.ga-input::placeholder {
	color: #bbb;
	font-weight: 400;
}

.ga-textarea {
	height: auto;
	padding: 14px 16px 14px 42px;
	resize: vertical;
	min-height: 80px;
	line-height: 1.5;
}

.ga-field-hint {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #aaa;
	margin: 0;
}

.ga-field-hint svg {
	flex-shrink: 0;
	color: #ccc;
}

