#history-chart-form-container {
    display: flex;
    align-items: flex-start;
    gap: 1.5em;
    min-height: 11em;
}

/* Override the global .form-group flex/right-label-column layout (style.css)
   with a clean stacked layout for this modal's form. */
#history-chart-form .form-group {
    display: block;
    margin: 0 0 1.2em 0;
}

#history-chart-form .form-group label {
    display: block;
    width: auto;
    margin: 0 0 0.45em 0;
    text-align: left;
    font-weight: 600;
}

#history-chart-form .form-group label .label-hint {
    margin-left: 0.35em;
    font-weight: normal;
    font-size: 0.85em;
    color: #666;
}

#history-chart-form .form-group select,
#history-chart-form .datetime-range-input {
    width: 24em;
    max-width: 100%;
    box-sizing: border-box;
}

#history-chart-form .form-group select,
#history-chart-form .datetime-range-input input {
    padding: 0.55em 0.75em;
    border: 1px solid #ccc;
    border-radius: 0.4em;
    font-size: 1em;
    box-sizing: border-box;
}

#history-chart-form .datetime-range-input {
    position: relative;
    display: inline-block;
}

#history-chart-form .datetime-range-input input {
    width: 100%;
    padding-right: 2.4em;
    cursor: pointer;
}

#history-chart-form .datetime-range-input i {
    position: absolute;
    top: 50%;
    right: 0.85em;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
}

#history-chart-form input.button {
    display: inline-block;
    margin-top: 0.3em;
    padding: 0.6em 1.4em;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.4em;
    font-size: 1em;
    cursor: pointer;
}

#history-chart-form input.button:hover {
    background: var(--lighter-primary);
}

.history-chart-trigger {
    display: inline-block;
    background: var(--primary);
    color: white;
    border-radius: 0.4em;
    padding: 0.6em 1.2em;
    cursor: pointer;
    text-decoration: none;
}

.history-chart-trigger:hover {
    background: var(--lighter-primary);
}

#history-chart-form-container .loading-wheel {
    display: none;
    align-self: stretch;
    align-items: center;
}

#history-chart-container {
    margin-top: 1.6em;
    min-height: 30em;
}
