/* Custom & Tailwind-Equivalent Styles for TLSA/DANE Checker & Generator (Self-hosted & CSP-Strict) */

*, ::before, ::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #1e293b;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #f1f5f9;
    background-color: #020617;
}

::selection {
    background-color: #6366f1;
    color: #ffffff;
}

/* Custom scrollbar for records and certificate chain containers */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.6);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: rgba(51, 65, 85, 0.8);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.8);
}

/* Form controls & reset */
input, select, button, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}
table {
    border-collapse: collapse;
}

/* Display & Layout */
.block { display: block; }
.hidden { display: none !important; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.flex-col { flex-direction: column; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.bottom-full { bottom: 100%; }
.left-0 { left: 0; }
.left-1\/2 { left: 50%; }
.inset-y-0 { top: 0; bottom: 0; }
.-translate-x-1\/2 { transform: translateX(-50%); }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

/* Grid & Gaps */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Child spacing */
.space-x-1 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.25rem; }
.space-x-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.375rem; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 2rem; }
.divide-y > :not([hidden]) ~ :not([hidden]) { border-top-width: 1px; border-top-style: solid; }
.divide-slate-800\/60 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(30, 41, 59, 0.6); }

/* Sizing */
.w-2 { width: 0.5rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-48 { width: 12rem; }
.w-full { width: 100%; }
.h-2 { height: 0.5rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-full { height: 100%; }
.max-w-7xl { max-width: 80rem; }
.max-w-xs { max-width: 20rem; }
.max-w-\[200px\] { max-width: 200px; }
.max-h-60 { max-height: 15rem; }

/* Margins & Paddings */
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-auto { margin-top: auto; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-4 { margin-right: 1rem; }
.ml-1\.5 { margin-left: 0.375rem; }
.ml-auto { margin-left: auto; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pl-3\.5 { padding-left: 0.875rem; }
.pl-10 { padding-left: 2.5rem; }
.pr-1 { padding-right: 0.25rem; }
.pr-4 { padding-right: 1rem; }
.pt-2 { padding-top: 0.5rem; }

/* Typography */
.text-\[10px\] { font-size: 10px; line-height: 14px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-all { word-break: break-all; }
.no-underline { text-decoration: none; }
.select-all { user-select: all; -webkit-user-select: all; }

/* Colors */
.text-white { color: #ffffff; }
.text-slate-100 { color: #f1f5f9; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-indigo-300 { color: #a5b4fc; }
.text-indigo-400 { color: #818cf8; }
.text-emerald-400 { color: #34d399; }
.text-rose-200 { color: #fecdd3; }
.text-rose-400 { color: #fb7185; }
.text-rose-500 { color: #f43f5e; }
.text-amber-400 { color: #fbbf24; }
.text-amber-400\/90 { color: rgba(251, 191, 36, 0.9); }
.text-rose-300\/80 { color: rgba(253, 164, 175, 0.8); }
.text-rose-400\/80 { color: rgba(251, 113, 133, 0.8); }
.placeholder-slate-600::placeholder { color: #475569; }

/* Backgrounds */
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-900\/40 { background-color: rgba(15, 23, 42, 0.4); }
.bg-slate-900\/60 { background-color: rgba(15, 23, 42, 0.6); }
.bg-slate-900\/90 { background-color: rgba(15, 23, 42, 0.9); }
.bg-slate-950 { background-color: #020617; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-indigo-600\/20 { background-color: rgba(79, 70, 229, 0.2); }
.bg-indigo-500\/10 { background-color: rgba(99, 102, 241, 0.1); }
.bg-emerald-400 { background-color: #34d399; }
.bg-emerald-500\/10 { background-color: rgba(16, 185, 129, 0.1); }
.bg-emerald-950\/20 { background-color: rgba(6, 78, 59, 0.2); }
.bg-rose-500\/10 { background-color: rgba(244, 63, 94, 0.1); }
.bg-rose-950\/20 { background-color: rgba(76, 5, 25, 0.2); }
.bg-rose-950\/40 { background-color: rgba(76, 5, 25, 0.4); }
.bg-gradient-to-br { background-image: linear-gradient(135deg, #020617 0%, #0f172a 50%, rgba(30, 27, 75, 0.25) 100%); }

/* Borders */
.border { border-width: 1px; border-style: solid; border-color: #1e293b; }
.border-2 { border-width: 2px; border-style: solid; }
.border-4 { border-width: 4px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-slate-800 { border-color: #1e293b; }
.border-slate-800\/50 { border-color: rgba(30, 41, 59, 0.5); }
.border-slate-800\/80 { border-color: rgba(30, 41, 59, 0.8); }
.border-slate-900 { border-color: #0f172a; }
.border-indigo-500\/20 { border-color: rgba(99, 102, 241, 0.2); }
.border-t-indigo-500 { border-top-color: #6366f1; }
.border-emerald-500\/20 { border-color: rgba(16, 185, 129, 0.2); }
.border-emerald-900\/50 { border-color: rgba(6, 78, 59, 0.5); }
.border-rose-500\/20 { border-color: rgba(244, 63, 94, 0.2); }
.border-rose-900\/50 { border-color: rgba(76, 5, 25, 0.5); }
.border-white\/20 { border-color: rgba(255, 255, 255, 0.2); }
.border-t-white { border-top-color: #ffffff; }

/* Radius */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Shadows, Rings & Effects */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.shadow-indigo-500\/30 { box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3), 0 4px 6px -4px rgba(99, 102, 241, 0.3); }
.shadow-indigo-600\/30 { box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3), 0 4px 6px -4px rgba(79, 70, 229, 0.3); }
.ring-2 { box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); }
.ring-indigo-500\/20 { box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2); }
.backdrop-blur { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.transition { transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1); }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.pointer-events-none { pointer-events: none; }
.copy-btn {
    cursor: pointer;
}
.from-slate-950, .via-slate-900, .to-indigo-950\/25 {}
.selection\:bg-indigo-500, .selection\:text-white {}

/* Hover, Focus, Active */
.active\:scale-95:active { transform: scale(0.95); }
.hover\:bg-indigo-500:hover { background-color: #6366f1; }
.hover\:bg-indigo-600\/40:hover { background-color: rgba(79, 70, 229, 0.4); }
.hover\:bg-slate-700:hover { background-color: #334155; }
.hover\:text-slate-300:hover { color: #cbd5e1; }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:border-indigo-500:focus { border-color: #6366f1; }
.focus\:ring-1:focus { box-shadow: 0 0 0 1px #6366f1; }
.focus\:ring-indigo-500:focus { box-shadow: 0 0 0 1px #6366f1; }

.group { position: relative; }
.group-hover\:block { display: none; }
.group:hover .group-hover\:block { display: block; }

/* Animations */
.animate-spin {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive Breakpoints */
@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\:w-auto { width: auto; }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
    .md\:col-span-3 { grid-column: span 3 / span 3; }
    .md\:col-span-7 { grid-column: span 7 / span 7; }
}

@media (min-width: 1024px) {
    .lg\:flex-row { flex-direction: row; }
    .lg\:items-center { align-items: center; }
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* Compact desktop & Windows 125%-150% scaling (1280x600 - 1536x750) */
@media (min-width: 769px) and (max-width: 1500px), (min-width: 769px) and (max-height: 820px) {
    main {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        gap: 1rem !important;
    }
    .space-y-8 > :not([hidden]) ~ :not([hidden]) {
        margin-top: 1rem !important;
    }
    section, .rounded-2xl {
        padding: 1rem !important;
    }
}

/* Easter Egg Footer */
.easter-egg-footer-text {
    text-align: center;
    color: #94a3b8;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}
#easter-egg-heart {
    display: inline-block;
    color: #ff4b4b;
    cursor: pointer;
    transition: transform 0.2s ease;
    user-select: none;
    animation: heartbeat 2s infinite;
}
@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}
.easter-egg-spin {
    animation: spin-heart 2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
@keyframes spin-heart {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
