/* Custom styles for vCard Generator website */

/* Global Styles */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
}

body {
    font-family: 'Inter', sans-serif;
}

/* Scrollbar styling for textarea and inputs */
textarea::-webkit-scrollbar, 
input::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

textarea::-webkit-scrollbar-thumb, 
input::-webkit-scrollbar-thumb {
    background-color: #a0aec0;
    border-radius: 3px;
}

/* Dark mode scrollbar adjustments */
.dark textarea::-webkit-scrollbar-thumb,
.dark input::-webkit-scrollbar-thumb {
    background-color: #4a5568;
}

/* Form field focus styles */
input:focus, 
textarea:focus, 
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Button hover effects */
.btn-hover {
    transition: all 0.3s ease;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* QR Code Container */
#qrCodeContainer {
    position: relative;
    overflow: hidden;
}

#qrCodeImage {
    transition: transform 0.3s ease;
}

#qrCodeImage:hover {
    transform: scale(1.05);
}

/* Form validation styles */
input:invalid, 
textarea:invalid {
    border-color: #ef4444;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive adjustments */
@media (max-width: 640px) {
    .grid-responsive {
        grid-template-columns: 1fr;
    }
    
    .text-responsive {
        font-size: 1.25rem;
    }
}

/* Dark mode specific styles */
.dark .bg-white {
    background-color: #1f2937;
}

.dark .text-gray-900 {
    color: #f9fafb;
}

.dark .text-gray-700 {
    color: #e5e7eb;
}

.dark .text-gray-600 {
    color: #d1d5db;
}

.dark .border-gray-300 {
    border-color: #4b5563;
}

.dark .bg-gray-50 {
    background-color: #111827;
}

.dark .bg-gray-100 {
    background-color: #1f2937;
}

.dark .bg-gray-900 {
    background-color: #000000;
}

/* Custom animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

/* Utility classes */
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

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

/* Focus visible for better keyboard navigation */
.focus-visible\:ring-2:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.5);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break-before {
        page-break-before: always;
    }
}


/* QR Tools Dropdown Fix */
.qr-tools-dropdown {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 0.5rem;
    min-width: 12rem;
    background-color: white;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.qr-tools-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dark .qr-tools-dropdown {
    background-color: #374151;
}

/* Formatted vCard display */
/* .formatted-vcard {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.formatted-vcard .detail-row {
    display: flex;
    margin-bottom: 0.5rem;
}

.formatted-vcard .detail-label {
    font-weight: 600;
    min-width: 140px;
    color: #4f46e5;
}

.dark .formatted-vcard .detail-label {
    color: #818cf8;
}

.formatted-vcard .detail-value {
    flex: 1;
} */


/* Formatted vCard display improvements */
.formatted-vcard {
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
}

.formatted-vcard .detail-row {
    display: flex;
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed #e5e7eb;
}

.dark .formatted-vcard .detail-row {
    border-bottom-color: #4b5563;
}

.formatted-vcard .detail-label {
    font-weight: 600;
    min-width: 150px; /* Increased from 140px */
    color: #4f46e5;
    padding-right: 15px; /* Added padding */
}

.dark .formatted-vcard .detail-label {
    color: #818cf8;
}

.formatted-vcard .detail-value {
    flex: 1;
    word-break: break-word;
}

/* QR Code instructions styling */
.qr-instructions {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #f3f4f6;
    border-radius: 0.375rem;
    text-align: center;
    font-size: 0.875rem;
    color: #4b5563;
}

.dark .qr-instructions {
    background-color: #374151;
    color: #d1d5db;
}



/* Dark mode text color fix for information display area */
.dark #encodedInfo {
    color: #f9fafb !important;
}

.dark #encodedInfo .detail-value {
    color: #e5e7eb !important;
}

.dark #encodedInfo .detail-label {
    color: #818cf8 !important;
}

/* Ensure all text in the formatted vCard is visible in dark mode */
.dark .formatted-vcard {
    color: #f9fafb !important;
}

.dark .formatted-vcard .detail-row {
    border-bottom-color: #4b5563 !important;
}

.dark .formatted-vcard .detail-label {
    color: #818cf8 !important;
}

.dark .formatted-vcard .detail-value {
    color: #e5e7eb !important;
}

/* Fix for QR instructions in dark mode */
.dark .qr-instructions {
    background-color: #374151 !important;
    color: #f3f4f6 !important;
}