.spotify-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: calc(100vw - 2rem);
    padding: 0.45rem 0.75rem;
    overflow: hidden;
    border: 1px solid currentColor;
    border-radius: 9999px;
    color: white;
    font-size: 0.875rem;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spotify-status-menu {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 20;
}

.spotify-status-menu summary {
    list-style: none;
    cursor: pointer;
    font-family: inherit;
}

.spotify-status-menu summary::-webkit-details-marker { display: none; }

.spotify-status.disconnected {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 10;
}

.spotify-status.connected { background-color: rgba(22, 101, 52, 0.85); }
.spotify-status.disconnected { background-color: rgba(153, 27, 27, 0.85); }

.spotify-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    flex: 0 0 auto;
    border-radius: 9999px;
    background-color: currentColor;
}

.spotify-menu {
    position: fixed;
    top: 3.75rem;
    left: 1rem;
    z-index: 10;
    display: flex;
    min-width: 10rem;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.5rem;
    background-color: rgba(30, 30, 30, 0.95);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.35);
}


.spotify-menu a,
.spotify-menu button {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: white;
    cursor: pointer;
    font: inherit;
    text-align: left;
    text-decoration: none;
}

.spotify-menu form { width: 100%; }

.spotify-menu a:hover,
.spotify-menu a:focus,
.spotify-menu button:hover,
.spotify-menu button:focus {
    background-color: rgba(255, 255, 255, 0.15);
    outline: none;
}

.spotify-device {
    position: fixed;
    top: 4rem;
    left: 1rem;
    z-index: 10;
    width: fit-content;
    max-width: calc(100vw - 2rem);
}

.spotify-device-display {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    max-width: calc(100vw - 2rem);
    margin: 0;
    padding: 0.25rem 0.55rem;
    border: 1px solid currentColor;
    border-radius: 9999px;
    background-color: rgba(30, 30, 30, 0.9);
    color: white;
    cursor: pointer;
    font-size: 0.75rem;
}

.spotify-device-dot {
    width: 0.5rem;
    height: 0.5rem;
    flex: 0 0 auto;
    border-radius: 9999px;
    background-color: #ef4444;
}

.spotify-device.is-playing .spotify-device-dot { background-color: #22c55e; }
.spotify-device.no-device .spotify-device-dot { background-color: #ef4444; }
.spotify-device-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spotify-device-state-symbol { color: #f59e0b; font-size: 0.7rem; line-height: 1; }
.spotify-device.is-playing .spotify-device-state-symbol { color: #22c55e; }
.spotify-device-menu {
    display: flex;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    max-width: calc(100vw - 2rem);
    flex-direction: column;
    gap: 0;
    margin-top: 0.25rem;
    padding: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.5rem;
    background-color: rgba(30, 30, 30, 0.95);
}
.spotify-device-menu[hidden] { display: none; }
.spotify-device-list { display: flex; flex-direction: column; gap: 0.1rem; }
.spotify-device-menu button {
    margin: 0;
    padding: 0.25rem 0.4rem;
    border: 0;
    border-radius: 0.25rem;
    background: transparent;
    color: white;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.spotify-device-menu button:hover,
.spotify-device-menu button:focus { background-color: rgba(255, 255, 255, 0.15); }
.spotify-device-controls { display: flex; width: fit-content; gap: 0.1rem; margin: 0 auto; padding-top: 0.2rem; }
.spotify-device.has-devices .spotify-device-controls { border-top: 1px solid rgba(255,255,255,0.2); }
.spotify-device-controls button { flex: 0 0 auto; min-width: 2rem; font-size: 1.1rem; }
.spotify-playback-icon {
    background-color: transparent !important;
    color: white;
}
.spotify-playback-icon:active { color: rgb(167, 161, 161); }
.spotify-device-error { margin: 0; color: #f87171; font-size: 0.8rem; }
