/**
 * QR Tools Lab - Private QR Workshop Theme
 * A clean, trust-focused privacy-first QR workshop aesthetic
 */

:root {
    /* Background Colors */
    --qr-bg-deep: #07111f;
    --qr-bg-surface: #0b1324;
    --qr-bg-card: rgba(15, 23, 42, 0.7);
    --qr-bg-card-hover: rgba(20, 32, 52, 0.8);
    
    /* Accent Colors */
    --qr-cyan: #22d3ee;
    --qr-cyan-dim: #0891b2;
    --qr-emerald: #34d399;
    --qr-emerald-dim: #059669;
    --qr-blue: #60a5fa;
    --qr-amber: #fbbf24;
    --qr-red: #f87171;
    
    /* Text Colors */
    --qr-text-primary: #f1f5f9;
    --qr-text-secondary: #94a3b8;
    --qr-text-muted: #64748b;
    
    /* Border Colors */
    --qr-border: rgba(51, 65, 85, 0.5);
    --qr-border-hover: rgba(100, 116, 139, 0.6);
    
    /* Shadows */
    --qr-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --qr-glow-cyan: 0 0 20px rgba(34, 211, 238, 0.15);
}

/* Base Shell */
.qr-shell {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--qr-bg-deep) 0%, var(--qr-bg-surface) 100%);
    color: var(--qr-text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Hero Section */
.qr-hero {
    padding: 3rem 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(7, 17, 31, 0.8) 0%, transparent 100%);
    border-bottom: 1px solid var(--qr-border);
}

.qr-hero-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--qr-text-primary) 0%, var(--qr-cyan) 50%, var(--qr-emerald) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.qr-hero-subtitle {
    color: var(--qr-text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.qr-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--qr-cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Grid Layout */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tool Card */
.qr-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--qr-bg-card);
    border: 1px solid var(--qr-border);
    border-radius: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.qr-card:hover {
    background: var(--qr-bg-card-hover);
    border-color: var(--qr-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--qr-shadow);
}

.qr-card-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    color: var(--qr-cyan);
}

.qr-card-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--qr-text-primary);
    margin-bottom: 0.5rem;
}

.qr-card-desc {
    font-size: 0.875rem;
    color: var(--qr-text-secondary);
    line-height: 1.6;
    flex-grow: 1;
}

/* Generator Panel */
.qr-panel {
    background: var(--qr-bg-card);
    border: 1px solid var(--qr-border);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.qr-panel-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--qr-text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--qr-border);
}

.qr-input-group {
    margin-bottom: 1.25rem;
}

.qr-input-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--qr-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.qr-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(7, 17, 31, 0.6);
    border: 1px solid var(--qr-border);
    border-radius: 0.5rem;
    color: var(--qr-text-primary);
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qr-input:focus {
    outline: none;
    border-color: var(--qr-cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.qr-input::placeholder {
    color: var(--qr-text-muted);
}

.qr-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.qr-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Preview Panel */
.qr-preview {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 1px solid var(--qr-border);
}

.qr-preview-empty {
    color: #94a3b8;
    font-size: 0.875rem;
    text-align: center;
}

/* Result Actions */
.qr-result {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--qr-border);
}

/* Buttons */
.qr-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.qr-button-primary {
    background: linear-gradient(135deg, var(--qr-cyan) 0%, var(--qr-emerald) 100%);
    color: #07111f;
}

.qr-button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.3);
}

.qr-button-secondary {
    background: transparent;
    color: var(--qr-cyan);
    border: 1px solid var(--qr-cyan);
}

.qr-button-secondary:hover {
    background: rgba(34, 211, 238, 0.1);
}

.qr-button-danger {
    background: transparent;
    color: var(--qr-red);
    border: 1px solid var(--qr-red);
}

.qr-button-danger:hover {
    background: rgba(248, 113, 113, 0.1);
}

/* Warning & Notes */
.qr-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.qr-warning-icon {
    color: var(--qr-amber);
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
}

.qr-warning-text {
    font-size: 0.875rem;
    color: #fcd34d;
    line-height: 1.5;
}

.qr-safe-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.qr-safe-note-icon {
    color: var(--qr-emerald);
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
}

.qr-safe-note-text {
    font-size: 0.875rem;
    color: var(--qr-emerald);
    line-height: 1.5;
}

/* Privacy Receipt */
.privacy-receipt {
    background: rgba(7, 17, 31, 0.5);
    border: 1px solid var(--qr-border);
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 0.75rem;
    color: var(--qr-text-muted);
    margin-top: 1.5rem;
}

.privacy-receipt-title {
    font-weight: 600;
    color: var(--qr-text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.privacy-receipt-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px dashed rgba(100, 116, 139, 0.2);
}

.privacy-receipt-item:last-child {
    border-bottom: none;
}

.privacy-receipt-label {
    color: var(--qr-text-muted);
}

.privacy-receipt-value {
    color: var(--qr-text-secondary);
    font-weight: 500;
}

/* Print Sheet */
.print-sheet {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
}

.print-sheet-grid {
    display: grid;
    gap: 1rem;
}

.print-sheet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px dashed #e2e8f0;
    border-radius: 0.5rem;
}

.print-sheet-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    word-break: break-word;
}

/* QR Chip */
.qr-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--qr-cyan);
    text-transform: uppercase;
}

.qr-chip-new {
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.2);
    color: var(--qr-emerald);
}

.qr-chip-beta {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
    color: var(--qr-amber);
}

/* Security Preview Card */
.security-preview {
    background: rgba(7, 17, 31, 0.6);
    border: 1px solid var(--qr-border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.security-preview-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--qr-border);
}

.security-preview-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--qr-text-primary);
}

.security-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

.security-preview-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--qr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.security-preview-value {
    font-size: 0.875rem;
    color: var(--qr-text-secondary);
    word-break: break-all;
    text-align: right;
    max-width: 60%;
}

.security-preview-risk {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: var(--qr-red);
}

.security-preview-safe {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: var(--qr-emerald);
}

/* Two Column Layout */
.qr-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .qr-layout {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .qr-layout {
        grid-template-columns: 1fr 1.2fr;
    }
}

/* Navigation */
.qr-nav {
    background: rgba(7, 17, 31, 0.9);
    border-bottom: 1px solid var(--qr-border);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.qr-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qr-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--qr-text-primary);
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 600;
}

.qr-nav-brand-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--qr-cyan) 0%, var(--qr-emerald) 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-nav-links {
    display: none;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .qr-nav-links {
        display: flex;
    }
}

.qr-nav-link {
    color: var(--qr-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.qr-nav-link:hover,
.qr-nav-link.active {
    color: var(--qr-cyan);
}

/* Footer */
.qr-footer {
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--qr-border);
    text-align: center;
    color: var(--qr-text-muted);
    font-size: 0.8125rem;
}

.qr-footer a {
    color: var(--qr-cyan);
    text-decoration: none;
}

.qr-footer a:hover {
    text-decoration: underline;
}

/* Utility Classes */
.qr-mt-1 { margin-top: 0.25rem; }
.qr-mt-2 { margin-top: 0.5rem; }
.qr-mt-3 { margin-top: 0.75rem; }
.qr-mt-4 { margin-top: 1rem; }
.qr-mb-2 { margin-bottom: 0.5rem; }
.qr-mb-4 { margin-bottom: 1rem; }
.qr-flex { display: flex; }
.qr-items-center { align-items: center; }
.qr-gap-2 { gap: 0.5rem; }
.qr-gap-3 { gap: 0.75rem; }

/* Color Picker Row */
.qr-color-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.qr-color-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qr-color-input input[type="color"] {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--qr-border);
    border-radius: 0.375rem;
    cursor: pointer;
    background: transparent;
}

.qr-color-input input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.qr-color-input input[type="color"]::-webkit-color-swatch {
    border-radius: 0.25rem;
    border: none;
}

.qr-color-input input[type="text"] {
    width: 100px;
}

/* Inline Checkbox */
.qr-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qr-checkbox-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--qr-cyan);
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .qr-nav,
    .qr-footer,
    .no-print {
        display: none !important;
    }
    
    .print-sheet {
        padding: 0;
        background: white;
    }
    
    .print-sheet-grid {
        gap: 0.5in;
    }
    
    .print-sheet-item {
        border: 1px dashed #ccc;
    }
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .qr-hero-title {
        font-size: 1.75rem;
    }
    
    .qr-hero-subtitle {
        font-size: 1rem;
    }
    
    .qr-panel {
        padding: 1rem;
    }
    
    .qr-result {
        flex-direction: column;
    }
    
    .qr-button {
        width: 100%;
    }
}

/* ── Tailwind-compatible utility classes ─────────────────── */
/* These replace the Tailwind CDN utilities used in SVG icons and layout helpers. */

/* Sizing */
.w-3  { width: 0.75rem; }
.w-4  { width: 1rem; }
.w-5  { width: 1.25rem; }
.w-12 { width: 3rem; }
.h-3  { height: 0.75rem; }
.h-4  { height: 1rem; }
.h-5  { height: 1.25rem; }
.h-12 { height: 3rem; }

/* Spacing */
.mb-3   { margin-bottom: 0.75rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Text colors (used in SVGs & badges) */
.text-zinc-900    { color: #18181b; }
.text-emerald-400 { color: #34d399; }

/* Animation */
@keyframes qr-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-animate-in {
    animation: qr-fade-in 0.3s ease-out;
}