/* QR Code Generator Styles */

.qr-code-generator-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.qr-generator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Left Panel - Content */
.qr-content-panel {
    padding: 40px;
    background: #f9fafb;
    border-radius: 12px 0 0 12px;
}

.qr-title {
    font-size: 32px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.qr-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 32px 0;
}

/* Content Section */
.qr-content-section {
    margin-bottom: 32px;
}

.qr-content-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
}

.qr-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px 0;
}

/* Content Tabs */
.qr-content-tabs {
    display: flex;
    gap: 8px;
    background: #e5e7eb;
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.qr-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-tab:hover {
    background: rgba(255, 255, 255, 0.5);
}

.qr-tab.active {
    background: #ffffff;
    color: #3b82f6;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Input Groups */
.qr-content-inputs {
    position: relative;
    min-height: 120px;
}

.qr-input-group {
    display: none;
}

.qr-input-group.active {
    display: block;
}

.qr-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.qr-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #ffffff;
    transition: border-color 0.2s;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.qr-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.qr-input::placeholder {
    color: #9ca3af;
}

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

/* Customization Section */
.qr-customization-section {
    margin-top: 32px;
}

.qr-customization-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 20px 0;
}

.qr-custom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.qr-custom-col label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.qr-size-input,
.qr-error-correction {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #ffffff;
    box-sizing: border-box;
}

/* Color Picker */
.qr-color-picker-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.qr-color-preset {
    width: 40px;
    height: 40px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    background: none;
}

.qr-color-preset:hover {
    transform: scale(1.1);
    border-color: #3b82f6;
}

.qr-color-preset.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.qr-color-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 4px 12px;
}

.qr-foreground-color,
.qr-background-color {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.qr-color-value {
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: #6b7280;
    text-transform: uppercase;
}

/* Logo Section */
.qr-logo-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.qr-logo-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

.qr-logo-toggle {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Right Panel - Preview */
.qr-preview-panel {
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-preview-panel h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
}

.qr-preview-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px 0;
}

.qr-preview-container {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qr-code-display {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-display img {
    max-width: 100%;
    max-height: 100%;
    image-rendering: pixelated;
}

/* Download Buttons */
.qr-download-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.qr-download-btn {
    flex: 1;
    padding: 14px 24px;
    background: #1f2937;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qr-download-btn:hover {
    background: #111827;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.qr-download-btn:active {
    transform: translateY(0);
}

.qr-download-svg {
    background: #ffffff;
    color: #1f2937;
    border: 2px solid #e5e7eb;
}

.qr-download-svg:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Encoded Content */
.qr-encoded-content {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.qr-encoded-content p {
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0 8px 0;
}

.qr-encoded-text {
    padding: 12px 16px;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    word-break: break-all;
    font-family: 'Courier New', monospace;
}

/* Responsive Design */
@media (max-width: 968px) {
    .qr-generator-wrapper {
        grid-template-columns: 1fr;
    }
    
    .qr-content-panel {
        border-radius: 12px 12px 0 0;
    }
    
    .qr-custom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .qr-content-panel,
    .qr-preview-panel {
        padding: 24px;
    }
    
    .qr-title {
        font-size: 24px;
    }
    
    .qr-download-buttons {
        flex-direction: column;
    }
    
    .qr-color-picker-group {
        flex-wrap: wrap;
    }
}

/* Loading State */
.qr-loading {
    opacity: 0.6;
    pointer-events: none;
}

.qr-loading .qr-preview-container::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: qr-spin 0.8s linear infinite;
}

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