/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Base color variables */
:root {
    --wsp-background: #ffffff;
    --wsp-foreground: #111827;
    --wsp-card-background: #ffffff;
    --wsp-card-foreground: #111827;
    --wsp-border: #e5e7eb;
    --wsp-input-border: #d1d5db;
    --wsp-primary: #2271b1;
    --wsp-primary-foreground: #ffffff;
    --wsp-ring: #3b82f6;
    --wsp-muted-foreground: #6b7280;
    --wsp-destructive: #dc2626;
    --wsp-success: #16a34a;
    --wsp-success-light: #dcfce7;
    --wsp-error-light: #fee2e2;
    --wsp-warning-light: #fef9c3;
    --wsp-warning: #854d0e;
}

/* Main Styles */
.warranty-manager-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form Title and Description */
.warranty-manager-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.warranty-manager-description {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* Form Input Group */
.warranty-manager-form-group {
    margin-bottom: 1.5rem;
}

.warranty-manager-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.warranty-manager-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

/* Submit Button */
.warranty-manager-button {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.warranty-manager-button:hover {
    background: #135e96;
}

.warranty-manager-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loading State */
.warranty-manager-loading {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.warranty-manager-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Container */
.warranty-manager-result {
    margin-top: 2.5rem;
    display: block;
}

/* Card Styles */
.warranty-shield-pro-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.warranty-shield-pro-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.warranty-shield-pro-card-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* Status Badges */
.warranty-shield-pro-status {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.875rem;
}

.warranty-shield-pro-status.success {
    background: #ecf8f0;
    color: #0a6b2d;
}

.warranty-shield-pro-status.pending {
    background: #fff8e5;
    color: #95591e;
}

.warranty-shield-pro-status i {
    margin-right: 0.5rem;
}

/* Info Grid */
.warranty-shield-pro-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.warranty-shield-pro-info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 500;
}

/* Timeline */
.warranty-shield-pro-timeline {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-item.completed i {
    color: #0a6b2d;
}

.timeline-item i {
    margin-right: 1rem;
    font-size: 1.25rem;
}

.timeline-item span {
    font-weight: 500;
    margin-right: 1rem;
}

.timeline-item small {
    color: #666;
}

/* Action Button */
.warranty-shield-pro-button {
    display: inline-flex;
    align-items: center;
    background: #2271b1;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.warranty-shield-pro-button:hover {
    background: #135e96;
    color: #fff;
    text-decoration: none;
}

.warranty-shield-pro-button i {
    margin-right: 0.5rem;
}

.warranty-shield-pro-note {
    margin-top: 0.75rem;
    color: #666;
    font-size: 0.875rem;
}

/* Error States */
.warranty-shield-pro-error {
    background: #fef2f2;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    color: #dc2626;
}

.warranty-shield-pro-error i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.warranty-manager-form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.warranty-manager-notice {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.warranty-manager-notice-success {
    background: #ecf8f0;
    color: #0a6b2d;
    border: 1px solid #86efac;
}

.warranty-manager-notice-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .warranty-manager-container {
        padding: 1rem;
        margin: 1rem;
    }

    .warranty-shield-pro-card {
        padding: 1rem;
    }

    .warranty-shield-pro-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .warranty-shield-pro-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .warranty-shield-pro-status {
        padding: 0.375rem 0.75rem;
        font-size: 0.813rem;
    }

    .warranty-shield-pro-button {
        width: 100%;
        justify-content: center;
    }
}

/* Remove old warranty-manager styles */
.warranty-manager-container,
.warranty-manager-title,
.warranty-manager-form,
.warranty-manager-form-group,
.warranty-manager-form-group label,
.warranty-manager-form-group input,
.warranty-manager-form-group .description,
.warranty-manager-form-error,
.warranty-manager-form-section,
.warranty-manager-form-section-title,
.warranty-manager-btn,
.warranty-manager-result,
.warranty-manager-notice,
.warranty-manager-loading {
     /* display: none !important; */ /* Uncomment to forcefully hide old styles if necessary */
}

/* Reset styles (optional but recommended) */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Warranty Shield Pro Public Styles */

/* Info Grid Styles */
.warranty-shield-pro-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.warranty-shield-pro-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.warranty-shield-pro-info-item .info-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.warranty-shield-pro-info-item .info-value {
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 500;
}

.warranty-shield-pro-info-item .info-value.code {
    font-family: monospace;
    background: #f3f4f6;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 1.125rem;
    letter-spacing: 0.05em;
}

/* Card Header Content Styles */
.warranty-shield-pro-card-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Timeline Styles */
.warranty-shield-pro-timeline {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0.85rem;
    top: 2.5rem;
    bottom: 0;
    width: 2px;
    background-color: #e5e7eb;
}

.timeline-item.completed:not(:last-child)::after {
    background-color: #2271b1;
}

.timeline-icon {
    width: 2rem;
    height: 2rem;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #6b7280;
    z-index: 1;
}

.timeline-item.completed .timeline-icon {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.timeline-content {
    flex: 1;
}

.timeline-content h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.timeline-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Action Section Styles */
.warranty-shield-pro-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.warranty-shield-pro-note {
    margin: 1rem 0 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .warranty-shield-pro-card-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .warranty-shield-pro-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Loading State Enhancements */
.warranty-shield-pro-loading {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
}

.warranty-shield-pro-loading::after {
    content: 'Verifying...';
    position: absolute;
    top: calc(50% + 2rem);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.875rem;
    color: #6b7280;
}

/* Error State Styles */
.warranty-shield-pro-error {
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warranty-shield-pro-error .dashicons {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
}

/* Animation Enhancements */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.warranty-shield-pro-card {
    animation: slideIn 0.3s ease-out;
}

.timeline-item {
    animation: slideIn 0.3s ease-out;
    animation-fill-mode: both;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.2s;
}

/* Print Styles */
@media print {
    .warranty-shield-pro-verification {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .warranty-shield-pro-btn,
    .warranty-shield-pro-actions {
        display: none;
    }

    .warranty-shield-pro-card {
        box-shadow: none;
        border: 1px solid #000;
    }

    .warranty-shield-pro-timeline::after {
        background-color: #000;
    }
}

/* --- Redesign for Warranty Verification Result (.warranty-manager-result) --- */

/* Style the main result card */
.warranty-manager-result .warranty-shield-pro-card {
    border: 1px solid var(--wsp-border);
    border-radius: 0.75rem;
    background-color: var(--wsp-card-background);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    padding: 0;
    overflow: hidden;
    margin-top: 0;
    animation: wsp-fadeIn 0.3s ease-out;
}

@keyframes wsp-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card Header styling */
.warranty-manager-result .warranty-shield-pro-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--wsp-border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0;
}

.warranty-manager-result .warranty-shield-pro-card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--wsp-foreground);
    margin: 0;
    line-height: 1.3;
}

/* Modern Status Badge Styling */
.warranty-manager-result .warranty-shield-pro-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    line-height: 1.25;
    border: 1px solid transparent;
}

.warranty-manager-result .warranty-shield-pro-status .fas {
    font-size: 0.875rem;
    line-height: 1;
    margin: 0;
}

/* Specific status colors using variables */
.warranty-manager-result .warranty-shield-pro-status.success {
    background-color: var(--wsp-success-light);
    color: #065f46;
    border-color: #a7f3d0;
}

.warranty-manager-result .warranty-shield-pro-status.pending {
    background-color: #fef9c3;
    color: #854d0e;
    border-color: #fde68a;
}

/* Consider adding an error status style */
.warranty-manager-result .warranty-shield-pro-status.error {
    background-color: var(--wsp-error-light);
    color: #991b1b;
    border-color: #fecaca;
}

/* Info Grid adjustments */
.warranty-manager-result .warranty-shield-pro-info-grid {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem 1.5rem;
    margin-bottom: 0;
}

.warranty-manager-result .warranty-shield-pro-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.warranty-manager-result .info-label {
    font-size: 0.75rem;
    color: var(--wsp-muted-foreground);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0;
}

.warranty-manager-result .info-value {
    font-size: 0.875rem;
    color: var(--wsp-foreground);
    font-weight: 500;
    line-height: 1.4;
}

/* Actions Section */
.warranty-manager-result .warranty-shield-pro-actions {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--wsp-border);
    margin-top: 0;
    background-color: #f9fafb;
}

/* Ensure the button inherits the new global style */
.warranty-manager-result .warranty-shield-pro-actions .warranty-shield-pro-button {
    max-width: 300px;
    width: 100%;
    margin: 0 auto;
}

/* Style the note below the button */
.warranty-manager-result .warranty-shield-pro-note {
    margin-top: 1rem;
    color: var(--wsp-muted-foreground);
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* --- Refined Timeline Styling --- */
.warranty-manager-result .warranty-shield-pro-timeline {
    padding: 1.5rem;
    border-top: 1px solid var(--wsp-border);
    margin-top: 0;
}

.warranty-manager-result .warranty-shield-pro-timeline h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--wsp-foreground);
}

.warranty-manager-result .timeline-item {
    display: flex;
    gap: 1rem;
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 0.5rem;
    margin-bottom: 0;
}

.warranty-manager-result .timeline-item:last-child {
    padding-bottom: 0;
}

/* Vertical line connector */
.warranty-manager-result .timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 1.1rem;
    top: 1.75rem;
    bottom: -0.75rem;
    width: 2px;
    background-color: var(--wsp-border);
    z-index: 0;
}
/* Line color for completed items */
.warranty-manager-result .timeline-item.completed:not(:last-child)::before {
    background-color: var(--wsp-primary);
}

/* Timeline icon container */
.warranty-manager-result .timeline-item .fas {
    position: relative;
    z-index: 1;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--wsp-background);
    border: 2px solid var(--wsp-border);
    color: var(--wsp-muted-foreground);
    font-size: 1rem;
    flex-shrink: 0;
    margin: 0;
}

/* Icon style for completed items */
.warranty-manager-result .timeline-item.completed .fas {
    background-color: var(--wsp-primary);
    border-color: var(--wsp-primary);
    color: var(--wsp-primary-foreground);
}

/* Timeline content */
.warranty-manager-result .timeline-item span {
    display: block;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--wsp-foreground);
    margin: 0 0 0.25rem;
    line-height: 1.4;
}

.warranty-manager-result .timeline-item small {
    font-size: 0.8125rem;
    color: var(--wsp-muted-foreground);
    line-height: 1.3;
}

/* Responsive Adjustments for Result Section */
@media (max-width: 640px) {
    .warranty-manager-result .warranty-shield-pro-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .warranty-manager-result .warranty-shield-pro-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .warranty-manager-result .warranty-shield-pro-actions,
    .warranty-manager-result .warranty-shield-pro-timeline,
    .warranty-manager-result .warranty-shield-pro-card-header {
        padding: 1rem;
    }

    .warranty-manager-result .timeline-item {
        gap: 0.75rem;
        padding-left: 0;
    }
    .warranty-manager-result .timeline-item .fas {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }
    .warranty-manager-result .timeline-item:not(:last-child)::before {
        left: 1rem;
        top: 1.5rem;
        bottom: -0.5rem;
    }
}

/* --- Refinements for Warranty Verification Result --- */

/* Section titles */
.warranty-shield-pro-section {
    padding: 1.5rem;
    border-top: 1px solid var(--wsp-border);
}

.warranty-shield-pro-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--wsp-foreground);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warranty-shield-pro-section-title i {
    color: var(--wsp-primary);
    font-size: 1rem;
}

/* Improve info value code styling */
.info-value.code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875rem;
    background-color: var(--wsp-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    letter-spacing: 0.05em;
    word-break: break-all;
}

/* Error Card Styling */
.warranty-shield-pro-card .warranty-shield-pro-error {
    margin: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: var(--wsp-error-light);
    border: 1px solid #fecaca;
    color: var(--wsp-destructive);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

/* Add styles for the error status badge */
.warranty-shield-pro-status.error {
    background-color: var(--wsp-error-light);
    color: var(--wsp-destructive);
    border-color: #fecaca;
}

/* Timeline content improvements */
.timeline-content {
    display: flex;
    flex-direction: column;
}

/* Media queries for responsive behavior on smaller screens */
@media (max-width: 640px) {
    .warranty-shield-pro-section {
        padding: 1rem;
    }
}
