/* Styles used by a single page. */

/* Home */
.sh-hero.mud-paper {
    padding: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 32px;
}

.sh-hero-text {
    flex: 7 1 480px;
    justify-content: center;
}

.sh-hero-title.mud-typography {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.sh-hero-lead.mud-typography {
    font-size: 18px;
    line-height: 1.6;
}

.sh-hero-side.mud-paper {
    flex: 5 1 320px;
    padding: 32px;
    border-radius: var(--sh-radius-lg);
    background: var(--sh-raised);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.sh-hero-logo {
    max-width: 100%;
    margin-bottom: 8px;
}

.sh-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 24px;
}

.sh-feature-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}

.sh-feature.mud-paper {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sh-eyebrow.mud-typography {
    font-weight: 600;
    font-size: 13px;
}

.sh-focus-icon.mud-avatar {
    background: var(--sh-raised);
    color: var(--mud-palette-primary);
    border-radius: var(--sh-radius-sm);
}

/* Login, Register */
.sh-auth-card.mud-paper {
    max-width: 440px;
    margin: 0 auto;
    padding: 32px;
    border-radius: var(--sh-radius-lg);
    background: var(--mud-palette-surface);
}

/* Profile */
.sh-profile-card.mud-paper {
    flex: 0 1 260px;
    box-sizing: border-box;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sh-profile-main {
    flex: 1 1 480px;
    min-width: 0;
}

@media (max-width: 599px) {
    .sh-profile-card.mud-paper {
        flex-basis: 100%;
    }
}

.sh-profile-card .sh-image-edit-button.mud-button-root {
    right: 0;
    bottom: 0;
    box-shadow: 0 0 0 4px var(--mud-palette-surface);
}

.sh-password-mask.mud-typography {
    letter-spacing: 0.15em;
}

/* Lobby */
.sh-join-code {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.sh-player-bar.mud-progress-linear {
    width: 56px;
    flex: none;
}

/* Save data */
.sh-key.mud-typography {
    font-size: 14px;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.sh-value-preview.mud-typography {
    color: var(--mud-palette-text-disabled);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Content */
.sh-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.sh-file-card.mud-card {
    border-radius: var(--sh-radius-lg);
    cursor: pointer;
    background: var(--mud-palette-surface);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sh-file-preview {
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sh-file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sh-file-tile.mud-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--sh-radius);
    color: var(--sh-on-tile);
}

.sh-file-tile.mud-avatar .mud-icon-root {
    font-size: 24px;
}

.sh-file-tile-sm.mud-avatar {
    border-radius: var(--sh-radius-sm);
    color: var(--sh-on-tile);
}

.sh-file-body.mud-card-content {
    padding: 8px 10px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sh-file-name.mud-typography {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sh-file-card-open.mud-card {
    box-shadow: inset 0 0 0 2px var(--mud-palette-primary);
}

.sh-file-actions,
.sh-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.sh-file-actions {
    padding: 0 2px 2px;
}

.sh-file-preview-panel {
    border-radius: var(--sh-radius);
    overflow: hidden;
}

@media (max-width: 599px) {
    .sh-hero.mud-paper {
        padding: 24px;
    }
}

/* Apps */
.sh-sort-select.mud-input-control {
    width: 180px;
    flex: none;
    margin: 0;
}

.sh-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 8px;
}

.sh-app-card.mud-paper {
    position: relative;
    padding: 8px 6px 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sh-app-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sh-app-card.mud-paper:hover {
    background: var(--sh-raised);
}

/* The name link covers the whole card; the star sits above it. */
.sh-app-card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.sh-app-card .sh-meta {
    position: relative;
    z-index: 1;
    width: fit-content;
}

.sh-app-card-head {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.sh-app-card-link {
    flex: 1;
    min-width: 0;
}

.sh-app-card-star {
    position: relative;
    z-index: 1;
}

/* Quick access */
.sh-fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 8px;
}

.sh-fav-card.mud-paper {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sh-live-note.mud-typography::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 4px;
    background: var(--mud-palette-success);
}

/* Link headset account */
.sh-link-code .mud-input > input.mud-input-root {
    font-family: var(--sh-font-mono);
    font-size: 22px;
    letter-spacing: 0.3em;
    text-align: center;
}

/* Streams */
.sh-muted { color: var(--mud-palette-text-secondary); }
.sh-flex-fill { flex: 1 1 0; min-width: 0; }

.sh-session-backdrop { position: fixed; inset: 0; z-index: calc(var(--mud-zindex-popover) - 1); }

.sh-display-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sh-display-card { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: var(--sh-radius-lg); }
.sh-display-preview {
    position: relative; aspect-ratio: 16 / 9; border-radius: var(--sh-radius-sm); background: var(--sh-raised);
    display: flex; align-items: center; justify-content: center;
}
.sh-display-icon { font-size: 32px !important; color: var(--sh-hover); }
.sh-display-plate {
    position: absolute; left: 8px; bottom: 8px; height: 24px; padding: 0 8px; border-radius: var(--sh-radius-sm);
    background: rgba(2, 6, 23, 0.8); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.sh-display-foot { min-height: 36px; padding: 0 4px; }

.sh-watch-frame {
    position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--sh-radius-lg); overflow: hidden; background: #000;
}
.sh-room { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.sh-room-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.sh-room-stage { padding: 6px; border-radius: var(--sh-radius-lg); }
.sh-room-table .mud-table-cell { padding-left: 16px; padding-right: 16px; }
.sh-room-side { flex: 0 1 360px; min-width: 300px; display: flex; flex-direction: column; gap: 12px; }
.sh-player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--sh-radius); overflow: hidden; background: #000; }
.sh-player-controls {
    position: absolute; right: 12px; bottom: 12px; padding: 4px; border-radius: var(--sh-radius); display: flex; align-items: center; gap: 2px;
    background: rgba(30, 41, 59, 0.85); backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.15s;
}
.sh-player:hover .sh-player-controls, .sh-player:focus-within .sh-player-controls { opacity: 1; }
.sh-player-controls .mud-icon-button { color: #f1f5f9; border-radius: var(--sh-radius-sm); }
.sh-player-controls .mud-icon-button:hover { background: var(--sh-control); }
.sh-player-controls .mud-icon-button:disabled { color: rgba(241, 245, 249, 0.35); background: none; }
.sh-player-volume {
    -webkit-appearance: none; appearance: none; width: 84px; height: 3px; margin: 0 10px 0 4px; border-radius: 2px; cursor: pointer;
    background: linear-gradient(to right, #f1f5f9 var(--level), var(--sh-hover) var(--level));
}
.sh-player-volume::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }
.sh-player-volume::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }
.sh-player-volume:disabled { cursor: default; background: var(--sh-control); }
.sh-player-volume:disabled::-webkit-slider-thumb { background: var(--sh-hover); }
.sh-player-volume:disabled::-moz-range-thumb { background: var(--sh-hover); }
.sh-room-mine.mud-paper { padding: 10px 10px 10px 12px; display: flex; align-items: center; gap: 8px; }
.sh-room-select { width: 110px; flex: none; }
.sh-room-thumb {
    width: 80px; height: 45px; border-radius: var(--sh-radius-sm); background: var(--sh-raised);
    display: inline-flex; align-items: center; justify-content: center; color: var(--mud-palette-text-secondary);
}
.sh-display-select { width: 240px; }
.sh-cast { position: relative; }
.sh-cast-pop { width: 340px; max-width: calc(100vw - 32px); padding: 6px; margin-top: 4px; }
.sh-room-display {
    width: 100%; min-height: 44px; box-sizing: border-box; padding: 4px 4px 4px 8px; border-radius: var(--sh-radius-sm);
    display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.sh-room-display:hover { background: var(--sh-control); }
.sh-avatar-stack { display: inline-flex; }
.sh-avatar-stack > * { margin-left: -6px; box-shadow: 0 0 0 2px var(--mud-palette-surface); border-radius: 50%; }
.sh-avatar-stack > *:first-child { margin-left: 0; }
.sh-detail-scroll { max-height: 320px; overflow-y: auto; }
.sh-watch-video { width: 100%; height: 100%; object-fit: contain; display: block; }
.sh-watch-overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    color: var(--mud-palette-text-secondary);
}
