/* Custom QR Code Generator Styles */

.custom-qr-generator-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

.qr-generator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.qr-generator-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.qr-generator-description {
    font-size: 1.125rem;
    color: #666;
    margin: 0;
}

.qr-generator-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

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

/* Card Styles */
.qr-settings-card,
.qr-preview-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.qr-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.25rem 0;
}

.qr-card-description {
    font-size: 0.875rem;
    color: #666;
    margin: 0 0 1.5rem 0;
}

/* Form Elements */
.qr-form-group {
    margin-bottom: 1.5rem;
}

.qr-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.qr-label-icon {
    font-size: 1.125rem;
}

.qr-input,
.qr-select,
.qr-textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #1a1a1a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qr-input:focus,
.qr-select:focus,
.qr-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

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

.qr-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.qr-error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Separator */
.qr-separator {
    height: 1px;
    background: #e5e7eb;
    margin: 1.5rem 0;
}

/* Data Fields */
.qr-data-fields {
    animation: fadeIn 0.3s ease-in;
}

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

/* Upload Area */
.qr-upload-area {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.qr-upload-area:hover {
    border-color: #6366f1;
    background-color: rgba(99, 102, 241, 0.02);
}

.qr-upload-area.dragging {
    border-color: #6366f1;
    background-color: rgba(99, 102, 241, 0.05);
}

.qr-upload-placeholder {
    color: #666;
}

.qr-upload-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.qr-upload-placeholder p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
}

.qr-upload-hint {
    color: #9ca3af;
    font-size: 0.75rem !important;
}

.qr-logo-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.qr-logo-preview img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 8px;
    object-fit: contain;
}

.qr-remove-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.qr-remove-btn:hover {
    background: #dc2626;
}

/* Color Picker */
.qr-color-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.qr-color-input {
    width: 60px;
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    padding: 4px;
}

.qr-color-text {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    color: #1a1a1a;
}

/* Warning Box */
.qr-warning {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    margin-top: 1rem;
}

.qr-warning-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.qr-warning p {
    margin: 0;
    font-size: 0.875rem;
    color: #92400e;
    line-height: 1.5;
}

/* Preview Container */
.qr-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 1rem;
    min-height: 400px;
}

#qr-code-canvas {
    max-width: 100%;
}

#qr-code-canvas canvas {
    max-width: 100%;
    height: auto !important;
    border-radius: 8px;
}

/* Info Box */
.qr-info-box {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: #dbeafe;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.qr-info-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.qr-info-box p {
    margin: 0;
    font-size: 0.875rem;
    color: #1e40af;
    line-height: 1.5;
}

/* Download Button */
.qr-download-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: #6366f1;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s, transform 0.1s;
}

.qr-download-btn:hover:not(:disabled) {
    background: #4f46e5;
}

.qr-download-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.qr-download-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.qr-btn-icon {
    font-size: 1.25rem;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .custom-qr-generator-wrapper {
        padding: 1rem 0.5rem;
    }
    
    .qr-generator-title {
        font-size: 1.5rem;
    }
    
    .qr-generator-description {
        font-size: 1rem;
    }
    
    .qr-settings-card,
    .qr-preview-card {
        padding: 1rem;
    }
    
    .qr-color-group {
        grid-template-columns: 1fr;
    }
    
    .qr-preview-container {
        padding: 1rem;
        min-height: 300px;
    }
}

/* Loading State */
.qr-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.qr-loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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