/* GHZ Blog Post Interactive Widgets
   Designed to match the Hugo terminal theme:
   --background: #1a170f, --foreground: #eceae5, --accent: #eec35e
*/

.ghz-widget {
    border: 1px solid var(--accent);
    padding: 20px;
    margin: 30px 0;
    background: rgba(236, 234, 229, 0.03);
    font-family: inherit;
}

.ghz-widget h4 {
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1rem;
}

/* Override terminal theme img border inside widgets */
.ghz-widget img,
.ghz-widget svg {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ghz-widget .controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-end;
}

.ghz-widget .control-group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    flex: 1;
}

.ghz-widget label {
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.ghz-widget input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
    cursor: pointer;
}

.ghz-widget .value-display {
    color: var(--foreground);
    font-size: 0.85rem;
    text-align: right;
}

.ghz-widget button {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 6px 16px;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ghz-widget button:hover {
    background: var(--accent);
    color: var(--background);
}

.ghz-widget .results-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    padding: 12px;
    border-top: 1px solid var(--accent);
}

.ghz-widget .result-item {
    color: var(--foreground);
    font-size: 0.85rem;
}

.ghz-widget .result-value {
    color: var(--accent);
    font-weight: bold;
}

.ghz-widget .step-indicator {
    text-align: center;
    color: var(--foreground);
    margin: 10px 0;
    font-size: 0.85rem;
}

.ghz-widget .step-indicator strong {
    color: var(--accent);
}

/* Plotly modebar styling */
.ghz-widget .js-plotly-plot .plotly .modebar {
    background: transparent !important;
}

@media (max-width: 684px) {
    .ghz-widget .controls {
        flex-direction: column;
    }
    .ghz-widget .control-group {
        min-width: 100%;
    }
}
