/* Track Generator basic styles */
.tg-container {
    padding: 1em;
    border: 1px solid currentColor;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.tg-container label {
    display: block;
    margin: 0.5em 0 0.2em;
}

.tg-dark-toggle {
    display: inline-block;
    margin-left: 0.5em;
}

#tg-settings.collapsed {
    display: none;
}

#tg-settings-toggle {
    margin-left: 0.5em;
}


/* Animated slot styling */

/* Container for slot groups inside results */
.tg-slots-group {
    margin-top: 0.5em;
}

.slot {
    display: inline-block;
    overflow: hidden;
    width: 80px;
    height: 2em;
    border: 1px solid currentColor;
    border-radius: 4px;
    margin-right: 0.25em;
    vertical-align: bottom;
    background: inherit;
}

.slot-reel {
    position: relative;
}

.slot-item {
    height: 2em;
    line-height: 2em;
    text-align: center;
}

.tg-prog-list {
    margin-bottom: 0.5em;
}

.tg-prog-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5em;
    flex-wrap: wrap;
    gap: 0.5em;
}

.tg-prog-row input[type="text"] {
    flex: 1;
}

.tg-prog-row button {
    margin-left: 0;
}

.tg-prog-result {
    margin-bottom: 1em;
}

.tg-reroll-prog {
    font-size: 0.4em;
    padding: 0.15em 0.35em;
    margin-right: 0.25em;
    line-height: 1;
    vertical-align: middle;
    margin-top: 0;
    background: transparent;
    border: none;
    color: inherit;
}

.tg-degrees {
    color: inherit;
    font-style: italic;
}

.tg-chords {
    color: inherit;
    font-weight: bold;
}

/* Basic layout tweaks */
.tg-container fieldset {
    margin-bottom: 1em;
    padding: 1rem;
    border: 1px solid currentColor;
    background: inherit;
    border-radius: 8px;
}

.tg-container legend {
    font-weight: bold;
    border-left: 4px solid currentColor;
    padding-left: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Collapsible settings sections */
.tg-collapsible legend {
    cursor: pointer;
}

.tg-collapsible.collapsed > *:not(legend) {
    display: none;
}

/* Modern form elements */
.tg-container input[type="number"],
.tg-container input[type="text"],
.tg-container select {
    padding: 0.25em;
    border: 1px solid currentColor;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.tg-container button {
    padding: 0.5em 1em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0.5em;
}

.tg-container button:hover {
/*     background: inherit; */
}

#tg-output-summary {
    position: sticky;
    top: 0;
    background: inherit;
    padding: 0.25em 0.5em;
    border-bottom: 1px solid currentColor;
    z-index: 10;
}

.tg-chord-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

.tg-chord-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: inherit;
    padding: 1em;
    border: 1px solid currentColor;
    border-radius: 8px;
    z-index: 1000;
    max-width: 90%;
}

.tg-chord-close {
    position: absolute;
    top: 0.25em;
    right: 0.25em;
    background: transparent;
    border: none;
    font-size: 1.25em;
    cursor: pointer;
}

.tg-chord-wrap {
    display: inline-block;
    margin-right: 0.25em;
}

.tg-borrowed {
    font-style: italic;
}

.tg-roman {
    color: inherit;
}

.tg-about {
    margin-top: 1em;
    font-size: 0.9em;
    color: inherit;
}

/* Dark mode styles */
.tg-container.tg-dark-mode {
    background: #222;
    color: #eee;
    border-color: #555;
}
.tg-container.tg-dark-mode fieldset {
    background: #333;
    border-color: #555;
}
.tg-container.tg-dark-mode input[type="number"],
.tg-container.tg-dark-mode input[type="text"],
.tg-container.tg-dark-mode select {
    background: #444;
    color: #eee;
    border-color: #666;
}
.tg-container.tg-dark-mode button {
    background: #006799;
}
.tg-container.tg-dark-mode button:hover {
    background: #005f8f;
}
.tg-container.tg-dark-mode .tg-reroll-prog {
    background: transparent;
}
.tg-container.tg-dark-mode #tg-output-summary {
    background: #333;
    border-color: #555;
}
.tg-container.tg-dark-mode .tg-degrees {
    color: #bbb;
}
.tg-container.tg-dark-mode .tg-chords {
    color: #fff;
}
.tg-container.tg-dark-mode .tg-roman {
    color: #ccc;
}
.tg-container.tg-dark-mode .tg-chord-popup {
    background: #333;
    border-color: #555;
    color: #eee;
}
.tg-container.tg-dark-mode .tg-about {
    color: #ccc;
}

.tg-container.tg-dark-mode .slot {
    background: #444;
    border-color: #666;
}

