/**
 * QR Code Generator Specific Styles
 * Version: 1.0
 */

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.qr-showcase {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 2rem;
}

.qr-demo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.2) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.qr-demo-code {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-demo-code canvas {
    display: block;
    border-radius: 8px;
}

.qr-demo-info {
    color: var(--text-primary);
    font-weight: 500;
    text-align: center;
}

/* ==========================================================================
   QR TYPE SELECTOR
   ========================================================================== */

.qr-type-selector {
    margin-bottom: 1rem;
}

.qr-type-selector .btn-group {
    display: flex;
    flex-wrap: wrap;
}

.qr-type-selector .btn {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 8px !important;
    margin: 2px;
    transition: all 0.3s ease;
}

.qr-type-selector .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.qr-type-selector .btn-check:checked + .btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.qr-type-selector .btn i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .qr-type-selector .btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.25rem;
    }
    
    .qr-type-selector .btn i {
        margin-right: 0.25rem;
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   CONTENT FORMS
   ========================================================================== */

.content-form {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.content-form:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.content-form .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.content-form .form-control,
.content-form .form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.content-form .form-control:focus,
.content-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.content-form textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Form-specific styling */
#wifiForm {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9ff 100%);
}

#contactForm {
    background: linear-gradient(135deg, #f3e5f5 0%, #fff8e1 100%);
}

#smsForm {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
}

#emailForm {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

#phoneForm {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
}

/* ==========================================================================
   QR PREVIEW SECTION
   ========================================================================== */

.qr-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.qr-code-display {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.qr-code-display:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.qr-code-display canvas {
    display: block;
    border-radius: 8px;
}

.qr-info {
    width: 100%;
    text-align: center;
}

.qr-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-item i {
    color: var(--primary-color);
}

.qr-content-preview {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   SETTINGS SECTION
   ========================================================================== */

.form-control-color {
    width: 100%;
    height: 50px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-control-color:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.form-range {
    margin: 0.5rem 0;
}

.form-range::-webkit-slider-thumb {
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.form-range::-moz-range-thumb {
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   USAGE EXAMPLES
   ========================================================================== */

.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.usage-item {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.usage-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.usage-item h6 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Phone Demo */
.phone-demo {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.phone-screen {
    width: 150px;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    position: relative;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.qr-scanner-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.scanner-frame {
    width: 80px;
    height: 80px;
    border: 3px solid #00ff00;
    border-radius: 8px;
    position: relative;
    animation: scannerPulse 2s infinite;
}

.scanner-frame::before,
.scanner-frame::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border: 3px solid #00ff00;
}

.scanner-frame::before {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
}

.scanner-frame::after {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
}

@keyframes scannerPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Print Demo */
.print-demo {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.business-card {
    width: 200px;
    height: 120px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-content {
    flex: 1;
    text-align: left;
}

.card-content h6 {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.card-content p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

.card-qr {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Website Demo */
.website-demo {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.browser-frame {
    width: 180px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.browser-header {
    height: 25px;
    background: var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    gap: 0.25rem;
}

.browser-header span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.browser-header span:nth-child(1) { background: #ff5f56; }
.browser-header span:nth-child(2) { background: #ffbd2e; }
.browser-header span:nth-child(3) { background: #27ca3f; }

.browser-content {
    padding: 1rem;
    text-align: center;
    background: white;
}

.browser-content canvas {
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.browser-content p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ==========================================================================
   SUPPORTED TYPES SECTION
   ========================================================================== */

.supported-types {
    margin-top: 2rem;
    text-align: center;
}

.supported-types h6 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.type-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.type-badges .badge {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* ==========================================================================
   DOWNLOAD SECTION
   ========================================================================== */

.download-format {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.download-info .btn {
    font-weight: 600;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.download-info .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.download-info .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

.download-info .btn-outline-info:hover {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 992px) {
    .qr-preview-container {
        padding: 1.5rem;
    }
    
    .qr-stats {
        gap: 1rem;
    }
    
    .usage-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .qr-showcase {
        padding: 1rem;
    }
    
    .qr-demo-container {
        padding: 1.5rem;
    }
    
    .qr-preview-container {
        padding: 1rem;
    }
    
    .qr-code-display {
        padding: 1rem;
    }
    
    .qr-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-item {
        padding: 0.75rem;
        justify-content: center;
    }
    
    .phone-screen {
        width: 120px;
        height: 200px;
        padding: 15px;
    }
    
    .scanner-frame {
        width: 60px;
        height: 60px;
    }
    
    .business-card {
        width: 160px;
        height: 100px;
        padding: 0.75rem;
    }
    
    .browser-frame {
        width: 150px;
    }
}

@media (max-width: 576px) {
    .content-form {
        padding: 1rem;
    }
    
    .qr-content-preview {
        font-size: 0.75rem;
        padding: 0.75rem;
    }
}

/* ==========================================================================
   DARK MODE COMPATIBILITY
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .qr-demo-container {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .qr-code-display,
    .card-qr,
    .browser-content {
        background: #2d3748;
    }
    
    .business-card {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-form,
.usage-item,
.qr-preview-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Staggered animation for usage items */
.usage-item:nth-child(1) { animation-delay: 0.1s; }
.usage-item:nth-child(2) { animation-delay: 0.2s; }
.usage-item:nth-child(3) { animation-delay: 0.3s; }