/**
 * 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;
}

/* ==========================================================================
   Warranty Claim Form (shortcode: [warranty_claim])
   ========================================================================== */

.wc-claim-wrapper {
max-width: 680px;
margin: 40px auto;
padding: 0 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wc-claim-container {
background: #fff;
border-radius: 12px;
box-shadow: 0 4px 24px rgba(0,0,0,.1);
overflow: hidden;
}

.wc-claim-header {
background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
color: #fff;
padding: 30px 30px 24px;
text-align: center;
}

.wc-claim-icon {
font-size: 2.5em;
display: block;
margin-bottom: 8px;
}

.wc-claim-header h2 {
margin: 0 0 8px;
font-size: 1.5em;
font-weight: 700;
color: #fff;
}

.wc-claim-header p {
margin: 0;
opacity: .9;
font-size: .95em;
line-height: 1.5;
}

/* Tabs */
.wc-claim-tabs {
display: flex;
border-bottom: 2px solid #f0f0f0;
}

.wc-tab-btn {
flex: 1;
padding: 14px 10px;
border: none;
background: #f8f9fa;
cursor: pointer;
font-size: .9em;
font-weight: 600;
color: #666;
transition: all .2s;
border-bottom: 3px solid transparent;
margin-bottom: -2px;
}

.wc-tab-btn:hover {
background: #fff;
color: #333;
}

.wc-tab-btn.wc-tab-active {
background: #fff;
color: #ff6b35;
border-bottom-color: #ff6b35;
}

/* Panels */
.wc-tab-panel {
display: none;
padding: 28px 30px 30px;
}

.wc-tab-panel-active {
display: block;
}

/* Fields */
.wc-field-row {
margin-bottom: 18px;
}

.wc-field-row-2 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}

.wc-field-group {
display: flex;
flex-direction: column;
}

.wc-field-group label {
font-weight: 600;
font-size: .88em;
color: #444;
margin-bottom: 6px;
}

.wc-field-group label span {
color: #e53935;
}

.wc-field-group input,
.wc-field-group textarea {
padding: 11px 14px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: .95em;
transition: border .2s, box-shadow .2s;
color: #333;
background: #fafafa;
}

.wc-field-group input:focus,
.wc-field-group textarea:focus {
outline: none;
border-color: #ff6b35;
box-shadow: 0 0 0 3px rgba(255,107,53,.12);
background: #fff;
}

.wc-field-group small {
margin-top: 4px;
font-size: .8em;
color: #888;
}

/* Notice */
.wc-claim-notice {
background: #fff8e1;
border-left: 4px solid #ffc107;
padding: 12px 15px;
border-radius: 4px;
font-size: .88em;
color: #555;
margin-bottom: 20px;
line-height: 1.5;
}

/* Buttons */
.wc-submit-btn {
width: 100%;
padding: 14px;
border: none;
border-radius: 8px;
background: linear-gradient(135deg, #ff6b35, #f7931e);
color: #fff;
font-size: 1em;
font-weight: 700;
cursor: pointer;
transition: opacity .2s, transform .15s;
box-shadow: 0 3px 10px rgba(255,107,53,.35);
}

.wc-submit-btn:hover {
opacity: .9;
transform: translateY(-1px);
}

.wc-submit-btn:disabled {
opacity: .6;
cursor: not-allowed;
transform: none;
}

.wc-submit-btn-outline {
background: transparent;
color: #1976D2;
border: 2px solid #1976D2;
box-shadow: none;
}

.wc-submit-btn-outline:hover {
background: #e3f2fd;
}

/* Messages */
.wc-claim-message {
margin-bottom: 16px;
padding: 14px 18px;
border-radius: 6px;
font-size: .93em;
line-height: 1.6;
animation: wcFadeIn .3s ease;
}

.wc-msg-success {
background: #e8f5e9;
border-left: 4px solid #4caf50;
color: #1b5e20;
}

.wc-msg-error {
background: #fce4ec;
border-left: 4px solid #e91e63;
color: #880e4f;
}

.wc-msg-info {
background: #e3f2fd;
border-left: 4px solid #2196F3;
color: #0d47a1;
}

/* Check result */
.wc-check-result {
margin-top: 20px;
padding: 18px;
border-radius: 8px;
animation: wcFadeIn .3s ease;
}

.wc-check-success { background: #e8f5e9; border: 1px solid #a5d6a7; }
.wc-check-warning { background: #fff8e1; border: 1px solid #ffe082; }
.wc-check-error   { background: #fce4ec; border: 1px solid #f48fb1; }

/* Status card */
.wc-status-card {}

.wc-status-top {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}

.wc-status-code {
font-size: .88em;
color: #666;
}

.wc-status-code strong {
font-family: monospace;
color: #333;
}

.wc-status-badge {
display: inline-block;
padding: 4px 12px;
border-radius: 20px;
font-size: .78em;
font-weight: 700;
text-transform: uppercase;
}

.warranty-badge-pending   { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.warranty-badge-scheduled { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.warranty-badge-progress  { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ce93d8; }
.warranty-badge-done      { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.warranty-badge-rejected  { background: #fce4ec; color: #880e4f; border: 1px solid #f48fb1; }

.wc-status-body p {
margin: 4px 0;
font-size: .9em;
color: #444;
}

.wc-status-info {
margin-top: 12px;
padding: 12px 14px;
border-radius: 6px;
font-size: .9em;
line-height: 1.6;
}

.wc-status-info-pending   { background: #fff8e1; color: #555; }
.wc-status-info-scheduled { background: #e8f5e9; color: #1b5e20; }
.wc-status-info-done      { background: #e8f5e9; color: #1b5e20; font-weight: 600; }
.wc-status-info-rejected  { background: #fce4ec; color: #880e4f; }

@keyframes wcFadeIn {
from { opacity: 0; transform: translateY(-6px); }
to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
.wc-claim-tabs { flex-direction: column; }
.wc-tab-btn { border-bottom: none; border-left: 3px solid transparent; text-align: left; }
.wc-tab-btn.wc-tab-active { border-left-color: #ff6b35; border-bottom: none; }
.wc-tab-panel { padding: 20px 18px 24px; }
.wc-field-row-2 { grid-template-columns: 1fr; }
.wc-claim-header { padding: 22px 18px 18px; }
}
/* ============================================================
   Product lookup flow – Step hints, product cards, back btn
   Added in v1.3.0 patch
   ============================================================ */

/* Step hint box */
.wc-step-hint {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f0f7ff;
    border: 1px solid #cce4ff;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.wc-step-hint > span { font-size: 1.6em; line-height: 1; }
.wc-step-hint strong { display: block; margin-bottom: 4px; color: #1565C0; }
.wc-step-hint p { margin: 0; color: #555; font-size: .93em; }

/* Back row above product list */
.wc-step-back-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.wc-step-subtitle { margin: 0; color: #555; font-size: .93em; }

/* Back button */
.wc-back-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: .88em;
    color: #555;
    cursor: pointer;
    transition: background .2s, color .2s;
    white-space: nowrap;
}
.wc-back-btn:hover { background: #f5f5f5; color: #333; }

/* Lookup button sizing */
.wc-btn-lookup { width: 100%; }
.wc-lookup-btn-wrap { display: flex; flex-direction: column; justify-content: flex-end; }

/* ---- Product cards ---- */
.wc-product-list { display: flex; flex-direction: column; gap: 12px; }

.wc-product-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px 20px;
    transition: box-shadow .2s;
}
.wc-product-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.1); }

.wc-product-card-info { flex: 1; min-width: 0; }
.wc-product-name { font-weight: 600; font-size: 1em; color: #222; margin-bottom: 4px; }
.wc-product-serial { font-size: .88em; color: #555; margin-bottom: 4px; }
.wc-product-serial code { background: #f4f4f4; padding: 1px 5px; border-radius: 4px; font-family: monospace; }
.wc-product-meta { font-size: .84em; color: #666; margin-top: 2px; }
.wc-product-valid  { color: #2e7d32; font-weight: 500; }
.wc-product-expired { color: #c62828; font-weight: 500; }

.wc-product-card-action { flex-shrink: 0; text-align: center; }

.wc-claim-product-btn {
    background: #1976D2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: .9em;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    white-space: nowrap;
}
.wc-claim-product-btn:hover { background: #1565C0; transform: translateY(-1px); }
.wc-claim-product-btn:active { transform: translateY(0); }

.wc-product-claimed-badge {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: .84em;
    font-weight: 600;
    white-space: nowrap;
}
.wc-product-claim-code {
    display: block;
    text-align: center;
    margin-top: 5px;
    color: #888;
    font-size: .78em;
}

/* Empty state */
.wc-no-products {
    text-align: center;
    padding: 32px 20px;
    background: #fafafa;
    border: 2px dashed #ddd;
    border-radius: 10px;
    color: #666;
}
.wc-no-products p { margin: 6px 0; }

/* Selected product banner (above claim form) */
.wc-selected-product { margin-bottom: 16px; }
.wc-selected-row {
    background: #e8f4fd;
    border-left: 4px solid #1976D2;
    padding: 10px 16px;
    border-radius: 0 8px 8px 0;
    font-size: .93em;
    color: #333;
}
.wc-selected-row code { font-family: monospace; background: #d0e8f9; padding: 1px 5px; border-radius: 3px; }

/* Claims list (check tab) */
.wc-claims-list { display: flex; flex-direction: column; gap: 12px; }
.wc-claims-list-title { margin: 0 0 8px; font-size: .93em; color: #555; }
.wc-status-card-list { margin-top: 0; }

@media (max-width: 540px) {
    .wc-product-card { flex-direction: column; align-items: flex-start; }
    .wc-product-card-action { width: 100%; }
    .wc-claim-product-btn { width: 100%; }
    .wc-step-back-row { flex-direction: column; align-items: flex-start; }
}
