/* Modern Form Container */
.name-lookup-form-container {
    max-width: 480px;
    margin: 40px auto;
    padding: 40px;
    background: linear-gradient(135deg, var(--gradient-start, #667eea) 0%, var(--gradient-end, #764ba2) 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Glass morphism effect */
.name-lookup-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    z-index: 1;
}

/* Form content wrapper */
.name-lookup-form-container > * {
    position: relative;
    z-index: 2;
}

/* Title Styling */
.name-lookup-form-title {
    margin: 0 0 32px 0;
    text-align: center;
    font-weight: 700;
    font-size: 28px;
    color: var(--title-color, #667eea);
    letter-spacing: -0.5px;
}

/* Form Layout */
.name-lookup-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Field Container */
.name-lookup-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Label Styling */
.name-lookup-form-field label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* Input Styling */
.name-lookup-form-field input[type="text"] {
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #1f2937;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.name-lookup-form-field input[type="text"]:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.name-lookup-form-field input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

/* Submit Button Container */
.name-lookup-form-submit {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

/* Submit Button Styling */
.name-lookup-submit-btn {
    padding: 16px 40px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 160px;
    position: relative;
    overflow: hidden;
    background: var(--button-color, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    color: var(--button-text-color, white);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.name-lookup-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;
}

.name-lookup-submit-btn:hover::before {
    left: 100%;
}

.name-lookup-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.name-lookup-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.name-lookup-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Display */
.name-lookup-result {
    margin-top: 24px;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.name-lookup-result .result-content {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1f2937;
}

.name-lookup-result .result-content p {
    margin: 0;
}

.name-lookup-result .result-content .error {
    color: #dc2626;
}

/* Validation error styling */
.name-lookup-result .result-content .validation-error {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    padding: 16px;
    border-radius: 12px;
    margin: 15px 0;
    text-align: center;
}

.name-lookup-result .result-content .validation-error p {
    margin: 8px 0;
}

.name-lookup-result .result-content .validation-error strong {
    font-size: 16px;
    color: #dc2626;
    display: block;
    margin-bottom: 8px;
}

.name-lookup-result .result-redirect {
    font-size: 14px;
    color: #6b7280;
    margin-top: 12px;
    padding: 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.name-lookup-result .result-redirect p {
    margin: 0;
}

/* Success/Error States */
.name-lookup-result.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #059669;
}

.name-lookup-result.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

/* Did You Mean Styling */
.did-you-mean {
    margin-top: 16px;
    padding: 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    text-align: center;
}

.did-you-mean p {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #1e40af;
    font-weight: 500;
}

.did-you-mean strong {
    color: #1e3a8a;
    font-weight: 600;
}

.did-you-mean-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.did-you-mean-btn {
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.did-you-mean-yes {
    background: #f8f9fa;
    color: #495057;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.did-you-mean-yes:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.did-you-mean-no {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.did-you-mean-no:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.did-you-mean-btn:active {
    transform: translateY(0);
}

.did-you-mean-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating particles effect */
.name-lookup-form-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s linear infinite;
    z-index: 0;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(-50px, -50px) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .name-lookup-form-container {
        margin: 20px;
        padding: 32px 24px;
        border-radius: 16px;
    }
    
    .name-lookup-form-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    .name-lookup-form-field input[type="text"] {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 16px;
    }
    
    .name-lookup-submit-btn {
        width: 100%;
        padding: 16px 32px;
    }
    
    .name-lookup-result {
        padding: 20px;
        margin-top: 20px;
    }
}

/* Accessibility */
.name-lookup-form-field input[type="text"]:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.name-lookup-submit-btn:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .name-lookup-form-container {
        border: 2px solid #000;
    }
    
    .name-lookup-form-field input[type="text"] {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .name-lookup-submit-btn,
    .name-lookup-form-field input[type="text"],
    .name-lookup-result {
        transition: none;
        animation: none;
    }
    
    .spinner {
        animation: none;
    }
    
    .name-lookup-form-container::after {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .name-lookup-form-container {
        background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    }
    
    .name-lookup-form-container::before {
        background: rgba(17, 24, 39, 0.95);
    }
    
    .name-lookup-form-field label {
        color: #d1d5db;
    }
    
    .name-lookup-form-field input[type="text"] {
        background: rgba(31, 41, 55, 0.9);
        color: #f9fafb;
        border-color: #4b5563;
    }
    
    .name-lookup-form-field input[type="text"]:focus {
        background: rgba(31, 41, 55, 1);
    }
    
    .name-lookup-result {
        background: rgba(31, 41, 55, 0.95);
        color: #f9fafb;
    }
    
    .name-lookup-result .result-content {
        color: #f9fafb;
    }
}

/* Refresh Button Styling - Modern React-like Design */
.name-lookup-refresh-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.name-lookup-refresh-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.name-lookup-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #a1a1aa;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.name-lookup-refresh-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.name-lookup-refresh-btn:hover::before {
    left: 100%;
}

.name-lookup-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: #d4d4d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.name-lookup-refresh-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.name-lookup-refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.8;
    }
}

.name-lookup-refresh-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.name-lookup-refresh-btn:hover svg {
    transform: rotate(180deg);
}

.name-lookup-refresh-btn:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Light mode refresh button */
@media (prefers-color-scheme: light) {
    .name-lookup-refresh-container {
        border-top-color: rgba(0, 0, 0, 0.08);
    }
    
    .name-lookup-refresh-container::before {
        background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    }
    
    .name-lookup-refresh-btn {
        background: rgba(0, 0, 0, 0.04);
        border-color: rgba(0, 0, 0, 0.08);
        color: #71717a;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    
    .name-lookup-refresh-btn:hover {
        background: rgba(0, 0, 0, 0.06);
        border-color: rgba(0, 0, 0, 0.12);
        color: #52525b;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .name-lookup-refresh-btn::before {
        background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
    }
} 