/* Importa a fonte do Google */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* Estilo geral do container com fundo dinâmico e largura dinâmica */
.gdh-container { margin: 40px auto; border-radius: 20px; box-shadow: 0 15px 40px rgba(0, 20, 50, 0.1); font-family: 'Poppins', sans-serif; overflow: hidden; }
/* Conteúdo do formulário */
.gdh-form-content { padding: 20px 40px 40px 40px; }
.gdh-form-content h2 { text-align: center; color: #1a2c4e; margin-bottom: 10px; font-weight: 700; }
.gdh-form-content p { text-align: center; color: #5a6479; margin-bottom: 30px; }
.gdh-ai-notice { background-color: #fff3cd; border-left: 4px solid #ffc107; padding: 10px 20px; margin-bottom: 20px; margin-top: 10px; }
.gdh-ai-notice p { color: #664d03; font-size: 14px; text-align: left; margin: 0; }
.gdh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.gdh-field { display: flex; flex-direction: column; }
.gdh-field label { font-weight: 600; color: #3d4a66; margin-bottom: 8px; font-size: 15px; }
/* Estilo dos campos de input e select com borda preta suave e alinhamento corrigido */
.gdh-field input, .gdh-field select {
    border: 1px solid #c2c2c2;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background-color: #fff;
    height: 50px;
    padding: 0 15px;
    box-sizing: border-box;
}
.gdh-field input::placeholder, .gdh-field select { color: #999; }
.gdh-field select option:not([disabled]) { color: #000; }
.gdh-field input:focus, .gdh-field select:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
/* Estilos extras para o SELECT para garantir consistência visual */
.gdh-field select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 10px auto;
    padding-right: 40px;
}

.gdh-field.gdh-full-width { grid-column: 1 / -1; }

/* --- SEÇÃO DE DESTAQUE DO OBJETIVO (COM SELETOR DE MÁXIMA FORÇA) --- */

.gdh-field.gdh-main-objective {
    background: linear-gradient(135deg, #fff8e1 0%, #f3e5f5 100%);
    border: 3px solid #ff9800;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.3);
    animation: pulse-glow 3s infinite;
    position: relative;
    grid-column: 1 / -1;
    transform: scale(1.02);
}

.gdh-field.gdh-main-objective:before {
    content: '🎯';
    position: absolute;
    top: -15px;
    left: -15px;
    background: linear-gradient(135deg, #ff9800, #f57300);
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
    z-index: 10;
}

.gdh-field.gdh-main-objective label {
    font-size: 1.4em;
    color: #e65100;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    display: block;
    text-align: center;
}

/* SELETOR DE MÁXIMA FORÇA: Combina o container + o div + o select com a classe específica */
.gdh-container .gdh-field.gdh-main-objective select.gdh-goal-select-field {
    height: 60px !important;
    border: 3px solid #4caf50 !important;
    font-weight: 700 !important;
    background-color: #e8f5e9 !important; /* VERDE CLARO INTERNO */
    box-shadow: inset 0 3px 8px rgba(76, 175, 80, 0.2) !important;
    font-size: 18px !important;
    color: #1b5e20 !important; /* Texto verde escuro para contraste */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%234caf50%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E') !important;
    background-position: right 15px center !important;
    background-size: 12px auto !important;
}

/* Efeito hover e focus */
.gdh-container .gdh-field.gdh-main-objective select.gdh-goal-select-field:hover {
    background-color: #c8e6c9 !important;
    border-color: #388e3c !important;
}

.gdh-container .gdh-field.gdh-main-objective select.gdh-goal-select-field:focus {
    border-color: #2e7d32 !important;
    box-shadow: 0 0 0 5px rgba(76, 175, 80, 0.3) !important;
    background-color: #a5d6a7 !important;
}
/* --- FIM DA SEÇÃO --- */


@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 8px 25px rgba(255, 152, 0, 0.3);
        transform: scale(1.02);
    }
    50% { 
        box-shadow: 0 12px 35px rgba(255, 152, 0, 0.5);
        transform: scale(1.03);
    }
}

#gdh-submit-button { width: 100%; padding: 16px; background: var(--gdh-submit-button-bg); color: var(--gdh-submit-button-text); border: none; border-radius: 10px; font-size: 18px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); margin-top: 10px; }
#gdh-submit-button:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); color: var(--gdh-submit-button-text) !important; }
#gdh-loader { text-align: center; padding: 40px 0; color: #3d4a66; }
.gdh-spinner { width: 50px; height: 50px; border: 5px solid #e3f2fd; border-top: 5px solid #3b82f6; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 15px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#gdh-result { margin: 40px; padding: 30px; background-color: var(--gdh-result-bg); color: var(--gdh-result-font); border-radius: 12px; line-height: 1.7; animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#gdh-result h3 { margin-top: 0; color: #1a2c4e; font-weight: 700; text-align: center; }
.gdh-habits-list { margin-top: 25px; }
.gdh-habit-item { border-bottom: 1px solid #eef2f7; padding: 20px 0; }
.gdh-habit-item:last-child { border-bottom: none; }
.gdh-habit-text { font-size: 1.1em; margin-top: 0; margin-bottom: 15px; color: var(--gdh-result-font); }

/* CSS PARA TRUNCAR NOMES DE PRODUTOS LONGOS */
.gdh-product-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f7f9fc;
    padding: 12px 15px;
    border-radius: 8px;
    gap: 15px;
    flex-wrap: nowrap;
}

.gdh-product-area > span {
    font-size: 16px !important;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 150px);
}

.gdh-product-button {
    background-color: var(--gdh-product-button-bg);
    color: var(--gdh-product-button-text);
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-block;
    flex-shrink: 0;
    white-space: nowrap;
}

.gdh-product-button:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.15); color: var(--gdh-product-button-text) !important; }
.gdh-final-summary { margin-top: 30px; padding-top: 20px; border-top: 1px solid #eef2f7; line-height: 1.8; }
.gdh-disclaimer { margin-top: 30px; padding: 20px; background-color: #fff8e1; border-left: 5px solid #ffc107; border-radius: 8px; font-size: 14px; }
.gdh-disclaimer p { text-align: left; margin: 0; padding: 0; }
.gdh-new-query-area { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid #eef2f7; }
#gdh-new-query-button { background: var(--gdh-new-query-button-bg); color: var(--gdh-new-query-button-text); padding: 12px 25px; border-radius: 8px; border: none; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; }
#gdh-new-query-button:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.2); color: var(--gdh-new-query-button-text) !important; }
.gdh-top-tip-area { text-align: center; margin-top: 30px; padding-top: 30px; border-top: 1px solid #eef2f7; }
.gdh-top-tip-button { display: inline-block; padding: 18px 35px; font-size: 20px; font-weight: 700; text-decoration: none; border-radius: 12px; background: var(--gdh-top-tip-button-bg); color: var(--gdh-top-tip-button-text); transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.gdh-top-tip-button:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0,0,0,0.3); color: var(--gdh-top-tip-button-text) !important; }
.gdh-ad-block { margin: 0; padding: 0; text-align: center; }
.gdh-ad-block img, .gdh-ad-block iframe { max-width: 100%; height: auto; }

.gdh-product-suggestion-label {
    color: #d32f2f !important;
    font-weight: 700 !important;
}

.gdh-product-name {
    color: #3d4a66 !important;
    font-weight: 600 !important;
}

.gdh-extra-tip {
    color: #d32f2f !important;
    font-weight: bold !important;
}

@media (max-width: 800px) { 
    .gdh-grid { grid-template-columns: 1fr 1fr; } 
    .gdh-field.gdh-main-objective {
        margin: 25px 0 !important;
        padding: 20px !important;
        transform: scale(1.01);
    }
    .gdh-product-area > span {
        max-width: calc(100% - 130px);
    }
}
@media (max-width: 600px) { 
    .gdh-container { margin: 20px 10px; } 
    .gdh-form-content { padding: 20px; } 
    .gdh-grid { grid-template-columns: 1fr; } 
    #gdh-result { margin: 20px; } 
    .gdh-field.gdh-main-objective {
        margin: 20px 0 !important;
        padding: 15px !important;
        transform: scale(1);
    }
    
    .gdh-field.gdh-main-objective label {
        font-size: 1.2em !important;
    }
    
    select.gdh-goal-select-field {
        height: 55px !important;
        font-size: 16px !important;
    }
    
    .gdh-field.gdh-main-objective:before {
        width: 30px;
        height: 30px;
        font-size: 16px;
        top: -12px;
        left: -12px;
    }
    
    .gdh-product-area {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .gdh-product-area > span {
        max-width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    
    .gdh-product-button {
        width: 100%;
        text-align: center;
    }
}