/* ================================================================== */
/* === ARQUIVO DE ESTILO - FERRAMENTA RESULTADO ESPERADO          === */
/* ================================================================== */

/* --- AJUSTE ---
   Removemos o wrapper e aplicamos os estilos diretamente no .container
   para se alinhar com o global-style.css responsivo.
   O .tool-wrapper não é mais necessário se o .container já faz seu papel.
*/

/* --- ESTILOS PADRÃO (MOBILE FIRST) --- */

.step {
    display: none;
    /* --- AJUSTE --- Reduz o padding para telas de celular. */
    padding: 1.5rem; 
    animation: fadeIn 0.5s;
}

.step.active {
    display: block;
}

.step-header h1, .step-header h2 {
    color: #111827;
    margin-bottom: 0.5rem;
    /* --- AJUSTE --- Usa clamp() para títulos responsivos. */
    font-size: clamp(1.5rem, 5vw, 1.8rem);
}

.step-header p {
    color: #4b5563;
    font-size: clamp(1rem, 4vw, 1.1rem);
    margin-bottom: 1.5rem;
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-content label {
    font-weight: 600;
    color: #374151;
    line-height: 1.5;
}

.step-content textarea, 
.step-content input[type="date"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Lexend', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
}

.step-content textarea {
    min-height: 120px;
    resize: vertical;
}

.step-content textarea:focus,
.step-content input[type="date"]:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px #c7d2fe;
}

.slider {
    width: 100%;
    cursor: pointer;
}

.slider-value {
    font-weight: bold;
    color: #4f46e5;
    text-align: center;
    font-size: 2rem;
    margin-top: -1rem;
}

.step-navigation {
    margin-top: 2.5rem;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.step-navigation button {
    padding: 0.75rem 1.25rem; /* --- AJUSTE --- Padding ligeiramente ajustado. */
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-prev {
    background-color: transparent;
    color: #4b5563;
}
.btn-prev:hover {
    background-color: #f3f4f6;
}

.btn-next, #btn-finalizar {
    background-color: #4f46e5;
    color: white;
}
.btn-next:hover, #btn-finalizar:hover {
    background-color: #4338ca;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.info-box, .draft-box, .recap-box, .question-block, .media-wrapper {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 1.25rem;
    border-radius: 12px;
}

.info-box {
    background-color: #eef2ff;
    border-left: 4px solid #4f46e5;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.info-box h4, .draft-box h4, .recap-box h4 {
    color: #111827;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.info-box h4 { color: #3730a3; }

.info-box p, .draft-box p, .recap-box p {
    color: #374151;
    font-weight: 400;
    margin: 0;
    line-height: 1.6;
}
.info-box p { color: #4338ca; }

.label-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between; 
    width: 100%;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.label-wrapper label {
    flex-grow: 1;
}

.help-tip {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #d1d5db;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    line-height: 20px;
    cursor: help;
    flex-shrink: 0;
}

.dynamic-tooltip {
    position: absolute;
    background-color: #374151;
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    width: 280px;
    font-size: 0.9rem;
    font-weight: 400;
    text-align: left;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dynamic-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.btn-prev-small,
.btn-next-small {
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

.btn-prev-small { background-color: transparent; color: #6b7280; }
.btn-prev-small:hover { background-color: #f3f4f6; }
.btn-next-small { background-color: #4f46e5; color: white; border-color: #4f46e5; }
.btn-next-small:hover { background-color: #4338ca; border-color: #4338ca; }

.subtask-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    align-items: center;
}

.hidden { display: none !important; }

#smart-history-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    border-left: 2px solid #e5e7eb;
    padding-left: 1.5rem;
}

.history-item {
    background-color: #f9fafb;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    animation: fadeIn 0.5s;
}
.history-item strong { display: block; color: #4f46e5; font-size: 0.8rem; text-transform: uppercase; margin-bottom: 0.25rem; }
.history-item p { margin: 0; color: #374151; }

#date-inputs-container {
    display: flex;
    /* --- AJUSTE --- Quebra as datas em coluna no mobile. */
    flex-direction: column; 
    gap: 1rem;
}

.date-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

#summary-content h3 {
    color: #4f46e5;
    border-bottom: 2px solid #eef2ff;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
#summary-content h3:first-child { margin-top: 0; }
#summary-content p { background-color: #f9fafb; padding: 1rem; border-radius: 8px; line-height: 1.6; }

.btn-icon {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.btn-icon:hover { background-color: #e5e7eb; border-color: #9ca3af; }

/* ================================================================== */
/* === MEDIA QUERIES PARA AJUSTES EM DESKTOP                      === */
/* ================================================================== */

@media (min-width: 768px) {
    .step {
        /* Devolve o padding maior para telas de desktop. */
        padding: 2rem 2.5rem;
    }

    #date-inputs-container {
        /* Devolve o layout lado a lado para as datas. */
        flex-direction: row;
    }
}

/* ======================================================= */
/* --- MÁGICA DA IMPRESSÃO (Sem alterações) ---             */
/* ======================================================= */
@media print {
    body > #header-placeholder,
    body > #copyright-placeholder,
    .step-navigation,
    .btn-icon {
        display: none !important;
    }
    body > .container {
        display: block !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    .step {
        display: none !important;
        padding: 0 !important;
    }
    #step-5.printable {
        display: block !important;
    }
    #summary-content h3 { color: #000000; border-color: #dddddd; }
    #summary-content p { background-color: #ffffff; border: 1px solid #cccccc; }
    h3, p { page-break-inside: avoid; }
    h3 { page-break-after: avoid; page-break-before: auto; }
}

.justify-end {
    justify-content: flex-end;
}