/* =====================================================
   GERADOR DE CPF E CNPJ
   CSS ESPECÍFICO DA FERRAMENTA
   ===================================================== */


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

.document-tool-area {

    max-width: 900px;
    margin: 0 auto;

}


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

.document-card {

    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);

}


/* =====================================================
   TÍTULO
   ===================================================== */

.document-tool-title {

    margin: 0 0 8px;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;

}


.document-tool-description {

    margin: 0 0 28px;
    font-size: 1rem;
    line-height: 1.6;
    color: #64748b;

}


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

.document-field {

    margin-bottom: 18px;

}


.document-field label {

    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;

}


.document-select {

    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;

}


.document-select:focus {

    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);

}


/* =====================================================
   INFORMAÇÃO DO FORMATO
   ===================================================== */

.document-format-note {

    display: block;
    margin: -6px 0 22px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #64748b;

}


/* =====================================================
   OPÇÃO DE FORMATAÇÃO
   ===================================================== */

.document-option {

    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 24px;
    font-size: 0.95rem;
    color: #1e293b;
    cursor: pointer;

}


.document-option input {

    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #2563eb;

}


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

.document-main-actions {

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;

}


.document-main-actions button {

    min-height: 44px;
    padding: 10px 18px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;

}


.document-primary-button {

    border: 1px solid #2563eb;
    background: #2563eb;
    color: #ffffff;

}


.document-primary-button:hover {

    background: #1d4ed8;
    border-color: #1d4ed8;

}


.document-secondary-button {

    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;

}


.document-secondary-button:hover {

    background: #f8fafc;
    border-color: #94a3b8;

}


.document-main-actions button:active {

    transform: translateY(1px);

}


/* =====================================================
   MENSAGEM DE ERRO
   ===================================================== */

.document-error {

    margin-top: 18px;
    padding: 13px 15px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff5f5;
    color: #991b1b;
    font-size: 0.9rem;
    line-height: 1.5;

}


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

.document-result-area {

    margin-top: 34px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;

}


.document-result-title {

    margin: 0 0 6px;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;

}


.document-result-description {

    margin: 0 0 22px;
    color: #64748b;
    line-height: 1.5;

}


/* =====================================================
   ÁREA DO NÚMERO
   ===================================================== */

.document-result-code {

    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 145px;
    padding: 28px 20px;
    box-sizing: border-box;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    overflow: hidden;

}


.document-result-number {

    font-size: clamp(2rem, 6vw, 3.4rem);
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;
    color: #0f172a;
    word-break: break-word;

}


/* =====================================================
   DOCUMENTO UTILIZADO
   ===================================================== */

.document-content-used {

    margin: 18px 0;
    padding: 13px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #475569;

}


.document-content-used span {

    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #1e293b;

}


.document-content-used strong {

    color: #0f172a;

}


/* =====================================================
   AVISO DO RESULTADO
   ===================================================== */

.document-result-notice {

    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    color: #854d0e;
    font-size: 0.9rem;
    line-height: 1.55;

}


.document-result-notice strong {

    color: #713f12;

}


/* =====================================================
   AÇÃO DE COPIAR
   ===================================================== */

.document-copy-action {

    display: flex;
    justify-content: center;
    margin-top: 22px;

}


.document-copy-button {

    min-height: 44px;
    padding: 10px 22px;
    border: 1px solid #2563eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background: #2563eb;
    color: #ffffff;
    transition:
        background 0.15s ease,
        border-color 0.15s ease;

}


.document-copy-button:hover {

    background: #1d4ed8;
    border-color: #1d4ed8;

}


.document-copy-button.copied {

    background: #166534;
    border-color: #166534;

}


/* =====================================================
   CARTÃO INFORMATIVO
   ===================================================== */

.document-info-card {

    margin-top: 24px;
    padding: 24px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #eff6ff;

}


.document-info-card h2 {

    margin: 0 0 12px;
    font-size: 1.2rem;
    color: #0f172a;

}


.document-info-card p {

    margin: 0 0 12px;
    line-height: 1.65;
    color: #475569;

}


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

    margin-bottom: 0;

}


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

.tool-orientation {

    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;

}


.tool-orientation h2 {

    margin: 0 0 12px;
    font-size: 1.45rem;
    line-height: 1.3;
    color: #0f172a;

}


.orientation-intro {

    margin: 0 0 24px;
    color: #64748b;
    line-height: 1.6;

}


.orientation-grid {

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;

}


.orientation-item {

    display: flex;
    gap: 12px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;

}


.orientation-number {

    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;

}


.orientation-item h3 {

    margin: 1px 0 6px;
    font-size: 1rem;
    color: #0f172a;

}


.orientation-item p {

    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #64748b;

}


.orientation-tip {

    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 9px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.9rem;
    line-height: 1.55;

}


.orientation-tip strong {

    flex-shrink: 0;

}


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

@media (max-width: 800px) {

    .orientation-grid {

        grid-template-columns: 1fr;

    }

}


@media (max-width: 650px) {

    .document-card {

        padding: 22px 18px;

    }


    .tool-orientation {

        padding: 22px 18px;

    }


    .document-tool-title {

        font-size: 1.35rem;

    }


    .document-result-code {

        min-height: 125px;
        padding: 20px 12px;

    }


    .document-result-number {

        font-size: 2rem;
        letter-spacing: 0.5px;

    }


    .document-main-actions {

        flex-direction: column;
        align-items: stretch;

    }


    .document-main-actions button {

        width: 100%;

    }


    .document-copy-action {

        justify-content: stretch;

    }


    .document-copy-button {

        width: 100%;

    }


    .orientation-item {

        padding: 15px;

    }


    .orientation-tip {

        flex-direction: column;
        gap: 4px;

    }

}


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

@media print {

    header,
    footer,
    .ad-container,
    .tool-breadcrumb,
    .tool-orientation,
    .document-main-actions,
    .document-copy-action {

        display: none !important;

    }


    .document-card {

        border: none;
        box-shadow: none;
        padding: 0;

    }


    .document-result-area {

        margin-top: 0;
        padding-top: 0;
        border-top: none;

    }


    .document-result-code {

        border: none;
        background: #ffffff;

    }

}