/* QR Code Generator Styles - MasteryAce Design */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --danger: #ef4444;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #f9fafb;
    --card: #ffffff;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
}

/* Gradient Background - now using shared styles */
/* The gradient is loaded from /tools/_assets/shared-styles.css */
/* Keep this section commented out to use the standardized gradient */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Hero Header */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.hero h1 {
    color: white;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 400;
}

/* Card Styles */
.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px var(--shadow), 0 2px 4px -1px var(--shadow);
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.main-card {
    background: rgba(255, 255, 255, 0.95);
}

/* Main Layout */
.generator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 768px) {
    .generator-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: var(--bg);
    border: 2px solid var(--border);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 100px;
}

.tab-btn:hover {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px var(--shadow);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-input:hover {
    border-color: var(--primary-dark);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.helper-text {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

/* Color inputs */
.color-input {
    height: 60px;
    padding: 0.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-input:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Size converter */
.size-note {
    font-weight: 400;
    color: var(--text-light);
    font-size: 0.875rem;
}

.size-converter {
    color: var(--primary);
    font-weight: 600;
}

/* Customization section */
.customization-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.customization-section h3 {
    color: var(--text);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    margin-left: 0.5rem;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.action-buttons {
    margin-top: 2rem;
    text-align: center;
}

.download-buttons {
    margin-top: 1rem;
}

/* Preview Section */
.preview-section {
    background: var(--bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    text-align: center;
}

.preview-section h3 {
    color: var(--text);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.qr-preview {
    background: white;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.placeholder {
    color: var(--text-light);
    font-style: italic;
    font-size: 1.1rem;
}

.qr-info {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    text-align: left;
}

.qr-info p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.qr-info p:last-child {
    margin-bottom: 0;
}

.qr-info strong {
    color: var(--text);
}

#data-preview {
    word-break: break-all;
    color: var(--primary);
    font-weight: 600;
}

/* Checkbox styling */
input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* File input styling */
input[type="file"] {
    padding: 0.625rem 0.875rem;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 1rem;
    color: var(--text-light);
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Error states */
.error {
    border-color: var(--danger) !important;
}

.error-message {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Success states */
.success {
    border-color: var(--success) !important;
}

/* QR Code styling */
#qr-container canvas,
#qr-container svg {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem 0.75rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .download-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-secondary {
        margin-left: 0;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        min-width: 100%;
    }
}