Files
dashboards/components/WebsiteImagesPage.module.css

585 lines
9.1 KiB
CSS

.page {
display: flex;
flex-direction: column;
gap: 16px;
width: 100%;
padding-bottom: 40px;
}
.head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
padding: 22px 28px;
border-radius: 5px;
background-color: var(--color-card);
background-image: var(--page-title-pattern);
background-size: var(--page-title-pattern-size);
}
.title {
margin: 0;
font-size: 18px;
font-weight: 400;
letter-spacing: 0.18em;
text-transform: uppercase;
}
.lead {
margin: 6px 0 0;
font-size: 13px;
font-weight: 400;
color: var(--color-soft);
}
.headActions {
display: flex;
align-items: center;
gap: 10px;
}
.status {
font-size: 12px;
font-weight: 400;
color: var(--color-soft);
}
.statusError {
color: #8a1f11;
}
.statusOk {
color: #1f6b3a;
}
.section {
background: var(--color-white);
border-radius: 5px;
padding: 22px 24px;
display: flex;
flex-direction: column;
gap: 14px;
}
.sectionHead {
display: flex;
flex-direction: column;
gap: 4px;
}
.sectionTitle {
margin: 0;
font-size: 13px;
font-weight: 400;
letter-spacing: 0.18em;
text-transform: uppercase;
}
.sectionMeta {
margin: 0;
font-size: 12px;
font-weight: 400;
letter-spacing: 0.06em;
color: var(--color-soft);
}
.track {
display: flex;
align-items: flex-start;
gap: 10px;
overflow-x: auto;
padding: 2px 0 8px;
scrollbar-width: thin;
}
.group {
display: flex;
align-items: stretch;
gap: 10px;
flex: 0 0 auto;
}
.groupDivider {
width: 1px;
align-self: stretch;
min-height: 100%;
background: #e4e4e4;
margin: 0 4px;
}
.groupBody {
display: flex;
flex-direction: column;
gap: 8px;
min-width: 0;
}
.groupSize {
margin: 0;
font-size: 11px;
font-weight: 400;
letter-spacing: 0.08em;
color: var(--color-soft);
white-space: nowrap;
}
.groupItems {
display: flex;
align-items: flex-start;
gap: 10px;
}
.cell {
flex: 0 0 auto;
display: flex;
flex-direction: column;
gap: 8px;
min-width: 0;
}
.thumb {
position: relative;
width: 100%;
overflow: hidden;
border: 1px solid #ececec;
border-radius: 5px;
background: #fff;
padding: 0;
cursor: pointer;
}
.thumb img {
width: 100%;
height: 100%;
display: block;
}
/* Checker so transparent product PNGs read clearly in admin. */
.thumbTransparent {
background-color: #f3f3f3;
background-image:
linear-gradient(45deg, #e8e8e8 25%, transparent 25%),
linear-gradient(-45deg, #e8e8e8 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #e8e8e8 75%),
linear-gradient(-45deg, transparent 75%, #e8e8e8 75%);
background-size: 14px 14px;
background-position:
0 0,
0 7px,
7px -7px,
-7px 0;
}
/* Match website product cutouts (categories / hero objects). */
.thumbContain img {
object-fit: contain;
object-position: center;
padding: 6% 8%;
box-sizing: border-box;
}
.thumbCover img {
object-fit: cover;
object-position: center;
}
.thumbEmpty {
display: grid;
place-items: center;
border-style: dashed;
border-color: #d8d8d8;
background: #fff;
color: var(--color-soft);
transition: border-color 0.2s ease, color 0.2s ease;
}
.thumbEmpty:hover,
.thumbEmpty:focus-visible {
border-color: var(--color-black);
color: var(--color-black);
}
.plus {
font-size: 28px;
line-height: 1;
font-weight: 300;
}
.cellCompact {
width: 56px;
align-self: stretch;
}
.thumbCompact {
width: 100%;
min-height: 100%;
aspect-ratio: auto;
}
.footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
min-height: 28px;
}
.cellIndex {
margin: 0;
font-size: 12px;
font-weight: 400;
color: var(--color-muted);
}
.controls {
display: flex;
align-items: center;
gap: 4px;
}
.iconBtn {
width: 30px;
height: 30px;
display: grid;
place-items: center;
border-radius: 3px;
color: var(--color-soft);
transition: background 0.2s ease, color 0.2s ease;
}
.iconBtn svg {
display: block;
width: 16px;
height: 16px;
}
.iconBtn:hover,
.iconBtn:focus-visible {
background: #f6f6f6;
color: var(--color-black);
}
.iconBtnDanger:hover,
.iconBtnDanger:focus-visible {
color: #8a1f11;
}
.loading {
min-height: 220px;
display: grid;
place-items: center;
font-size: 12px;
letter-spacing: 0.18em;
text-transform: uppercase;
color: var(--color-soft);
}
/* Modal */
.overlay {
position: fixed;
inset: 0;
z-index: 80;
display: grid;
place-items: center;
padding: 24px var(--page-pad);
background: rgba(0, 0, 0, 0.28);
}
.modal {
width: min(100%, 560px);
max-height: min(90vh, 780px);
overflow: auto;
border-radius: 5px;
background: var(--color-white);
box-shadow: 24px 28px 48px rgba(0, 0, 0, 0.12);
padding: 28px 28px 24px;
}
.modalHead {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
margin-bottom: 20px;
}
.kicker {
font-size: 11px;
font-weight: 400;
letter-spacing: 0.28em;
text-transform: uppercase;
color: var(--color-soft);
margin-bottom: 8px;
}
.modalTitle {
margin: 0;
font-size: 16px;
font-weight: 400;
letter-spacing: 0.16em;
text-transform: uppercase;
}
.modalHint {
margin: 6px 0 0;
font-size: 12px;
font-weight: 400;
color: var(--color-soft);
}
.closeBtn {
width: 36px;
height: 36px;
display: grid;
place-items: center;
border-radius: 5px;
font-size: 22px;
line-height: 1;
color: var(--color-soft);
}
.closeBtn:hover,
.closeBtn:focus-visible {
background: #f6f6f6;
color: var(--color-black);
}
.form {
display: flex;
flex-direction: column;
gap: 16px;
}
.imageBlock {
display: flex;
flex-direction: column;
gap: 8px;
}
.imageLabelRow {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
}
.imageLabel {
font-size: 11px;
font-weight: 400;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--color-soft);
}
.cropPreviewWrap {
width: min(100%, 360px);
margin: 0 auto;
}
.cropPreview {
width: 100%;
overflow: hidden;
border: 1px solid #ececec;
border-radius: 5px;
background: #fff;
}
.cropPreview img {
width: 100%;
height: 100%;
display: block;
}
.cropPreviewTransparent {
background-color: #f3f3f3;
background-image:
linear-gradient(45deg, #e8e8e8 25%, transparent 25%),
linear-gradient(-45deg, #e8e8e8 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #e8e8e8 75%),
linear-gradient(-45deg, transparent 75%, #e8e8e8 75%);
background-size: 14px 14px;
background-position:
0 0,
0 7px,
7px -7px,
-7px 0;
}
.cropPreviewContain img {
object-fit: contain;
object-position: center;
padding: 6% 8%;
box-sizing: border-box;
}
.cropPreviewCover img {
object-fit: cover;
object-position: center;
}
.changeImage {
margin-top: 8px;
width: 100%;
font-size: 11px;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--color-soft);
}
.changeImage:hover,
.changeImage:focus-visible {
color: var(--color-black);
}
.pickImage {
width: min(100%, 360px);
margin: 0 auto;
display: grid;
place-items: center;
border: 1px dashed #d8d8d8;
border-radius: 5px;
background: #fff;
color: var(--color-soft);
transition: border-color 0.2s ease, color 0.2s ease;
}
.pickImage:hover,
.pickImage:focus-visible {
border-color: var(--color-black);
color: var(--color-black);
}
.pickPlus {
font-size: 36px;
line-height: 1;
font-weight: 300;
}
.pickMeta {
margin-top: 8px;
font-size: 12px;
letter-spacing: 0.08em;
}
.linkRow {
display: flex;
align-items: stretch;
gap: 8px;
}
.linkField {
flex: 1;
min-width: 0;
}
.field {
position: relative;
display: flex;
flex-direction: column;
justify-content: flex-end;
min-height: 46px;
padding: 14px 14px 10px;
border: 1px solid #f0f0f0;
border-radius: 5px;
background: #fff;
transition: border-color 0.25s ease;
}
.field span {
position: absolute;
top: -8px;
left: 12px;
background: #fff;
padding: 0 6px;
font-size: 12px;
font-weight: 400;
color: var(--color-body);
}
.field:focus-within {
border-color: var(--color-black);
}
.field:focus-within span {
color: var(--color-black);
}
.field input,
.field textarea {
border: 0;
outline: 0;
background: transparent;
font: inherit;
font-size: 15px;
font-weight: 400;
width: 100%;
color: var(--color-black);
resize: vertical;
}
.field textarea {
min-height: 72px;
line-height: 1.45;
}
.fileInput {
display: none;
}
.modalError {
margin: 0;
font-size: 12px;
color: #8a1f11;
}
.actions {
display: flex;
justify-content: flex-end;
gap: 12px;
margin-top: 4px;
}
.secondaryBtn,
.primaryBtn {
min-height: 34px;
padding: 0 18px;
font-size: 11px;
letter-spacing: 0.14em;
}
.secondaryBtn {
border-color: #9e9e9e;
color: #9e9e9e;
}
.secondaryBtn:hover,
.secondaryBtn:focus-visible {
border-color: var(--color-black);
color: var(--color-white);
}
.primaryBtn {
min-width: 112px;
}
@media (max-width: 720px) {
.head {
flex-direction: column;
align-items: flex-start;
}
.modal {
padding: 24px 18px 20px;
}
.actions {
flex-direction: column-reverse;
}
.secondaryBtn,
.primaryBtn {
width: 100%;
}
}