/* =========================================================
   ANALISADOR DE SENHAS
   Sete Ferramentas
   ========================================================= */

/* ---------------------------------------------------------
   ORIENTAÇÃO
   --------------------------------------------------------- */

.tool-orientation {
    padding-top: 0;
}

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

.orientation-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.orientation-number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.orientation-item h3 {
    margin: 2px 0 7px;
    color: #0f172a;
    font-size: 17px;
}

.orientation-item p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.orientation-tip {
    margin-top: 24px;
    padding: 16px 18px;
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    color: #334155;
    font-size: 14px;
    line-height: 1.6;
}

.orientation-tip strong {
    color: #0f172a;
}


/* ---------------------------------------------------------
   CARTÃO PRINCIPAL
   --------------------------------------------------------- */

.password-tool-card {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}


/* ---------------------------------------------------------
   AVISO DE SEGURANÇA
   --------------------------------------------------------- */

.security-warning {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 25px 0;
    padding: 17px 18px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
}

.security-warning-icon {
    flex: 0 0 auto;
    font-size: 21px;
    line-height: 1.2;
}

.security-warning strong {
    display: block;
    margin-bottom: 4px;
    color: #166534;
    font-size: 15px;
}

.security-warning p {
    margin: 0;
    color: #166534;
    font-size: 14px;
    line-height: 1.5;
}


/* ---------------------------------------------------------
   CAMPO DE SENHA
   --------------------------------------------------------- */

.password-input-wrapper {
    margin-top: 25px;
}

.password-input-wrapper label {
    display: block;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    width: 100%;
    min-height: 50px;
    padding: 13px 52px 13px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #1e293b;
    font-size: 16px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.password-field input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.password-toggle {
    position: absolute;
    right: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    cursor: pointer;
    font-size: 19px;
}

.password-toggle:hover {
    background: #f1f5f9;
}


/* ---------------------------------------------------------
   MEDIDOR
   --------------------------------------------------------- */

.password-meter-preview {
    margin-top: 25px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.password-meter-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
    color: #475569;
    font-size: 14px;
}

.password-meter-label strong {
    color: #0f172a;
}

.strength-bar {
    width: 100%;
    height: 9px;
    overflow: hidden;
    background: #e2e8f0;
    border-radius: 999px;
}

.strength-bar-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
    transition:
        width 0.35s ease,
        background 0.25s ease;
}

.strength-bar-fill[data-strength="Muito fraca"] {
    background: #dc2626;
}

.strength-bar-fill[data-strength="Fraca"] {
    background: #ea580c;
}

.strength-bar-fill[data-strength="Razoável"] {
    background: #ca8a04;
}

.strength-bar-fill[data-strength="Forte"] {
    background: #16a34a;
}

.strength-bar-fill[data-strength="Muito forte"] {
    background: #15803d;
}

.meter-note {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}


/* ---------------------------------------------------------
   AÇÕES
   --------------------------------------------------------- */

.password-tool-card > .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}


/* ---------------------------------------------------------
   RESULTADO
   --------------------------------------------------------- */

.password-result {
    margin-top: 30px;
}

.password-score {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.score-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 125px;
    width: 125px;
    height: 125px;
    border: 8px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    color: #0f172a;
    text-align: center;
}

.score-circle span {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
}

.score-circle small {
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
}

.score-circle[data-strength="Muito fraca"] {
    border-color: #dc2626;
}

.score-circle[data-strength="Fraca"] {
    border-color: #ea580c;
}

.score-circle[data-strength="Razoável"] {
    border-color: #ca8a04;
}

.score-circle[data-strength="Forte"] {
    border-color: #16a34a;
}

.score-circle[data-strength="Muito forte"] {
    border-color: #15803d;
}

.score-description {
    flex: 1;
}

.result-total-label {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 13px;
}

.score-description strong {
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 25px;
}

.score-description p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}


/* ---------------------------------------------------------
   CRITÉRIOS
   --------------------------------------------------------- */

.criteria-section {
    margin-top: 30px;
}

.criteria-section h3,
.recommendations h3 {
    margin: 0 0 16px;
    color: #0f172a;
    font-size: 19px;
}

.criteria-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.criteria-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.criterion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 16px;
    font-weight: 700;
}

.criteria-item > div {
    min-width: 0;
}

.criteria-item strong {
    display: block;
    margin-bottom: 4px;
    color: #1e293b;
    font-size: 14px;
}

.criteria-item span:not(.criterion-icon) {
    display: block;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.criteria-item.passed {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.criteria-item.passed .criterion-icon {
    background: #dcfce7;
    color: #15803d;
}

.criteria-item.failed {
    border-color: #fecaca;
    background: #fef2f2;
}

.criteria-item.failed .criterion-icon {
    background: #fee2e2;
    color: #dc2626;
}


/* ---------------------------------------------------------
   RECOMENDAÇÕES
   --------------------------------------------------------- */

.recommendations {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
}

.recommendations ul {
    margin: 0;
    padding-left: 21px;
}

.recommendations li {
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
    line-height: 1.5;
}

.recommendations li:last-child {
    margin-bottom: 0;
}


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

.result-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}


/* ---------------------------------------------------------
   INFORMAÇÕES
   --------------------------------------------------------- */

.password-info {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 28px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #eff6ff;
    font-size: 21px;
}

.info-item h3 {
    margin: 2px 0 7px;
    color: #0f172a;
    font-size: 17px;
}

.info-item p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.interpretation-box {
    margin-top: 25px;
    padding: 20px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
}

.interpretation-box h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 18px;
}

.interpretation-box p {
    margin: 0 0 12px;
    color: #334155;
    font-size: 14px;
    line-height: 1.65;
}

.interpretation-box p:last-child {
    margin-bottom: 0;
}

.info-note {
    margin-top: 25px;
    padding: 17px 18px;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.info-note strong {
    color: #0f172a;
}


/* ---------------------------------------------------------
   RESPONSIVO
   --------------------------------------------------------- */

@media (max-width: 1050px) {

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

    .password-tool-card,
    .password-info {
        max-width: 100%;
    }

}

@media (max-width: 700px) {

    .password-score {
        flex-direction: column;
        text-align: center;
    }

    .score-description {
        width: 100%;
    }

    .criteria-list,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .password-meter-label {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .password-tool-card > .actions {
        flex-direction: column;
    }

    .password-tool-card > .actions .tool-button {
        width: 100%;
    }

    .result-actions {
        justify-content: stretch;
    }

    .result-actions .tool-button {
        width: 100%;
    }

}

@media (max-width: 500px) {

    .orientation-item {
        padding: 16px;
    }

    .security-warning {
        padding: 15px;
    }

    .password-score {
        padding: 18px;
    }

    .score-circle {
        flex-basis: 110px;
        width: 110px;
        height: 110px;
    }

    .score-circle span {
        font-size: 30px;
    }

    .criteria-item {
        padding: 13px;
    }

    .info-item {
        padding: 16px;
    }

}


/* ---------------------------------------------------------
   IMPRESSÃO
   --------------------------------------------------------- */

@media print {

    header,
    footer,
    .ad-container,
    .tool-breadcrumb,
    .tool-orientation,
    .security-warning,
    .password-input-wrapper,
    .password-meter-preview,
    .password-tool-card > .actions,
    .result-actions {
        display: none !important;
    }

    .tool-page,
    .tool-section,
    .section-card {
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .password-result {
        display: block !important;
        margin-top: 20px;
    }

    .password-score {
        border: 1px solid #ccc;
        background: #fff;
    }

    .criteria-list,
    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

}