/* Looks sit on the original Tailwind card. Do not restyle the calculator. */

.fx {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.fx.is-off {
    display: none;
}

body > .container {
    position: relative;
    z-index: 1;
}

.look-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.look-menu {
    position: relative;
}

.look-toggle {
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 0;
    border-radius: 0.5rem;
    background: #e5e7eb;
    color: #1f2937;
    font-size: 0.875rem;
    line-height: 1.25;
    cursor: pointer;
}

html.dark .look-toggle {
    background: #374151;
    color: #f3f4f6;
}

.look-list {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 30;
    min-width: 8.5rem;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

html.dark .look-list {
    border-color: #4b5563;
    background: #1f2937;
}

.look-list[hidden] {
    display: none;
}

.look-list button {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 0;
    background: transparent;
    color: #1f2937;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
}

html.dark .look-list button {
    color: #e5e7eb;
}

.look-list button[aria-selected="true"] {
    background: #2563eb;
    color: #ffffff;
}

.look-list button:hover,
.look-list button:focus-visible {
    background: #dbeafe;
    color: #1e3a8a;
    outline: none;
}

html.dark .look-list button:hover,
html.dark .look-list button:focus-visible {
    background: #1e3a8a;
    color: #dbeafe;
}

html.dark .look-list button[aria-selected="true"] {
    background: #3b82f6;
    color: #ffffff;
}

html.look-tetris:not(.dark) body {
    background-color: #7a9a2e !important;
    background-image:
        linear-gradient(rgba(20, 40, 16, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 40, 16, 0.14) 1px, transparent 1px);
        background-size: 32px 32px;
}

html.look-tetris.dark body {
    background-color: #0a0a12 !important;
    background-image:
        linear-gradient(rgba(42, 42, 72, 0.55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 42, 72, 0.55) 1px, transparent 1px);
    background-size: 32px 32px;
}

html.look-matrix body {
    background-color: #010301 !important;
}

html.look-tetris .bud-card,
html.look-matrix .bud-card {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

html.look-tetris:not(.dark) .bud-card {
    background-color: rgba(255, 255, 255, 0.58) !important;
}

html.look-tetris.dark .bud-card {
    background-color: rgba(17, 24, 39, 0.48) !important;
}

html.look-matrix .bud-card {
    background-color: rgba(2, 12, 4, 0.38) !important;
    box-shadow: 0 12px 40px rgb(0 0 0 / 0.45);
}

html.look-matrix .bud-card label,
html.look-matrix .bud-card h2,
html.look-matrix .bud-card p,
html.look-matrix .history-item {
    color: #e7f5e7 !important;
}

html.look-tetris:not(.dark) .bud-card input,
html.look-tetris:not(.dark) .bud-card #result,
html.look-tetris:not(.dark) .history-item {
    background-color: rgba(255, 255, 255, 0.55) !important;
}

html.look-tetris.dark .bud-card input,
html.look-tetris.dark .bud-card #result,
html.look-tetris.dark .history-item {
    background-color: rgba(31, 41, 55, 0.42) !important;
}

html.look-matrix .bud-card input,
html.look-matrix .bud-card #result,
html.look-matrix .history-item {
    background-color: rgba(4, 20, 8, 0.38) !important;
    border-color: rgba(46, 160, 67, 0.35);
    color: #e8ffe8 !important;
}

html.play-tetris .bud-card {
    background-color: rgba(255, 255, 255, 0.4) !important;
}

html.dark.play-tetris .bud-card {
    background-color: rgba(17, 24, 39, 0.34) !important;
}

.tet-pad {
    position: fixed;
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
}

.tet-pad[hidden] {
    display: none;
}

.tet-pad__play,
.tet-pad__btn {
    border: 3px solid #142414;
    background: #f8fafc;
    color: #142414;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    cursor: pointer;
    touch-action: manipulation;
}

html.dark .tet-pad__play,
html.dark .tet-pad__btn {
    border-color: #f4f4ff;
    background: #141422;
    color: #f4f4ff;
}

.tet-pad__play {
    min-height: 2.5rem;
    padding: 0 0.9rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tet-pad__stick {
    display: grid;
    grid-template-columns: 48px 48px 48px;
    grid-template-rows: 48px 48px 48px;
    gap: 0.2rem;
}

.tet-pad__stick[hidden] {
    display: none;
}

.tet-pad__btn {
    width: 48px;
    height: 48px;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
}

.tet-pad__btn[data-tet="rotate"] { grid-column: 2; grid-row: 1; }
.tet-pad__btn[data-tet="left"] { grid-column: 1; grid-row: 2; }
.tet-pad__btn[data-tet="right"] { grid-column: 3; grid-row: 2; }
.tet-pad__btn[data-tet="down"] { grid-column: 2; grid-row: 3; }

.tet-pad__play:hover,
.tet-pad__play:focus-visible,
.tet-pad__btn:hover,
.tet-pad__btn:focus-visible,
.tet-pad__btn:active {
    background: #2f5c22;
    color: #f8fafc;
    outline: none;
}

html.dark .tet-pad__play:hover,
html.dark .tet-pad__play:focus-visible,
html.dark .tet-pad__btn:hover,
html.dark .tet-pad__btn:focus-visible,
html.dark .tet-pad__btn:active {
    background: #00f0f0;
    color: #0a0a12;
}
