/**
 * Trading Jazz Alert - Frontend Styles
 * Version: 3.0.0
 */

/* --- Container e Filtros --- */
.trading-jazz-container {
    max-width: 860px;
    margin: 20px auto;
    padding: 20px;
    background-color: #0d1117; /* GitHub Dark BG */
    color: #c9d1d9; /* GitHub Dark Text */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    border: 1px solid #30363d;
    border-radius: 8px;
}

#trading-jazz-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
    background-color: #161b22;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #30363d;
}

#trading-jazz-filters label {
    font-weight: 600;
}

#trading-jazz-filters select {
    padding: 8px 12px;
    background-color: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    border-radius: 6px;
    font-size: 14px;
}

/* --- Card de Alerta Principal --- */
.trading-jazz-alert {
    background-color: #161b22; /* GitHub Dark Component BG */
    border: 1px solid #30363d;
    border-radius: 8px;
    margin-bottom: 25px;
    padding: 20px;
    transition: box-shadow 0.2s ease-in-out;
}

.trading-jazz-alert:hover {
    box-shadow: 0 0 15px rgba(0, 128, 255, 0.2);
}

.trading-jazz-alert.type-buy {
    border-left: 5px solid #2ea043; /* Green */
}

.trading-jazz-alert.type-sell {
    border-left: 5px solid #da3633; /* Red */
}

/* --- Cabeçalho do Alerta --- */
.alert-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #30363d;
}

.alert-icon {
    font-size: 2.5rem;
}

.header-text .alert-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f0f6fc; /* Lighter text for titles */
    display: block;
}

.header-text .alert-subtitle {
    font-size: 0.9rem;
    color: #8b949e; /* Dimmed text */
}

/* --- Corpo e Seções do Alerta --- */
.alert-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.alert-section {
    padding: 15px;
    background-color: #0d1117;
    border-radius: 6px;
}

.alert-section.section-full {
    grid-column: 1 / -1; /* Ocupa a largura total */
}

.alert-section h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #f0f6fc;
    border-bottom: 1px solid #30363d;
    padding-bottom: 10px;
}

.alert-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alert-section ul li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.alert-section ul li strong {
    color: #8b949e;
    margin-right: 8px;
}

/* --- Gride de Indicadores --- */
.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.indicators-grid p {
    margin: 0;
    padding: 8px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.indicators-grid p strong {
    margin-right: auto;
}

.indicators-grid p::after {
    font-weight: bold;
    font-size: 1.1rem;
    margin-left: 10px;
}

.indicators-grid p.check-yes {
    background-color: rgba(46, 160, 67, 0.15);
    border: 1px solid #2ea043;
}
.indicators-grid p.check-yes::after {
    content: '✅';
}

.indicators-grid p.check-no {
    background-color: rgba(218, 54, 51, 0.1);
    border: 1px solid #da3633;
}
.indicators-grid p.check-no::after {
    content: '✖️';
}


/* --- Informações Adicionais (Confluência, Hits) --- */
.additional-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.additional-info > div, .additional-info > p {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.additional-info strong {
    color: #8b949e;
    font-weight: 600;
}

.status-yes { color: #2ea043; font-weight: bold; }
.status-no { color: #da3633; font-weight: bold; }
.risk-low { color: #2ea043; font-weight: bold; }
.risk-high { color: #da3633; font-weight: bold; }

.hits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hit-item {
    background-color: #388bfd; /* Blue */
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* --- Rodapé do Alerta --- */
.alert-footer {
    margin-top: 20px;
    text-align: right;
    font-size: 0.8rem;
    color: #8b949e;
}

/* --- Responsividade --- */
@media (max-width: 768px) {
    .alert-body {
        grid-template-columns: 1fr;
    }
}

/* Estilos para os controles do frontend */
#trading-jazz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    background-color: #161b22;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #30363d;
}

#trading-jazz-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

#trading-jazz-actions button {
    padding: 8px 16px;
    background-color: #388bfd;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

#trading-jazz-actions button:hover {
    background-color: #1f6feb;
}

#trading-jazz-actions button:disabled {
    background-color: #30363d;
    cursor: not-allowed;
}

#trading-jazz-action-feedback {
    font-size: 0.9em;
    color: #8b949e;
}
#trading-jazz-test-mode-notice {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-left: 5px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    color: #ffc107;
}
#trading-jazz-test-mode-notice p {
    margin: 0;
    font-size: 0.95em;
}