/* ============================================================
   GERADOR DE QR CODE
   Estilos exclusivos da ferramenta
   ============================================================ */


/* ============================================================
   ÁREA PRINCIPAL
   ============================================================ */

.qr-tool-area {
    max-width: 900px;
    margin: 0 auto;
}


/* ============================================================
   ORIENTAÇÃO
   ============================================================ */

.qr-orientation-section {
    padding-top: 0;
}


.qr-orientation {
    max-width: 900px;
    margin: 0 auto;
}


.qr-orientation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 25px;
}


.qr-orientation-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    background: #ffffff;
}


.qr-step {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
}


.qr-orientation-item h3 {
    margin: 0 0 7px;
    color: #0f172a;
    font-size: 1rem;
}


.qr-orientation-item p {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.55;
}


/* ============================================================
   CARD DO GERADOR
   ============================================================ */

.qr-tool-card {
    padding: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}


.qr-tool-title {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.3;
}


.qr-tool-description {
    margin: 0 0 24px;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.55;
}


/* ============================================================
   CAMPO
   ============================================================ */

.qr-tool-card .form-group {
    margin-bottom: 18px;
}


.qr-tool-card .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
    font-weight: 600;
}


.qr-textarea {
    display: block;
    width: 100%;
    min-height: 170px;
    padding: 14px 15px;
    box-sizing: border-box;
    resize: vertical;
    font-family: inherit;
    font-size: 0.96rem;
    line-height: 1.55;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #1e293b;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.qr-textarea::placeholder {
    color: #94a3b8;
}


.qr-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}


.qr-character-count {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: 0.82rem;
}


/* ============================================================
   PRIVACIDADE
   ============================================================ */

.qr-privacy-note {
    margin: 0 0 20px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.5;
}


/* ============================================================
   BOTÕES PRINCIPAIS
   ============================================================ */

.qr-main-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}


/* ============================================================
   ERRO
   ============================================================ */

.qr-error {
    margin-top: 18px;
    padding: 12px 15px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.9rem;
    line-height: 1.5;
}


/* ============================================================
   RESULTADO
   ============================================================ */

.qr-result-area {
    margin-top: 35px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}


.qr-result-header {
    margin-bottom: 20px;
}


.qr-result-title {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 700;
}


.qr-result-description {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}


/* ============================================================
   QR CODE
   ============================================================ */

.qr-result-code {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 350px;
    padding: 25px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}


.qr-result-code svg {
    display: block;
    width: 320px;
    height: 320px;
    max-width: 100%;
    height: auto;
}


/* ============================================================
   CONTEÚDO UTILIZADO
   ============================================================ */

.qr-content-used {
    margin: 20px 0;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}


.qr-content-used span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
}


.qr-content-used strong {
    color: #1e293b;
    font-weight: 500;
}


/* ============================================================
   AÇÕES DO RESULTADO
   ============================================================ */

.qr-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}


/* ============================================================
   INFORMAÇÕES TÉCNICAS
   ============================================================ */

.qr-technical-info {
    margin-top: 25px;
}


/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 900px) {

    .qr-orientation-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 600px) {

    .qr-tool-card {
        padding: 22px 18px;
    }


    .qr-tool-title {
        font-size: 1.35rem;
    }


    .qr-textarea {
        min-height: 145px;
    }


    .qr-main-actions {
        flex-direction: column;
        align-items: stretch;
    }


    .qr-main-actions .btn {
        width: 100%;
    }


    .qr-result-code {
        min-height: 0;
        padding: 15px;
    }


    .qr-result-actions {
        flex-direction: column;
    }


    .qr-result-actions .btn {
        width: 100%;
    }


    .qr-orientation-item {
        padding: 17px;
    }

}


/* ============================================================
   IMPRESSÃO
   ============================================================ */

@media print {

    .qr-tool-card,
    .qr-orientation-section,
    .qr-result-actions,
    .ad-container,
    header,
    footer {
        display: none !important;
    }


    .qr-result-area {
        display: block !important;
        margin-top: 0;
        padding-top: 0;
        border: 0;
    }


    .qr-result-code {
        border: 0;
        box-shadow: none;
    }

}