/* =========================================================
   GERADOR DE CÓDIGO DE BARRAS
   CSS ESPECÍFICO DA FERRAMENTA
   ========================================================= */


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

.barcode-tool-area {

    max-width: 900px;

    margin: 0 auto;

}


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

.tool-orientation {

    padding: 0 0 25px;

}


.orientation-card {

    max-width: 900px;

    margin: 0 auto;

    padding: 30px;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);

}


.orientation-card h2 {

    margin: 0 0 10px;

    color: #0f172a;

    font-size: 1.5rem;

    line-height: 1.3;

}


.orientation-intro {

    margin: 0 0 25px;

    color: #64748b;

    line-height: 1.6;

}


.orientation-grid {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 18px;

}


.orientation-item {

    display: flex;

    gap: 14px;

    padding: 20px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 12px;

}


.orientation-number {

    display: flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 34px;

    width: 34px;

    height: 34px;

    border-radius: 50%;

    background: #2563eb;

    color: #ffffff;

    font-size: 0.95rem;

    font-weight: 700;

}


.orientation-item h3 {

    margin: 0 0 7px;

    color: #0f172a;

    font-size: 1rem;

}


.orientation-item p {

    margin: 0;

    color: #64748b;

    font-size: 0.92rem;

    line-height: 1.5;

}


.orientation-tip {

    margin-top: 20px;

    padding: 15px 18px;

    background: #eff6ff;

    border: 1px solid #bfdbfe;

    border-radius: 10px;

    color: #1e40af;

    font-size: 0.92rem;

    line-height: 1.55;

}


/* =========================================================
   ÁREA DO GERADOR
   ========================================================= */

.barcode-generator-section {

    padding-top: 20px;

}


.barcode-card {

    padding: 30px;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);

}


.barcode-card-header {

    margin-bottom: 25px;

}


.barcode-card-header h2 {

    margin: 0 0 8px;

    color: #0f172a;

    font-size: 1.5rem;

    line-height: 1.3;

}


.barcode-card-header p {

    margin: 0;

    color: #64748b;

    line-height: 1.5;

}


/* =========================================================
   CAMPOS
   ========================================================= */

.barcode-field {

    margin-bottom: 18px;

}


.barcode-field label {

    display: block;

    margin-bottom: 7px;

    color: #1e293b;

    font-weight: 600;

}


.barcode-select,
.barcode-input {

    display: block;

    width: 100%;

    box-sizing: border-box;

    min-height: 46px;

    padding: 11px 13px;

    font-family: inherit;

    font-size: 0.95rem;

    color: #1e293b;

    background: #ffffff;

    border: 1px solid #cbd5e1;

    border-radius: 8px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;

}


.barcode-select:focus,
.barcode-input:focus {

    outline: none;

    border-color: #2563eb;

    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);

}


.barcode-format-note {

    display: block;

    margin: -8px 0 20px;

    color: #64748b;

    font-size: 0.88rem;

    line-height: 1.5;

}


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

.barcode-main-actions {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 25px;

}


.barcode-main-actions button {

    min-height: 44px;

    padding: 10px 18px;

    border-radius: 8px;

    font-family: inherit;

    font-size: 0.95rem;

    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;

}


.barcode-main-actions button:hover {

    transform: translateY(-1px);

}


.barcode-primary-button {

    border: 1px solid #2563eb;

    background: #2563eb;

    color: #ffffff;

}


.barcode-primary-button:hover {

    background: #1d4ed8;

    border-color: #1d4ed8;

}


.barcode-secondary-button {

    border: 1px solid #cbd5e1;

    background: #ffffff;

    color: #1e293b;

}


.barcode-secondary-button:hover {

    background: #f8fafc;

    border-color: #94a3b8;

}


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

.barcode-error {

    margin-top: 20px;

    padding: 13px 16px;

    border: 1px solid #fecaca;

    background: #fef2f2;

    color: #991b1b;

    border-radius: 9px;

    font-size: 0.9rem;

    line-height: 1.5;

}


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

.barcode-result-area {

    margin-top: 35px;

    padding-top: 30px;

    border-top: 1px solid #e2e8f0;

}


.barcode-result-header {

    margin-bottom: 22px;

}


.barcode-result-header h2 {

    margin: 0 0 7px;

    color: #0f172a;

    font-size: 1.45rem;

    line-height: 1.3;

}


.barcode-result-header p {

    margin: 0;

    color: #64748b;

    line-height: 1.5;

}


/* =========================================================
   ÁREA DO CÓDIGO
   ========================================================= */

.barcode-result-code {

    display: flex;

    justify-content: center;

    align-items: center;

    width: 100%;

    min-height: 190px;

    padding: 25px;

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 10px;

    overflow-x: auto;

}


.barcode-result-code svg {

    display: block;

    max-width: 100%;

    height: auto;

}


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

.barcode-content-used {

    display: flex;

    flex-direction: column;

    gap: 5px;

    margin: 18px 0;

    padding: 14px 16px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 9px;

    color: #64748b;

    font-size: 0.9rem;

    line-height: 1.5;

}


.barcode-content-used span {

    font-weight: 600;

    color: #475569;

}


.barcode-content-used strong {

    color: #1e293b;

    word-break: break-word;

}


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

.barcode-result-actions {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 20px;

}


.barcode-action-button {

    min-height: 42px;

    padding: 9px 15px;

    border: 1px solid #cbd5e1;

    border-radius: 8px;

    background: #ffffff;

    color: #1e293b;

    font-family: inherit;

    font-size: 0.9rem;

    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;

}


.barcode-action-button:hover {

    background: #f8fafc;

    border-color: #94a3b8;

}


/* =========================================================
   INFORMAÇÕES
   ========================================================= */

.barcode-info-card {

    max-width: 900px;

    margin: 0 auto 22px;

    padding: 28px 30px;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

}


.barcode-info-card h2 {

    margin: 0 0 13px;

    color: #0f172a;

    font-size: 1.35rem;

    line-height: 1.35;

}


.barcode-info-card h3 {

    margin: 0 0 7px;

    color: #0f172a;

    font-size: 1rem;

}


.barcode-info-card p {

    margin: 0 0 14px;

    color: #475569;

    line-height: 1.65;

}


.barcode-info-card p:last-child {

    margin-bottom: 0;

}


.barcode-info-card ul {

    margin: 0;

    padding-left: 22px;

}


.barcode-info-card li {

    margin-bottom: 11px;

    color: #475569;

    line-height: 1.6;

}


.barcode-info-card li:last-child {

    margin-bottom: 0;

}


/* =========================================================
   INTERPRETAÇÃO DOS FORMATOS
   ========================================================= */

.barcode-interpretation-grid {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 15px;

    margin-top: 22px;

}


.barcode-interpretation-item {

    padding: 18px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 10px;

}


.barcode-interpretation-item p {

    margin: 0;

    font-size: 0.92rem;

    line-height: 1.55;

}


/* =========================================================
   AVISO
   ========================================================= */

.barcode-notice {

    max-width: 900px;

    margin: 0 auto;

    padding: 22px 25px;

    background: #fffbeb;

    border: 1px solid #fde68a;

    border-radius: 12px;

}


.barcode-notice h2 {

    margin: 0 0 12px;

    color: #92400e;

    font-size: 1.25rem;

}


.barcode-notice p {

    margin: 0 0 12px;

    color: #78350f;

    font-size: 0.92rem;

    line-height: 1.6;

}


.barcode-notice p:last-child {

    margin-bottom: 0;

}


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

@media (max-width: 800px) {

    .orientation-grid {

        grid-template-columns: 1fr;

    }


    .barcode-interpretation-grid {

        grid-template-columns: 1fr;

    }


    .barcode-card,
    .orientation-card,
    .barcode-info-card {

        padding: 24px;

    }

}


@media (max-width: 600px) {

    .barcode-main-actions {

        flex-direction: column;

    }


    .barcode-main-actions button {

        width: 100%;

    }


    .barcode-result-actions {

        flex-direction: column;

    }


    .barcode-action-button {

        width: 100%;

    }


    .barcode-result-code {

        min-height: 160px;

        padding: 15px;

    }


    .orientation-card,
    .barcode-card,
    .barcode-info-card {

        padding: 20px;

    }


    .orientation-item {

        padding: 16px;

    }


    .barcode-notice {

        padding: 20px;

    }

}


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

@media print {

    header,
    footer,
    .tool-breadcrumb,
    .tool-orientation,
    .ad-container,
    .barcode-card-header,
    .barcode-main-actions,
    .barcode-result-actions,
    .barcode-content-used,
    .barcode-info-card,
    .barcode-notice {

        display: none !important;

    }


    .tool-page,
    .tool-section {

        padding: 0;

        margin: 0;

    }


    .barcode-tool-area {

        max-width: 100%;

    }


    .barcode-card {

        padding: 0;

        border: 0;

        box-shadow: none;

    }


    .barcode-result-area {

        margin: 0;

        padding: 0;

        border: 0;

    }


    .barcode-result-header p {

        display: none;

    }


    .barcode-result-code {

        border: 0;

        min-height: 0;

    }

}