/* ============================================
   QR CODE GENERATOR - THEME-ADAPTIVE DESIGN
   ============================================ */

/* QR Type Selection - Modern Card Grid */
.qr-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.qr-type-card {
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
}

.qr-type-card:hover {
    transform: translateY(-2px);
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.qr-type-card.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.qr-type-card .icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 8px;
    opacity: 0.8;
}

.qr-type-card.active .icon {
    opacity: 1;
}

.qr-type-card .label {
    font-size: 13px;
    font-weight: 500;
    color: inherit;
}

.qr-type-card.active .label {
    color: white;
}

/* Input Forms - Clean & Spacious */
.qr-form-container {
    min-height: 50px;
    margin-bottom: 24px;
}

.qr-tab-content {
    display: none;
}

.qr-tab-content.active {
    display: block;
    animation: fadeSlideIn 0.3s ease;
}

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

/* Preview Area - Large & Prominent */
.qr-preview-container {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-bottom: 24px;
    border: 2px solid rgba(99, 102, 241, 0.2);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-preview-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    display: inline-block;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.07),
        0 10px 20px rgba(0, 0, 0, 0.1);
}

.qr-preview-box:has(canvas) {
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.12),
        0 20px 40px rgba(0, 0, 0, 0.15);
}

#qrcode-display {
    min-width: 200px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-empty-state {
    color: #94a3b8;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

.qr-empty-state::before {
    content: "📱";
    display: block;
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Download Section - Modern Buttons */
.qr-download-section {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.qr-download-btn {
    flex: 1;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qr-download-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.qr-download-btn:disabled {
    background: rgba(100, 116, 139, 0.3);
    color: rgba(148, 163, 184, 0.7);
    cursor: not-allowed;
    opacity: 0.5;
}

.qr-download-btn svg {
    width: 18px;
    height: 18px;
}

/* Sidebar - Sleek Configuration Panel */
.qr-config-sidebar {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.qr-config-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.qr-config-header svg {
    width: 20px;
    height: 20px;
    color: #6366f1;
}

.qr-config-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: inherit;
    margin: 0;
}

.qr-config-group {
    margin-bottom: 24px;
}

.qr-config-group:last-child {
    margin-bottom: 0;
}

.qr-config-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: inherit;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* Size Selector - Custom Radio Buttons */
.qr-size-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qr-size-option {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qr-size-option:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.15);
}

.qr-size-option.active {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.15);
}

.qr-size-option input[type="radio"] {
    margin-right: 10px;
    accent-color: #6366f1;
}

.qr-size-option label {
    flex: 1;
    font-size: 14px;
    color: inherit;
    cursor: pointer;
}

.qr-size-option .size-pixels {
    font-size: 12px;
    opacity: 0.6;
}

/* Color Pickers - Beautiful & Interactive */
.qr-color-pickers {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qr-color-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.qr-color-item:hover {
    background: rgba(99, 102, 241, 0.15);
}

.qr-color-swatch {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.qr-color-swatch:hover {
    transform: scale(1.1);
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.qr-color-info {
    flex: 1;
}

.qr-color-name {
    font-size: 13px;
    font-weight: 500;
    color: inherit;
    margin-bottom: 2px;
}

.qr-color-hex {
    font-size: 12px;
    opacity: 0.6;
    font-family: 'Courier New', monospace;
}

input[type="color"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Quick Tips - Helpful Hints */
.qr-tips {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.qr-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.7;
}

.qr-tip:last-child {
    margin-bottom: 0;
}

.qr-tip svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.7;
    color: #6366f1;
}

/* Feature Highlights - Privacy & Speed */
.qr-features {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.qr-feature-badge {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}

.qr-feature-badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #6366f1;
}

/* Info Cards - Why & How Sections */
.qr-info-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 48px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.qr-info-card {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.qr-info-card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: inherit;
}

.qr-info-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: inherit;
}

.qr-info-card ul,
.qr-info-card ol {
    margin-left: 20px;
    opacity: 0.8;
    line-height: 1.7;
}

.qr-info-card li {
    margin-bottom: 8px;
}

.qr-info-card strong {
    color: inherit;
    font-weight: 600;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .qr-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .qr-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .qr-type-card {
        padding: 14px 10px;
    }

    .qr-type-card .icon {
        width: 28px;
        height: 28px;
    }

    .qr-type-card .label {
        font-size: 12px;
    }

    .qr-info-sections {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .qr-preview-container {
        padding: 24px;
        min-height: 320px;
    }

    .qr-download-section {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .qr-form-container {
        padding: 16px;
    }

    .qr-config-sidebar {
        padding: 16px;
    }

    .qr-preview-box {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .qr-config-sidebar,
    .qr-download-section,
    .qr-features,
    .qr-type-grid,
    .qr-form-container {
        display: none !important;
    }

    .qr-preview-container {
        border: none;
        background: none;
        padding: 0;
    }

    .qr-preview-box {
        box-shadow: none;
    }
}
