/* ========================================================
   QR Code Generator Specific Styles & Tooling UI
   ======================================================== */

.tool-main {
    padding-top: 4rem;
    padding-bottom: 6rem;
    max-width: 1000px; /* Slight bump for side-by-side grid optimization */
}

/* Tool Hero Block */
.tool-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.tool-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.tool-header .icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    flex-shrink: 0;
}

.tool-header .icon-wrapper i {
    width: 28px;
    height: 28px;
}

/* Inner App Framework container */
.tool-layout {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

/* Split Column Design specifically for Input/Output Data structures */
.qr-generator-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
}

/* Data Column (Left) */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-group label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

#qrInput {
    width: 100%;
    min-height: 220px;
    resize: vertical;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: var(--bg);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1.05rem;
    line-height: 1.6;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s ease-out;
}

#qrInput:focus {
    outline: none;
    border-color: var(--icon-orange-text);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15); /* Orange theme ring hint */
}

.generate-btn {
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 1.1rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.generate-btn i {
    color: var(--icon-orange-text); /* Orange highlight */
}

.generate-btn:hover {
    background-color: var(--icon-orange);
    color: var(--icon-orange-text);
    border-color: var(--icon-orange-text);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Screen Output graphic Column (Right) */
.output-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.qr-box {
    flex-grow: 1;
    min-height: 280px;
    background-color: var(--bg);
    border: 2px dashed var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Ensure QRCode generated Canvas and Img scale sharply */
.qr-box canvas, .qr-box img {
    border-radius: 8px; /* Clean edges */
    max-width: 100%;
}

/* No-state graphic design */
.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
}

.qr-placeholder i {
    width: 32px;
    height: 32px;
    opacity: 0.4;
}

/* Ribbon Actions Output */
.tool-actions {
    display: flex;
    gap: 1rem;
    justify-content: stretch;
}

.action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

/* Standardizing Disabled behavior to prevent bugs */
.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.action-btn i {
    width: 18px;
    height: 18px;
}

/* Tie Orange Theme directly to Call to action button */
.primary-btn {
    background-color: var(--icon-orange-text);
    color: white;
    border: none;
}

.primary-btn:hover:not(:disabled) {
    background-color: #ea580c; /* Tailwind Native Orange 600 */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px 0 rgba(249, 115, 22, 0.4);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.secondary-btn:hover:not(:disabled) {
    background-color: var(--bg);
    border-color: var(--text-muted);
}

/* ========================================================
   Responsive UI Breakdown
   ======================================================== */
@media (max-width: 860px) {
    .qr-generator-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .qr-box {
        min-height: 250px;
    }
}
@media (max-width: 500px) {
    .tool-actions {
        flex-direction: column;
    }
    .action-btn {
        width: 100%;
    }
    .tool-layout {
        padding: 1.5rem;
    }
    .tool-header h1 {
        font-size: 2.1rem;
    }
    #qrInput {
        min-height: 160px;
    }
}
