/**
 * WhatsApp Validator - Additional Styles
 */

/* Screen reader only class */
.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;
}

/* WhatsApp Validator specific styles */
.wa-validator-form {
    transition: all 0.3s ease;
}

.wa-validator-form:focus-within {
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

/* Phone input with country prefix */
.phone-input-container {
    position: relative;
}

.phone-input-container input {
    padding-left: 3rem;
}

.country-prefix {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-weight: 500;
    pointer-events: none;
}

/* Results animations */
.results-fade-in {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.status-badge.valid {
    background-color: #dcfce7;
    color: #166534;
}

.status-badge.invalid {
    background-color: #fef2f2;
    color: #dc2626;
}

.status-badge.unverified {
    background-color: #f3f4f6;
    color: #374151;
}

.status-badge.error {
    background-color: #fef3c7;
    color: #92400e;
}

/* Copy button hover effect */
.copy-button {
    transition: all 0.2s ease;
}

.copy-button:hover {
    background-color: #f3f4f6;
    transform: scale(1.05);
}

/* WhatsApp button pulse effect */
.whatsapp-button {
    position: relative;
    overflow: hidden;
}

.whatsapp-button::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;
}

.whatsapp-button:hover::before {
    left: 100%;
}

/* Advanced options toggle */
.advanced-toggle {
    transition: all 0.3s ease;
}

.advanced-toggle:hover {
    background-color: #f9fafb;
}

.advanced-toggle i {
    transition: transform 0.3s ease;
}

/* Loading spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Toast notifications */
.toast-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.success {
    background-color: #10b981;
    color: white;
}

.toast-notification.error {
    background-color: #ef4444;
    color: white;
}

.toast-notification.info {
    background-color: #3b82f6;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .phone-input-container input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-buttons {
        flex-direction: column;
    }
    
    .actions-buttons button,
    .actions-buttons a {
        width: 100%;
    }
}

/* Focus styles for accessibility */
.wa-validator-form button:focus,
.wa-validator-form input:focus,
.wa-validator-form select:focus {
    outline: 2px solid #25d366;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .status-badge {
        border: 2px solid currentColor;
    }
    
    .phone-input-container input {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wa-validator-form,
    .advanced-toggle,
    .copy-button,
    .whatsapp-button,
    .toast-notification {
        transition: none;
    }
    
    .spinner {
        animation: none;
    }
    
    .results-fade-in {
        animation: none;
    }
}
