impress/app/assets/stylesheets/outfits/new_v2.css

547 lines
No EOL
10 KiB
CSS

@import "../application/item-badges.css";
body.wardrobe-v2 {
margin: 0;
padding: 0;
height: 100vh;
overflow: hidden;
font-family: sans-serif;
}
.wardrobe-container {
display: flex;
height: 100vh;
background: #000;
@media (max-width: 800px) {
flex-direction: column;
}
}
.outfit-preview-section {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
background: #000;
position: relative;
min-height: 400px;
outfit-viewer {
width: 600px;
height: 600px;
max-width: min(100%, 100cqh);
max-height: min(100%, 100cqw);
aspect-ratio: 1;
container-type: size;
}
.no-preview-message {
color: white;
text-align: center;
padding: 2rem;
font-size: 1.2rem;
}
/* Species/color picker floats over the preview at the bottom */
species-color-picker {
position: absolute;
bottom: 0;
left: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 1.5rem;
pointer-events: none;
/* Allow clicks through when hidden */
/* Start hidden, reveal on hover or focus */
opacity: 0;
transition: opacity 0.2s;
form {
pointer-events: auto;
/* Re-enable clicks on the form itself */
}
select {
padding: 0.5rem 2rem 0.5rem 0.75rem;
font-size: 1rem;
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 0.375rem;
background: rgba(0, 0, 0, 0.7);
color: white;
cursor: pointer;
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
background-position: right 0.5rem center;
background-repeat: no-repeat;
background-size: 1.5em 1.5em;
&:hover {
background-color: rgba(0, 0, 0, 0.8);
border-color: rgba(255, 255, 255, 0.5);
}
&:focus {
outline: none;
border-color: rgba(255, 255, 255, 0.8);
box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}
option {
background: #2D3748;
color: white;
}
}
/* Submit button: progressive enhancement pattern */
/* If JS is disabled, the button is always visible */
/* If JS is enabled but slow to load, fade in after 0.75s */
/* Once the web component loads, hide the button completely */
input[type="submit"] {
padding: 0.5rem 1rem;
font-size: 1rem;
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 0.375rem;
background: rgba(0, 0, 0, 0.7);
color: white;
cursor: pointer;
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
&:hover {
background-color: rgba(0, 0, 0, 0.8);
border-color: rgba(255, 255, 255, 0.5);
}
&:focus {
outline: none;
border-color: rgba(255, 255, 255, 0.8);
box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}
}
/* If JS is enabled, hide the submit button initially with a delay */
@media (scripting: enabled) {
input[type="submit"] {
position: absolute;
margin-left: 0.5em;
opacity: 0;
animation: fade-in 0.25s forwards;
animation-delay: 0.75s;
}
}
/* Once auto-loading is ready, hide the submit button completely */
&:state(auto-loading) {
input[type="submit"] {
display: none;
}
}
}
/* Show picker on hover (real hover only, not simulated touch hover) */
@media (hover: hover) {
&:hover species-color-picker {
opacity: 1;
}
}
/* Show picker when it has focus */
&:has(species-color-picker:focus-within) species-color-picker {
opacity: 1;
}
}
.outfit-controls-section {
width: 400px;
background: #fff;
padding: 2rem;
overflow-y: auto;
box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
@media (max-width: 800px) {
width: 100%;
max-height: 40vh;
}
h1 {
margin-top: 0;
font-size: 1.75rem;
color: #448844;
}
h2 {
font-size: 1.25rem;
color: #448844;
margin-top: 2rem;
}
}
.current-selection {
padding: 1rem;
background: #f0f0f0;
border-radius: 4px;
margin: 1rem 0;
p {
margin: 0;
color: #666;
}
strong {
color: #000;
}
}
.worn-items {
margin-top: 2rem;
.items-list {
list-style: none;
padding: 0;
margin: 0.5rem 0;
}
.item-card {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem;
background: #f9f9f9;
margin-bottom: 0.5rem;
border-radius: 8px;
color: #333;
transition: background 0.2s, box-shadow 0.2s;
position: relative;
&:hover {
background: #f0f0f0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
&:hover .item-remove-button {
opacity: 1;
}
}
.item-thumbnail {
flex-shrink: 0;
width: 50px;
height: 50px;
border-radius: 6px;
overflow: hidden;
background: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
img {
width: 100%;
height: 100%;
object-fit: contain;
display: block;
}
}
.item-info {
flex: 1;
min-width: 0;
/* Allow text to truncate */
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.item-name {
font-weight: 500;
color: #2D3748;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-badges {
display: flex;
gap: 0.375rem;
flex-wrap: wrap;
}
.item-remove-button {
position: absolute;
top: 0.5rem;
right: 0.5rem;
padding: 0;
margin: 0;
border: none;
background: rgba(255, 255, 255, 0.9);
border-radius: 4px;
cursor: pointer;
font-size: 1rem;
line-height: 1;
width: 1.75rem;
height: 1.75rem;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.2s, background 0.2s, transform 0.1s;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
&:hover {
background: rgba(255, 255, 255, 1);
transform: scale(1.1);
}
&:active {
transform: scale(0.95);
}
&:focus {
opacity: 1;
outline: 2px solid #448844;
outline-offset: 2px;
}
}
}
.item-search-form {
margin-bottom: 1.5rem;
display: flex;
gap: 0.5rem;
input[type="text"] {
flex: 1;
padding: 0.75rem;
font-size: 1rem;
border: 1px solid #ddd;
border-radius: 6px;
background: white;
&:focus {
outline: none;
border-color: #448844;
box-shadow: 0 0 0 3px rgba(68, 136, 68, 0.1);
}
}
input[type="submit"] {
padding: 0.75rem 1.5rem;
font-size: 1rem;
font-weight: 500;
border: none;
border-radius: 6px;
background: #448844;
color: white;
cursor: pointer;
transition: background 0.2s;
&:hover {
background: #357535;
}
&:active {
transform: scale(0.98);
}
&:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(68, 136, 68, 0.3);
}
}
}
.search-results {
.search-results-header {
margin-bottom: 1.5rem;
.back-button {
padding: 0.5rem 1rem;
margin: 0 0 1rem 0;
border: 1px solid #ddd;
border-radius: 6px;
background: white;
color: #448844;
cursor: pointer;
font-size: 0.95rem;
font-weight: 500;
transition: background 0.2s, border-color 0.2s;
&:hover {
background: #f9f9f9;
border-color: #448844;
}
&:focus {
outline: none;
border-color: #448844;
box-shadow: 0 0 0 3px rgba(68, 136, 68, 0.1);
}
}
}
.search-results-list {
list-style: none;
padding: 0;
margin: 1rem 0;
.item-card {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem;
background: #f9f9f9;
margin-bottom: 0.5rem;
border-radius: 8px;
color: #333;
transition: background 0.2s, box-shadow 0.2s;
position: relative;
&:hover {
background: #f0f0f0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
&:hover .item-add-button {
opacity: 1;
}
}
.item-thumbnail {
flex-shrink: 0;
width: 50px;
height: 50px;
border-radius: 6px;
overflow: hidden;
background: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
img {
width: 100%;
height: 100%;
object-fit: contain;
display: block;
}
}
.item-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.item-name {
font-weight: 500;
color: #2D3748;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-badges {
display: flex;
gap: 0.375rem;
flex-wrap: wrap;
}
.item-add-button {
position: absolute;
top: 0.5rem;
right: 0.5rem;
padding: 0;
margin: 0;
border: none;
background: rgba(68, 136, 68, 0.9);
border-radius: 4px;
cursor: pointer;
font-size: 1rem;
line-height: 1;
width: 1.75rem;
height: 1.75rem;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.2s, background 0.2s, transform 0.1s;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
&:hover {
background: rgba(68, 136, 68, 1);
transform: scale(1.1);
}
&:active {
transform: scale(0.95);
}
&:focus {
opacity: 1;
outline: 2px solid #448844;
outline-offset: 2px;
}
}
}
.empty-state {
padding: 2rem;
text-align: center;
color: #666;
}
.pagination {
margin: 1.5rem 0;
display: flex;
justify-content: center;
gap: 0.5rem;
font-size: 0.9rem;
a,
span,
em {
padding: 0.5rem 0.75rem;
border: 1px solid #ddd;
border-radius: 4px;
text-decoration: none;
color: #448844;
background: white;
&:hover {
background: #f9f9f9;
border-color: #448844;
}
}
.current,
em {
background: #448844;
color: white;
border-color: #448844;
font-style: normal;
}
.disabled {
color: #ccc;
cursor: not-allowed;
border-color: #eee;
&:hover {
background: white;
border-color: #eee;
}
}
}
}
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}