/*
 * QR Code Generator Styles
 * A modern, responsive stylesheet for the QR code generator application
 * Features:
 * - Responsive grid layout
 * - Modern gradient background
 * - Clean and intuitive UI
 * - Mobile-first design
 * - Accessible color contrast
 */

/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Beautiful gradient background */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Layout container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    /* Subtle text shadow for better contrast */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main content layout */
.main-content {
    display: grid;
    /* Sidebar and content area layout */
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Sidebar styles */
.sidebar {
    background: white;
    border-radius: 15px;
    padding: 25px;
    /* Subtle elevation shadow */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: fit-content;
}

/* QR type selector styles */
.qr-type-selector h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2rem;
}

.type-buttons {
    display: grid;
    gap: 10px;
}

/* Type selection buttons */
.type-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    /* Smooth hover transition */
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.type-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    /* Subtle lift effect */
    transform: translateY(-2px);
}

.type-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.type-btn i {
    font-size: 1.1rem;
}

/* Main content area */
.content-area {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    /* Form and QR code display layout */
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

/* Form container */
.form-container {
    min-height: 500px;
}

/* Form section visibility */
.form-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-section.active {
    display: block;
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form section headers */
.form-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Form groups and layout */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Form labels */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

/* Form inputs */
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

/* Input focus states */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    /* Subtle focus ring */
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Textarea specific styles */
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Form action buttons */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Generate and Clear buttons */
.generate-btn,
.clear-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Generate button styles */
.generate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Clear button styles */
.clear-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.clear-btn:hover {
    background: #e9ecef;
    color: #495057;
}

/* QR code result area */
.qr-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #dee2e6;
}

/* QR code placeholder */
.qr-placeholder {
    text-align: center;
    color: #6c757d;
}

.qr-placeholder i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.qr-placeholder p {
    font-size: 1.1rem;
}

/* Generated QR code container */
#qrcode {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* QR code action buttons */
.qr-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* Action button styles */
.action-btn {
    padding: 12px 20px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Responsive Design
 * Mobile-first approach with breakpoints:
 * - 1200px: Tablet landscape and smaller
 * - 768px: Tablet portrait and smaller
 * - 480px: Mobile devices
 */

/* Large tablets and desktop */
@media (max-width: 1200px) {
    /* Stack main content vertically */
    .main-content {
        grid-template-columns: 1fr;
    }
    
    /* Full width content area */
    .content-area {
        grid-template-columns: 1fr;
    }
    
    /* Move sidebar below content */
    .sidebar {
        order: 2;
    }
}

/* Tablets and smaller */
@media (max-width: 768px) {
    /* Reduce container padding */
    .container {
        padding: 10px;
    }
    
    /* Smaller header text */
    .header h1 {
        font-size: 2rem;
    }
    
    /* Adjust content padding */
    .content-area {
        padding: 20px;
    }
    
    /* Stack form rows vertically */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Stack form buttons vertically */
    .form-actions {
        flex-direction: column;
    }
    
    /* Wrap QR action buttons */
    .qr-actions {
        flex-wrap: wrap;
    }
}

/* Mobile devices */
@media (max-width: 480px) {
    /* Two columns for type buttons */
    .type-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Smaller type buttons */
    .type-btn {
        font-size: 0.8rem;
        padding: 10px;
    }
    
    /* Smaller icons */
    .type-btn i {
        font-size: 1rem;
    }
}
