/**
 * Frontend Styles
 * 
 * @package WarrantyPlugin
 */

/* ==========================================================================
   Warranty Form Container
   ========================================================================== */

.warranty-activation-form-wrapper,
.warranty-check-form-wrapper {
	max-width: 800px;
	margin: 40px auto;
	padding: 0 20px;
}

.warranty-form-container {
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	padding: 40px;
	transition: all 0.3s ease;
}

.warranty-form-container:hover {
	box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Form Title & Description
   ========================================================================== */

.warranty-form-title {
	font-size: 28px;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 16px 0;
	text-align: center;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.warranty-form-description {
	font-size: 15px;
	color: #666;
	text-align: center;
	margin: 0 0 32px 0;
	line-height: 1.6;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.warranty-form {
	display: block;
}

.warranty-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 20px;
}

.warranty-form-group {
	margin-bottom: 24px;
}

.warranty-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #333;
	margin-bottom: 8px;
}

.warranty-label .required {
	color: #dc3545;
	margin-left: 2px;
}

.warranty-label .optional {
	font-weight: 400;
	color: #999;
	font-size: 13px;
}

.warranty-input,
.warranty-textarea {
	width: 100%;
	padding: 12px 16px;
	font-size: 15px;
	line-height: 1.5;
	color: #333;
	background-color: #f8f9fa;
	border: 2px solid #e9ecef;
	border-radius: 8px;
	transition: all 0.3s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.warranty-input:focus,
.warranty-textarea:focus {
	outline: none;
	background-color: #fff;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.warranty-textarea {
	resize: vertical;
	min-height: 80px;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */

.warranty-form-submit {
	margin-top: 32px;
	text-align: center;
}

.warranty-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 40px;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
	min-width: 200px;
}

.warranty-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.warranty-button:active {
	transform: translateY(0);
}

.warranty-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.warranty-button .button-loader {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
	to {
		transform: rotate(360deg);
	}
}

/* ==========================================================================
   Response Messages
   ========================================================================== */

.warranty-response,
.warranty-results {
	margin-top: 24px;
	padding: 20px;
	border-radius: 8px;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.warranty-response.success {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.warranty-response.error {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

.warranty-response-icon {
	font-size: 48px;
	margin-bottom: 16px;
	text-align: center;
}

.warranty-response-message {
	font-size: 16px;
	line-height: 1.6;
	text-align: center;
}

/* ==========================================================================
   Check Results
   ========================================================================== */

.warranty-results-header {
	text-align: center;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 2px solid #e9ecef;
}

.warranty-results-header h3 {
	margin: 0 0 8px 0;
	font-size: 20px;
	color: #333;
}

.warranty-results-header .customer-info {
	font-size: 14px;
	color: #666;
}

.warranty-results-list {
	display: grid;
	gap: 16px;
}

.warranty-result-item {
	background: #f8f9fa;
	border-radius: 8px;
	padding: 20px;
	border-left: 4px solid #667eea;
	transition: all 0.3s ease;
}

.warranty-result-item:hover {
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.warranty-result-item.expired {
	border-left-color: #dc3545;
	opacity: 0.8;
}

.warranty-result-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 12px;
}

.warranty-product-info h4 {
	margin: 0 0 4px 0;
	font-size: 18px;
	color: #333;
}

.warranty-product-code {
	font-size: 13px;
	color: #666;
	font-family: monospace;
}

.warranty-status-badge {
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.warranty-status-badge.active {
	background: #d4edda;
	color: #155724;
}

.warranty-status-badge.expired {
	background: #f8d7da;
	color: #721c24;
}

.warranty-result-details {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.warranty-detail-item {
	display: flex;
	flex-direction: column;
}

.warranty-detail-label {
	font-size: 12px;
	color: #666;
	margin-bottom: 4px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.warranty-detail-value {
	font-size: 15px;
	color: #333;
	font-weight: 600;
}

.warranty-detail-value.expired {
	color: #dc3545;
}

.warranty-detail-value.expiring {
	color: #ffc107;
}

.warranty-detail-value.active {
	color: #28a745;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
	.warranty-form-container {
		padding: 24px;
	}

	.warranty-form-title {
		font-size: 24px;
	}

	.warranty-form-row {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.warranty-result-details {
		grid-template-columns: 1fr;
	}

	.warranty-result-header {
		flex-direction: column;
		gap: 12px;
	}
}

@media (max-width: 480px) {
	.warranty-activation-form-wrapper,
	.warranty-check-form-wrapper {
		padding: 0 12px;
		margin: 20px auto;
	}

	.warranty-form-container {
		padding: 20px;
	}

	.warranty-button {
		width: 100%;
	}
}

/* ==========================================================================
   Animation Utilities
   ========================================================================== */

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateX(-20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.warranty-result-item {
	animation: slideIn 0.3s ease;
}

.warranty-result-item:nth-child(2) {
	animation-delay: 0.1s;
}

.warranty-result-item:nth-child(3) {
	animation-delay: 0.2s;
}

.warranty-result-item:nth-child(4) {
	animation-delay: 0.3s;
}
