/**
 * GTAW Bridge Public Styles
 * Frontend styles for checkout and public pages
 * Uses unified design tokens and component system
 *
 * @package GTAW_Bridge
 */

/* Discord Account Widget */
.gtaw-discord-widget {
	background: var(--gtaw-switcher-bg-color, #fff);
	border: 1px solid var(--gtaw-switcher-border-color, #ddd);
	border-radius: 4px;
	padding: 20px;
	margin: 0;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	width: 100%;
	box-sizing: border-box;
}

.gtaw-discord-widget h3 {
	margin: 0 0 15px;
	font-size: 18px;
	font-weight: 600;
	color: var(--gtaw-switcher-text-color, #1d2327);
}

.gtaw-discord-widget p {
	margin: 0 0 12px;
	color: var(--gtaw-switcher-text-secondary, #646970);
	font-size: 14px;
	line-height: 1.5;
}

.gtaw-discord-widget p:last-child {
	margin-bottom: 0;
}

.gtaw-discord-widget strong {
	color: var(--gtaw-switcher-text-color, #1d2327);
	font-weight: 600;
}

.gtaw-discord-widget .discord-status-success {
	color: #00a32a;
}

.gtaw-discord-widget .discord-status-warning {
	color: #dba617;
}

/* ============================================
   Public Page Specific Utilities
   ============================================
   Public-specific utility classes (shared utilities in components.css).
   Uses design tokens for compatibility with design customization.
   */

/* Account Error Container */
.gtaw-account-error {
	display: none;
	margin: 10px 0;
}

.gtaw-discord-widget .discord-status-error {
	color: #d63638;
}

/* Account Widgets Wrapper - Responsive layout */
.gtaw-account-widgets-wrapper {
	display: block;
	margin: 20px 0;
	width: 100%;
}

.gtaw-account-widgets-wrapper > * {
	margin-bottom: 20px;
}

.gtaw-account-widgets-wrapper > *:last-child {
	margin-bottom: 0;
}

@media (min-width: 768px) {
	.gtaw-account-widgets-wrapper {
		display: flex;
		gap: 20px;
		margin: 20px 0;
		align-items: flex-start;
	}

	.gtaw-account-widgets-wrapper > * {
		flex: 1;
		margin: 0;
		min-width: 0; /* Prevent flex items from overflowing */
	}
}

/* ============================================
   Checkout Fields
   Standardized BEM naming: .gtaw-checkout-field (design system standard)
   Backward compatibility: .bridge-checkout-field aliases maintained
   Uses component styles from components.css - only checkout-specific overrides here
   ============================================ */

.gtaw-checkout-field,
.bridge-checkout-field {
	margin-bottom: var(--gtaw-spacing-lg);
}

.gtaw-checkout-field label,
.bridge-checkout-field label {
	display: block;
	margin-bottom: var(--gtaw-spacing-md);
	font-weight: var(--gtaw-font-weight-semibold);
	font-size: var(--gtaw-font-size-sm);
	color: var(--gtaw-color-text);
}

/* Extend component form input styles - no duplication */
.gtaw-checkout-field input[type="text"],
.gtaw-checkout-field input[type="email"],
.gtaw-checkout-field input[type="tel"],
.bridge-checkout-field input[type="text"],
.bridge-checkout-field input[type="email"],
.bridge-checkout-field input[type="tel"] {
	/* Inherit all styles from .gtaw-form-input in components.css */
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--gtaw-color-border);
	border-radius: var(--gtaw-radius-md);
	font-size: var(--gtaw-font-size-base);
	font-family: var(--gtaw-font-family-base);
	color: var(--gtaw-color-text);
	background-color: var(--gtaw-color-surface);
	box-sizing: border-box;
	transition: border-color var(--gtaw-transition-base), box-shadow var(--gtaw-transition-base);
}

.gtaw-checkout-field input:focus,
.bridge-checkout-field input:focus {
	outline: none;
	border-color: var(--gtaw-color-primary);
	box-shadow: 0 0 0 3px rgba(47, 103, 246, 0.1);
}

/* Use component description styles */
.gtaw-checkout-field .description,
.bridge-checkout-field .description {
	/* Inherit from .gtaw-form-description in components.css */
	font-size: var(--gtaw-font-size-sm);
	color: var(--gtaw-color-text-secondary);
	margin-top: var(--gtaw-spacing-sm);
	line-height: var(--gtaw-line-height-relaxed);
}

/* ============================================
   Payment Method
   Standardized BEM naming: .gtaw-payment-method (design system standard)
   Backward compatibility: .bridge-payment-method aliases maintained
   ============================================ */

.gtaw-payment-method,
.bridge-payment-method {
	border: 1px solid var(--gtaw-color-border);
	border-radius: var(--gtaw-radius-lg);
	padding: var(--gtaw-spacing-xl);
	margin-bottom: var(--gtaw-spacing-lg);
	background: var(--gtaw-color-surface);
	transition: border-color var(--gtaw-transition-base), box-shadow var(--gtaw-transition-base);
}

.gtaw-payment-method:hover,
.bridge-payment-method:hover {
	border-color: var(--gtaw-color-primary);
	box-shadow: var(--gtaw-shadow-sm);
}

.gtaw-payment-method--fleeca,
.bridge-payment-method--fleeca {
	border-color: var(--gtaw-color-primary);
	border-width: 2px;
}

.gtaw-payment-method__icon,
.bridge-payment-method__icon {
	display: inline-block;
	vertical-align: middle;
	margin-right: var(--gtaw-spacing-md);
}

.gtaw-payment-method__title,
.bridge-payment-method__title {
	font-size: var(--gtaw-font-size-lg);
	font-weight: var(--gtaw-font-weight-semibold);
	margin-bottom: var(--gtaw-spacing-md);
	color: var(--gtaw-color-text);
}

.gtaw-payment-method__description,
.bridge-payment-method__description {
	color: var(--gtaw-color-text-secondary);
	margin-bottom: var(--gtaw-spacing-md);
	font-size: var(--gtaw-font-size-sm);
	line-height: var(--gtaw-line-height-relaxed);
}

/* ============================================
   Sandbox Notice
   Standardized BEM naming: .gtaw-sandbox-notice (design system standard)
   Backward compatibility: .bridge-sandbox-notice aliases maintained
   ============================================ */

.gtaw-sandbox-notice,
.bridge-sandbox-notice {
	background: var(--gtaw-color-warning-light);
	border-left: 4px solid var(--gtaw-color-warning);
	padding: var(--gtaw-spacing-md) var(--gtaw-spacing-lg);
	margin-top: var(--gtaw-spacing-lg);
	border-radius: var(--gtaw-radius-md);
	font-size: var(--gtaw-font-size-sm);
	color: var(--gtaw-color-warning-dark);
}

.gtaw-sandbox-notice strong,
.bridge-sandbox-notice strong {
	color: var(--gtaw-color-warning-dark);
	font-weight: var(--gtaw-font-weight-semibold);
}

/* Hide address line 2 and postcode fields */
.woocommerce-billing-fields #billing_address_2_field,
.woocommerce-billing-fields #billing_postcode_field,
.gtaw-hidden-field {
	display: none !important;
}

