/* Custom Styles for IDCardGenerator */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

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

#idCard {
    /* Use outfit for the card itself */
    font-family: 'Outfit', sans-serif;
    /* Prevent text selection while interacting */
    user-select: none;
    -webkit-user-select: none;
}

/* Beautiful BG Pattern inside card */
.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 30px 30px;
}

/* 3D Container & Hover Effects */
.perspective-1000 {
    perspective: 1000px;
}
.preserve-3d {
    transform-style: preserve-3d;
}

/* Base Theme Class (Allows JS to switch colors easily via variable or class) */
.theme-modern {
    --theme-color: #2563eb;
    --theme-bg: #eff6ff;
}
.theme-corporate {
    --theme-color: #0f172a;
    --theme-bg: #f8fafc;
}
.theme-classic {
    --theme-color: #b91c1c;
    --theme-bg: #fef2f2;
}
.theme-gradient {
    /* For gradient, we use background properties specifically */
    --theme-color: #8b5cf6;
    --theme-bg: #faf5ff;
}

/* Apply CSS Variables to ID Card Elements */
#idCard .bg-theme {
    background-color: var(--theme-color);
}
#idCard.theme-gradient .bg-theme {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

#idCard .text-theme {
    color: var(--theme-color);
}
#idCard.theme-gradient .text-theme {
    color: #c026d3;
}

#idCard .border-theme {
    border-color: var(--theme-color);
}
#idCard.theme-gradient .border-theme {
    border-color: #d946ef;
}

/* Fix for JsBarcode SVG bleeding out */
#barcode {
    width: 80% !important;
    height: 100% !important;
    margin: 0 auto;
    display: block;
}

/* Fix jsPDF rendering for images */
.id-card-wrapper img {
    -webkit-user-drag: none;
}

/* Force Light Mode inside the card regardless of system/site theme */
#idCard {
    color: #111827 !important;
    background-color: #ffffff !important;
}

/* Overwrite dark mode tailwind behaviors inside card */
#idCard .bg-white { background-color: #ffffff !important; }
#idCard .text-gray-900 { color: #111827 !important; }
#idCard .text-gray-800 { color: #1f2937 !important; }
#idCard .text-gray-700 { color: #374151 !important; }
#idCard .text-gray-600 { color: #4b5563 !important; }
#idCard .text-gray-500 { color: #6b7280 !important; }
#idCard .text-gray-400 { color: #9ca3af !important; }
#idCard .border-gray-100 { border-color: #f3f4f6 !important; }
#idCard .border-gray-200 { border-color: #e5e7eb !important; }
#idCard .bg-gray-50 { background-color: #f9fafb !important; }
#idCard .bg-gray-100 { background-color: #f3f4f6 !important; }

/* Upload Zone Animations */
#photoUploadZone {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#photoUploadZone:hover {
    background-color: rgba(37, 99, 235, 0.05); /* very light primary */
}
.dark #photoUploadZone:hover {
    background-color: rgba(30, 41, 59, 1);
}

/* QrCode Image Fix */
#qrcode img {
    margin: 0 auto;
    image-rendering: pixelated;
}
