/**
 * Frontend styles
 *
 * @package EGC
 */

.egc-balance-check,
.egc-giftcard-form {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.egc-form-with-preview {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	margin-top: 20px;
}

.egc-preview-container {
	position: sticky;
	top: 20px;
	height: fit-content;
}

.egc-card-preview {
	max-width: 500px;
	margin: 0 auto;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 400px;
	position: relative;
}

.egc-preview-card {
	min-height: 400px;
	position: relative;
	padding: 40px;
	color: #fff;
}

.egc-balance-check h2,
.egc-giftcard-form h2 {
	margin-top: 0;
	color: #333;
	border-bottom: 2px solid #0073aa;
	padding-bottom: 10px;
}

.egc-form {
	margin-top: 20px;
}

.egc-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-bottom: 20px;
}

.egc-form-column {
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
}

.egc-form-column h3 {
	margin-top: 0;
	color: #0073aa;
}

.egc-form-group {
	margin-bottom: 15px;
}

.egc-form-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
	color: #333;
}

.egc-form-group input[type="text"],
.egc-form-group input[type="email"],
.egc-form-group input[type="number"],
.egc-form-group input[type="date"],
.egc-form-group input[type="file"],
.egc-form-group select,
.egc-form-group textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.egc-form-group input:focus,
.egc-form-group select:focus,
.egc-form-group textarea:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.egc-button {
	padding: 12px 24px;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
}

.egc-button-primary {
	background: #0073aa;
	color: #fff;
}

.egc-button-primary:hover {
	background: #005a87;
}

.egc-form-actions {
	margin-top: 20px;
	text-align: center;
}

/* Balance Result */
.egc-balance-result {
	margin-top: 30px;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
}

.egc-card-preview {
	display: flex;
	gap: 20px;
	margin-bottom: 30px;
	padding: 20px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.egc-card-image {
	width: 200px;
	height: 200px;
	border-radius: 8px;
	background: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.egc-card-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: cover;
}

.egc-card-info {
	flex: 1;
}

.egc-card-number {
	font-size: 18px;
	font-weight: bold;
	color: #333;
	margin-bottom: 15px;
	font-family: monospace;
}

.egc-card-balance {
	font-size: 24px;
	margin-bottom: 10px;
}

.egc-card-balance strong {
	color: #666;
	font-size: 16px;
}

.egc-card-balance span {
	color: #4CAF50;
	font-weight: bold;
}

.egc-card-expiry,
.egc-card-status {
	margin-top: 10px;
	color: #666;
}

/* Statement */
.egc-statement,
.egc-statement-section {
	margin-top: 20px;
}

.egc-statement h3,
.egc-statement-section h3 {
	margin-bottom: 15px;
	color: #333;
}

.egc-statement-filters {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.egc-statement-btn {
	margin: 0;
}

#egc-statement-loading {
	text-align: center;
	padding: 20px;
	color: #666;
}

.egc-txn-type {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.egc-txn-issue {
	background: #e3f2fd;
	color: #1976d2;
}

.egc-txn-redeem {
	background: #ffebee;
	color: #c62828;
}

.egc-txn-recharge {
	background: #e8f5e9;
	color: #2e7d32;
}

.egc-positive {
	color: #2e7d32;
	font-weight: 600;
}

.egc-negative {
	color: #c62828;
	font-weight: 600;
}

.egc-statement-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
}

.egc-statement-table thead {
	background: #0073aa;
	color: #fff;
}

.egc-statement-table th,
.egc-statement-table td {
	padding: 12px;
	text-align: left;
	border-bottom: 1px solid #ddd;
}

.egc-statement-table tbody tr:hover {
	background: #f9f9f9;
}

.egc-statement-table tbody tr:last-child td {
	border-bottom: none;
}

/* Error message */
.egc-error {
	padding: 15px;
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	color: #721c24;
	margin-top: 20px;
}

.egc-message {
	padding: 15px;
	border-radius: 4px;
	margin-top: 20px;
}

.egc-message.success {
	background: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.egc-message.error {
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

/* Payment Gateway Selection */
.egc-payment-gateways {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
	margin-top: 15px;
}

.egc-gateway-option {
	display: flex;
	align-items: center;
	padding: 15px;
	border: 2px solid #ddd;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s;
	background: #fff;
}

.egc-gateway-option:hover {
	border-color: #0073aa;
	background: #f0f8ff;
}

.egc-gateway-option.selected {
	border-color: #0073aa;
	background: #f0f8ff;
	box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
}

.egc-gateway-option input[type="radio"] {
	margin-right: 10px;
	cursor: pointer;
}

.egc-gateway-option span {
	font-weight: 500;
	color: #333;
}

.egc-form-section {
	margin-top: 30px;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
}

.egc-form-section h3 {
	margin-top: 0;
	color: #0073aa;
}

/* reCAPTCHA */
#egc-recaptcha-container {
	margin: 15px 0;
}

/* Responsive */
@media (max-width: 968px) {
	.egc-form-with-preview {
		grid-template-columns: 1fr;
	}
	
	.egc-preview-container {
		position: relative;
		top: 0;
	}
}

@media (max-width: 768px) {
	.egc-form-grid {
		grid-template-columns: 1fr;
	}
	
	.egc-card-preview {
		flex-direction: column;
	}
	
	.egc-card-image {
		width: 100%;
		height: 200px;
	}
	
	.egc-statement-table {
		font-size: 12px;
	}
	
	.egc-statement-table th,
	.egc-statement-table td {
		padding: 8px;
	}
	
	.egc-payment-gateways {
		grid-template-columns: 1fr;
	}
}

