/**
 * Voter Polling Lookup - Frontend Styles
 * Modern, accessible design for the voter lookup form
 * ALL STYLES PROPERLY SCOPED TO PREVENT WEBSITE CONFLICTS
 */

/* Complete CSS Reset and Isolation */
.vpl-lookup-container {
    /* Reset everything to prevent inheritance */
    all: initial;

    /* Restore essential display properties */
    display: block !important;
    box-sizing: border-box !important;

    /* Create isolated stacking context */
    position: relative !important;
    z-index: 1 !important;

    /* Set base font */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;

    /* Ensure all child elements inherit properly */
    * {
        box-sizing: border-box !important;
        font-family: inherit !important;
    }
}

/* CRITICAL: Override ALL WordPress theme bullet points */
.vpl-lookup-container,
.vpl-lookup-container *,
.vpl-lookup-container ul,
.vpl-lookup-container ol,
.vpl-lookup-container li,
.vpl-lookup-container div,
.vpl-lookup-container form,
.vpl-lookup-container label {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
}


/* CSS Custom Properties scoped to plugin container only */
.vpl-lookup-container {
    --vpl-primary-color: #393e46;
    --vpl-primary-hover: #2d3138;
    --vpl-primary-light: #e8e9ea;
    --vpl-success-color: #059669;
    --vpl-success-light: #d1fae5;
    --vpl-error-color: #dc2626;
    --vpl-error-light: #fee2e2;
    --vpl-warning-color: #d97706;
    --vpl-warning-light: #fef3c7;
    --vpl-gray-50: #f9fafb;
    --vpl-gray-100: #f3f4f6;
    --vpl-gray-200: #e5e7eb;
    --vpl-gray-300: #d1d5db;
    --vpl-gray-400: #9ca3af;
    --vpl-gray-500: #6b7280;
    --vpl-gray-600: #4b5563;
    --vpl-gray-700: #374151;
    --vpl-gray-800: #1f2937;
    --vpl-gray-900: #111827;
    --vpl-border-radius: 12px;
    --vpl-border-radius-sm: 8px;
    --vpl-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --vpl-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --vpl-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --vpl-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Specific targeting for WordPress theme interference - scoped to plugin only */
.vpl-lookup-container ul,
.vpl-lookup-container ol,
.vpl-lookup-container li {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.vpl-lookup-container li::before,
.vpl-lookup-container li::after {
    display: none !important;
    content: none !important;
}

/* Main container - All plugin styles are contained within this selector */
.vpl-lookup-container {
    /* Reset and isolate from parent styles */
    all: initial;

    /* Restore essential display properties */
    display: block;
    box-sizing: border-box;

    /* Plugin-specific styling */
    max-width: 640px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border: 1px solid var(--vpl-gray-200);
    border-radius: var(--vpl-border-radius);
    box-shadow: var(--vpl-shadow-lg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative;
    overflow: hidden;
    text-align: left;

    /* Ensure proper stacking context */
    z-index: 1;
}

/* Global reset for lists within the form */
.vpl-lookup-container *,
.vpl-lookup-container *::before,
.vpl-lookup-container *::after {
    list-style: none !important;
    list-style-type: none !important;
}

.vpl-lookup-container ul,
.vpl-lookup-container ol,
.vpl-lookup-container li {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
}

/* Additional bullet point removal */
.vpl-lookup-container li::before,
.vpl-lookup-container li::after {
    display: none !important;
    content: none !important;
}

/* Remove any potential bullet styling from parent elements */
.vpl-lookup-container {
    list-style: none !important;
    list-style-type: none !important;
}

/* Ensure no pseudo-elements create bullets */
.vpl-form-group::before,
.vpl-form-group::after,
.vpl-radio-group::before,
.vpl-radio-group::after,
.vpl-radio-option::before,
.vpl-radio-option::after {
    display: none !important;
    content: none !important;
}

.vpl-lookup-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--vpl-primary-color);
}



/* Form title */
.vpl-lookup-container .vpl-form-title {
    text-align: center;
    color: #1f2937;
    margin-bottom: 2.5rem;
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

/* Form styling */
/* .vpl-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    width: 100%;
    align-items: stretch;
} */

/* Override any theme styles that might interfere */
.vpl-form * {
    box-sizing: border-box;
}

/* Ensure proper form element spacing */
.vpl-form input,
.vpl-form button {
    margin: 0;
}

/* Apply proper padding only to input fields */
.vpl-input {
    padding: 12px 16px !important;
    margin: 0 !important;
}

/* Aggressive bullet point removal */
.vpl-form ul,
.vpl-form ol,
.vpl-lookup-container ul,
.vpl-lookup-container ol {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-indent: 0 !important;
}

.vpl-form li,
.vpl-lookup-container li {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-indent: 0 !important;
}

.vpl-form li::before,
.vpl-form li::after,
.vpl-lookup-container li::before,
.vpl-lookup-container li::after {
    display: none !important;
    content: none !important;
}

/* Remove any potential WordPress theme interference */
.vpl-lookup-container .vpl-form-group {
    list-style: none !important;
    list-style-type: none !important;
}

.vpl-lookup-container .vpl-form-group::before,
.vpl-lookup-container .vpl-form-group::after {
    display: none !important;
    content: none !important;
}

/* Form Groups - Clean Modern Style */
.vpl-form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vpl-form-group:last-child {
    margin-bottom: 0;
}

.vpl-form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Help text styling */
.vpl-help-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    line-height: 1.4;
    font-style: italic;
}

.vpl-required {
    color: #ef4444;
    font-weight: 500;
}

.vpl-optional {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.75rem;
}

.vpl-conditional {
    color: #2f4f4f;
    font-weight: 400;
    font-size: 0.75rem;
}

/* Removed duplicate styles - using modern input styling below */

.vpl-help-text {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.375rem;
    font-style: italic;
    line-height: 1.25rem;
}

/* Form Rows */
.vpl-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.vpl-form-group.vpl-half {
    margin-bottom: 0;
}

/* Sections - Clean Card Style */
.vpl-section {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-left: 4px solid #2f4f4f;
}

.vpl-section-title {
    color: #2f4f4f;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.5rem;
}

.vpl-section-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0 0 1.5rem 0;
    line-height: 1.5rem;
}

.vpl-search-type-group {
    margin-bottom: 1.5rem;
}

.vpl-search-type-label {
    display: block;
    font-weight: 600;
    color: var(--vpl-gray-600);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.vpl-radio-group {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.vpl-radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.vpl-radio-option input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--vpl-gray-300);
    border-radius: 50%;
    background: white;
    cursor: pointer;
    position: relative;
    appearance: none;
    transition: var(--vpl-transition);
}

.vpl-radio-option input[type="radio"]:checked {
    border-color: var(--vpl-primary-color);
    background: var(--vpl-primary-color);
}

.vpl-radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.vpl-radio-option input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--vpl-primary-light);
}

.vpl-radio-option label {
    font-weight: 500;
    color: var(--vpl-gray-700);
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}

.vpl-radio-option input[type="radio"]:checked + label {
    color: #2f4f4f;
    font-weight: 600;
}

/* Remove all list styling and bullets */
.vpl-form ul,
.vpl-form ol,
.vpl-form li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.vpl-form-group ul,
.vpl-form-group ol,
.vpl-form-group li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Search Type Label */
.vpl-search-type-label {
    display: block;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* Modern Radio Group */
.vpl-radio-group {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
    width: 100%;
}

.vpl-radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

.vpl-radio-option:hover {
    background: rgba(59, 130, 246, 0.05);
}

.vpl-radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    position: relative;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
}

.vpl-radio-option input[type="radio"]:checked {
    border-color: #2f4f4f;
    background: #2f4f4f;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.vpl-radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.vpl-radio-option input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.vpl-radio-option input[type="radio"]:hover:not(:checked) {
    border-color: #9ca3af;
    background: #f9fafb;
}

.vpl-radio-option label {
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
}

/* Security Verification Section */
.vpl-security-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2f4f4f;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-sizing: border-box;
    width: 100%;
}

.vpl-security-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.vpl-security-description {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Google reCAPTCHA container */
.vpl-recaptcha-container {
    display: flex;
    justify-content: flex-start;
    margin: 1rem 0;
}

.vpl-recaptcha-help {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Legacy captcha (fallback) */
.vpl-captcha-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.vpl-captcha-question {
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
    min-width: 80px;
}

.vpl-captcha-input {
    max-width: 100px;
    margin: 0;
}

.vpl-captcha-refresh {
    background: #2f4f4f;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vpl-captcha-refresh:hover {
    background: #2563eb;
    transform: rotate(180deg);
}

/* Submit Button */
.vpl-submit-btn {
    width: 100%;
    background: #2f4f4f;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 56px;
    letter-spacing: 0.025em;
    margin-top: 1rem;
}

.vpl-submit-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.vpl-submit-btn:active {
    transform: translateY(0);
}

.vpl-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading spinner styles */
.vpl-loading-spinner {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.vpl-loading-spinner .vpl-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: vpl-spin 1s linear infinite;
}

@keyframes vpl-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results and Error Display */
.vpl-results {
    display: none;
    margin: 1rem 0 2rem 0;
    padding: 0;
    background: transparent;
    border: none;
}

.vpl-error {
    display: none;
    margin: 1rem 0 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #dc2626;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    z-index: 10;
}

.vpl-error.vpl-error {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.vpl-error-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.vpl-search-input-wrapper {
    display: flex;
    background: white;
    border: 2px solid var(--vpl-gray-200);
    border-radius: var(--vpl-border-radius-sm);
    overflow: hidden;
    box-shadow: var(--vpl-shadow);
    transition: var(--vpl-transition);
}

.vpl-search-input-wrapper:focus-within {
    border-color: var(--vpl-primary-color);
    box-shadow: 0 0 0 3px var(--vpl-primary-light), var(--vpl-shadow-lg);
    transform: translateY(-2px);
}

.vpl-search-input {
    flex: 1;
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    border-radius: 4px;
    background: transparent;
    color: var(--vpl-gray-800);
}

.vpl-search-input:focus {
    outline: none;
}

.vpl-search-input::placeholder {
    color: var(--vpl-gray-400);
    font-style: normal;
}

.vpl-search-btn {
    background: linear-gradient(135deg, var(--vpl-primary-color) 0%, var(--vpl-primary-hover) 100%);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--vpl-transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.vpl-search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.vpl-search-btn:hover::before {
    left: 100%;
}

.vpl-search-btn:hover {
    background: linear-gradient(135deg, var(--vpl-primary-hover) 0%, #1f2329 100%);
}

.vpl-search-btn:disabled {
    background: var(--vpl-gray-300);
    cursor: not-allowed;
    opacity: 0.7;
}

.vpl-search-icon {
    font-size: 1.125rem;
}

/* Legacy form group support (for backward compatibility) */
.vpl-form-group {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.vpl-form-group label,
.vpl-input-label {
    font-weight: 600;
    color: var(--vpl-gray-700);
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    display: block;
    margin-bottom: 0.5rem;
}

/* Modern input styling */
.vpl-input {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #374151 !important;
    background-color: #ffffff !important;
    transition: all 0.15s ease-in-out !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    min-height: 44px !important;
    margin: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.vpl-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.05);
    background-color: #ffffff;
}

.vpl-input:hover:not(:focus) {
    border-color: #9ca3af;
}

.vpl-input::placeholder {
    color: #9ca3af;
    font-style: normal;
}

/* Ensure verify input is always visible */
#vpl-verify-input {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 44px !important;
}

/* Removed duplicate styles to prevent conflicts */

/* Submit button */
.vpl-submit-btn {
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--vpl-border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--vpl-transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--vpl-shadow);
    letter-spacing: 0.025em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
}

.vpl-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.vpl-submit-btn:hover::before {
    left: 100%;
}

.vpl-submit-btn:hover {
    background: linear-gradient(135deg, var(--vpl-primary-hover) 0%, #1f2329 100%);
    transform: translateY(-2px);
    box-shadow: var(--vpl-shadow-lg);
}

.vpl-submit-btn:active {
    transform: translateY(-1px);
    box-shadow: var(--vpl-shadow);
}

.vpl-submit-btn:disabled {
    background: var(--vpl-gray-300);
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--vpl-shadow-sm);
    opacity: 0.7;
}

.vpl-submit-btn:disabled::before {
    display: none;
}

/* Loading spinner */
.vpl-loading-spinner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.vpl-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: vpl-spin 1s linear infinite;
    flex-shrink: 0;
}

/* Scoped keyframes to prevent global conflicts */
.vpl-lookup-container .vpl-spinner {
    animation: vpl-spin 1s linear infinite;
}

@keyframes vpl-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading dots animation - scoped */
.vpl-lookup-container .vpl-loading-spinner::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    animation: vpl-loading-dots 1.4s infinite ease-in-out both;
    margin-left: 0.5rem;
}

@keyframes vpl-loading-dots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Results container */
.vpl-results {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--vpl-success-light);
    border: 1px solid var(--vpl-success-color);
    border-radius: var(--vpl-border-radius-sm);
    animation: vpl-fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.vpl-results.success {
    background: var(--vpl-success-light);
    border: 1px solid var(--vpl-success-color);
    color: inherit;
}

.vpl-results h4 {
    color: var(--vpl-success-color);
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.vpl-result-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--vpl-gray-200);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.vpl-result-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--vpl-primary-color);
}

.vpl-result-status {
    display: inline-block;
    background: var(--vpl-success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.vpl-voter-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vpl-gray-800);
    margin: 0;
}

.vpl-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vpl-result-field {
    background: var(--vpl-gray-50);
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--vpl-primary-color);
}

.vpl-result-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--vpl-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.vpl-result-value {
    font-size: 1rem;
    color: var(--vpl-gray-800);
    font-weight: 600;
}

.vpl-polling-center-highlight {
    background: linear-gradient(135deg, var(--vpl-primary-color), var(--vpl-primary-dark));
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
}

.vpl-polling-center-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.vpl-polling-center-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.vpl-vrc-number {
    background: var(--vpl-gray-100);
    padding: 0.75rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.1em;
    color: var(--vpl-primary-color);
    border: 2px dashed var(--vpl-primary-color);
}

/* Scoped animations to prevent conflicts */
.vpl-lookup-container .vpl-results {
    animation: vpl-fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.vpl-lookup-container .vpl-polling-center {
    animation: vpl-slideInRight 0.5s ease-out;
}

.vpl-lookup-container .vpl-voter-info {
    animation: vpl-slideInRight 0.6s ease-out 0.2s both;
}

@keyframes vpl-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes vpl-slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Registration centre info */
.vpl-polling-center {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 2rem;
    border-radius: var(--vpl-border-radius);
    border: 1px solid var(--vpl-gray-200);
    margin-bottom: 1.5rem;
    box-shadow: var(--vpl-shadow-lg);
    position: relative;
    overflow: hidden;
    animation: vpl-slideInRight 0.5s ease-out;
}

.vpl-polling-center::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--vpl-primary-color) 0%, var(--vpl-success-color) 100%);
}

.vpl-polling-center::after {
    content: '📍';
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    opacity: 0.3;
}

.vpl-center-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vpl-gray-800);
    margin-bottom: 1rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vpl-center-name::before {
    content: '🏛️';
    font-size: 1.25rem;
}

.vpl-center-code {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--vpl-primary-color) 0%, var(--vpl-primary-hover) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: var(--vpl-shadow);
    letter-spacing: 0.025em;
}

.vpl-center-code::before {
    content: '#';
    margin-right: 0.25rem;
    opacity: 0.8;
}

.vpl-center-details {
    display: grid;
    gap: 1rem;
}

.vpl-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--vpl-border-radius-sm);
    border: 1px solid var(--vpl-gray-100);
    transition: var(--vpl-transition);
}

.vpl-detail-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--vpl-gray-200);
    transform: translateX(4px);
}

.vpl-detail-label {
    font-weight: 600;
    color: var(--vpl-gray-600);
    min-width: 120px;
    flex-shrink: 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vpl-detail-value {
    color: var(--vpl-gray-800);
    flex: 1;
    line-height: 1.5;
}

.vpl-detail-value a {
    color: var(--vpl-primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--vpl-transition);
}

.vpl-detail-value a:hover {
    color: var(--vpl-primary-hover);
    text-decoration: underline;
}

/* Voter info */
.vpl-voter-info {
    background: linear-gradient(135deg, var(--vpl-success-light) 0%, #ecfdf5 100%);
    padding: 1.5rem;
    border-radius: var(--vpl-border-radius);
    border: 1px solid #a7f3d0;
    position: relative;
    overflow: hidden;
    animation: vpl-slideInRight 0.6s ease-out 0.2s both;
}

.vpl-voter-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--vpl-success-color) 0%, #059669 100%);
}

.vpl-voter-info::after {
    content: '👤';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.25rem;
    opacity: 0.4;
}

.vpl-voter-info h4 {
    margin: 0 0 1rem 0;
    color: var(--vpl-success-color);
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vpl-voter-info h4::before {
    content: '✓';
    background: var(--vpl-success-color);
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
}

/* Error messages */
.vpl-error {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--vpl-error-light) 0%, #fef2f2 100%);
    border: 1px solid #fca5a5;
    border-radius: var(--vpl-border-radius);
    color: var(--vpl-error-color);
    animation: vpl-fadeInUp 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.vpl-error::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 6px;
    background: var(--vpl-error-color);
}

.vpl-error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--vpl-error-color);
    color: white;
    border-radius: 50%;
    margin-right: 0.75rem;
    font-weight: bold;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .vpl-lookup-container {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: var(--vpl-border-radius-sm);
    }

    .vpl-form-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .vpl-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .vpl-form-group.vpl-half {
        margin-bottom: 1.5rem;
    }

    .vpl-section {
        padding: 1rem;
    }

    .vpl-result-grid {
        grid-template-columns: 1fr;
    }

    .vpl-captcha-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .vpl-captcha-input {
        max-width: 100%;
    }

    .vpl-radio-group {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .vpl-search-input-wrapper {
        flex-direction: column;
    }

    .vpl-search-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 1.25rem 1.5rem;
    }

    .vpl-search-btn {
        padding: 1.25rem 2rem;
        font-size: 1rem;
        justify-content: center;
    }

    .vpl-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 1rem 1.25rem;
        border-radius: var(--vpl-border-radius-sm);
    }

    .vpl-submit-btn {
        padding: 1.25rem 2rem;
        font-size: 1rem;
        min-height: 3.5rem;
    }

    .vpl-center-details {
        gap: 0.75rem;
    }

    .vpl-detail-item {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .vpl-detail-item:hover {
        transform: none;
    }

    .vpl-detail-label {
        min-width: auto;
        font-size: 0.875rem;
        font-weight: 700;
    }

    .vpl-polling-center {
        padding: 1.5rem;
    }

    .vpl-voter-info {
        padding: 1.25rem;
    }

    .vpl-error {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .vpl-lookup-container {
        margin: 0.5rem;
        padding: 1.25rem;
    }

    .vpl-form {
        gap: 1.25rem;
    }

    .vpl-form-group {
        gap: 0.5rem;
    }

    .vpl-form-title {
        font-size: 1.5rem;
    }

    .vpl-search-card {
        padding: 0.75rem;
    }

    .vpl-search-type-label {
        font-size: 0.625rem;
    }

    .vpl-radio-group {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .vpl-radio-option label {
        font-size: 0.875rem;
    }

    .vpl-search-input {
        padding: 1rem 1.25rem;
    }

    .vpl-search-btn {
        padding: 1rem 1.5rem;
        font-size: 0.875rem;
    }

    .vpl-center-name {
        font-size: 1.25rem;
    }

    .vpl-polling-center {
        padding: 1.25rem;
    }

    .vpl-polling-center::after {
        top: 1rem;
        right: 1rem;
        font-size: 1.25rem;
    }

    .vpl-voter-info::after {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 1rem;
    }

    .vpl-detail-item {
        padding: 0.75rem;
    }

    .vpl-submit-btn {
        padding: 1rem 1.5rem;
        min-height: 3rem;
    }
}

/* High contrast mode support - scoped to plugin only */
@media (prefers-contrast: high) {
    .vpl-lookup-container {
        --vpl-primary-color: #000000;
        --vpl-primary-hover: #333333;
        --vpl-success-color: #008000;
        --vpl-error-color: #ff0000;
        --vpl-gray-800: #000000;
        --vpl-gray-600: #333333;
    }

    .vpl-input {
        border-width: 3px;
        border-color: #000000;
    }

    .vpl-input:focus {
        border-color: #000000;
        box-shadow: 0 0 0 3px #ffff00;
    }

    .vpl-submit-btn {
        border: 3px solid #000000;
        background: #000000;
    }

    .vpl-submit-btn:hover {
        background: #333333;
    }

    .vpl-polling-center,
    .vpl-voter-info,
    .vpl-error {
        border-width: 2px;
        border-color: #000000;
    }
}

/* Reduced motion support - scoped to plugin only */
@media (prefers-reduced-motion: reduce) {
    .vpl-lookup-container * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .vpl-input,
    .vpl-submit-btn,
    .vpl-results,
    .vpl-error,
    .vpl-detail-item {
        transition: none;
        animation: none;
    }

    .vpl-spinner {
        animation: none;
        border: 2px solid white;
        border-top: 2px solid rgba(255, 255, 255, 0.3);
    }

    .vpl-submit-btn:hover {
        transform: none;
    }

    .vpl-detail-item:hover {
        transform: none;
    }
}

/* Focus indicators for accessibility */
.vpl-input:focus-visible,
.vpl-submit-btn:focus-visible {
    outline: 3px solid var(--vpl-warning-color);
    outline-offset: 2px;
}

/* Skip link for screen readers */
.vpl-skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--vpl-gray-800);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.vpl-skip-link:focus {
    top: 6px;
}

/* Screen reader only content */
.vpl-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Icon enhancements */
.vpl-detail-label[data-icon]::before {
    content: attr(data-icon);
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* Success state animations - scoped */
.vpl-lookup-container .vpl-success-pulse {
    animation: vpl-pulse-success 2s infinite;
}

@keyframes vpl-pulse-success {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(5, 150, 105, 0);
    }
}

/* Results Display Styles - Clean and Compact */
.vpl-results-container {
    max-width: 600px;
    margin: 16px auto;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.vpl-verification-header {
    text-align: center;
    padding: 24px 20px;
    background: #ecfdf5;
    border-bottom: 1px solid #e2e8f0;
}

.vpl-verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #10b981;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vpl-voter-name {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.vpl-info-cards {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
}

@media (min-width: 768px) {
    .vpl-info-cards {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .vpl-vrc-card,
    .vpl-polling-card {
        grid-column: 1 / -1;
    }
}

.vpl-info-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease-in-out;
}

.vpl-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.vpl-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #4f46e5;
    color: white;
}

.vpl-card-icon {
    font-size: 18px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.vpl-card-title {
    color:white;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vpl-card-content {
    width: 100%;
    padding: 16px;
}

.vpl-info-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}

.vpl-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.vpl-info-item:first-child {
    padding-top: 0;
}

.vpl-info-label {
    font-weight: 600;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.vpl-info-value {
    font-weight: 700;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.vpl-vrc-card .vpl-card-header {
    background: #2f4f4f;
}

.vpl-vrc-number {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    padding: 16px 20px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    letter-spacing: 1px;
    word-break: break-all;
    line-height: 1.4;
    margin: 0;
}

.vpl-polling-card .vpl-card-header {
    background: #10b981;
    width: 100%;
}

.vpl-polling-center {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    padding: 16px 20px;
    background: #ecfdf5;
    border-radius: 6px;
    border: 2px solid #10b981;
    line-height: 1.4;
    margin: 0;
}

.vpl-back-button-container {
    margin-bottom: 24px;
    text-align: center;
    padding: 0 16px;
}

.vpl-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    min-height: 48px;
}

.vpl-back-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.vpl-back-icon {
    font-size: 18px;
    font-weight: bold;
}

/* Print styles */
@media print {
    .vpl-lookup-container {
        box-shadow: none;
        border: 2px solid #000;
        background: white;
        margin: 0;
        padding: 1rem;
    }

    .vpl-form {
        display: none;
    }

    .vpl-results {
        background: white !important;
        border: 1px solid #000;
        box-shadow: none;
    }

    .vpl-submit-btn {
        display: none;
    }

    .vpl-back-btn {
        display: none;
    }
}

/* Mobile responsive styles for results */
@media (max-width: 640px) {
    .vpl-results-container {
        margin: 12px;
    }

    .vpl-verification-header {
        padding: 20px 16px;
    }

    .vpl-voter-name {
        font-size: 20px;
    }

    .vpl-info-cards {
        padding: 12px;
        gap: 12px;
    }

    .vpl-card-header {
        padding: 10px 12px;
    }

    .vpl-card-content {
        padding: 12px;
    }

    .vpl-info-item {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 10px 0;
    }

    .vpl-info-label {
        white-space: normal;
        font-size: 11px;
    }

    .vpl-info-value {
        font-size: 13px;
    }

    .vpl-vrc-number {
        font-size: 16px;
        padding: 12px 16px;
        letter-spacing: 1px;
    }

    .vpl-polling-center {
        font-size: 14px;
        padding: 12px 16px;
    }

    .vpl-back-button-container {
        margin-bottom: 16px;
    }
}

/* Animation for results display */
@keyframes vpl-slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vpl-results-active {
    animation: vpl-slideIn 0.4s ease-out;
}
