240 lines
4.0 KiB
CSS
240 lines
4.0 KiB
CSS
.wrapper {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
width: 100%;
|
|
}
|
|
|
|
.uploadZone {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
box-sizing: border-box;
|
|
min-height: 0;
|
|
border: 2px dashed var(--primary);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--surface);
|
|
color: var(--text-secondary);
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
transition: border-color 0.2s, background 0.2s;
|
|
}
|
|
|
|
.uploadZone:hover {
|
|
border-color: var(--primary);
|
|
background: rgba(var(--primary-rgb) / 0.04);
|
|
color: var(--primary);
|
|
}
|
|
|
|
.hint {
|
|
font-size: 12px;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.preview {
|
|
position: relative;
|
|
min-height: 0;
|
|
border-radius: var(--radius-sm);
|
|
overflow: hidden;
|
|
flex-shrink: 0;
|
|
border: 1px solid var(--glass-border);
|
|
background:
|
|
linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
|
|
linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
|
|
linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
|
|
linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
|
|
background-size: 16px 16px;
|
|
background-position: 0 0, 0 8px, 8px -8px, -8px 0;
|
|
}
|
|
|
|
.previewImg {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
}
|
|
|
|
.previewImgNatural {
|
|
width: 100%;
|
|
height: auto;
|
|
display: block;
|
|
}
|
|
|
|
.removeBtn {
|
|
position: absolute;
|
|
top: 8px;
|
|
right: 8px;
|
|
width: 28px;
|
|
height: 28px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50%;
|
|
background: rgba(15, 23, 42, 0.6);
|
|
color: white;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.removeBtn:hover {
|
|
background: #ef4444;
|
|
}
|
|
|
|
.cropPanel {
|
|
width: fit-content;
|
|
max-width: 100%;
|
|
margin-inline: auto;
|
|
align-self: center;
|
|
border: 1px solid var(--glass-border);
|
|
border-radius: var(--radius-sm);
|
|
overflow: hidden;
|
|
background: var(--surface);
|
|
}
|
|
|
|
.cropArea {
|
|
position: relative;
|
|
min-height: 0;
|
|
background: #1e293b;
|
|
}
|
|
|
|
.cropControls {
|
|
padding: 14px 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.zoomLabel {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
font-size: 13px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.zoomLabel input {
|
|
flex: 1;
|
|
accent-color: var(--primary);
|
|
}
|
|
|
|
.cropActions {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 8px;
|
|
}
|
|
|
|
.cancelBtn {
|
|
padding: 8px 14px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--text-secondary);
|
|
border-radius: 8px;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.cancelBtn:hover {
|
|
background: rgba(148, 163, 184, 0.15);
|
|
}
|
|
|
|
.applyBtn {
|
|
padding: 8px 16px;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: white;
|
|
background: var(--primary);
|
|
border-radius: 8px;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.applyBtn:hover {
|
|
background: var(--primary-dark);
|
|
}
|
|
|
|
.applyBtn:disabled {
|
|
opacity: 0.55;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.changeBtn {
|
|
display: inline-flex;
|
|
align-self: center;
|
|
padding: 8px 14px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--primary);
|
|
border: 1px solid rgba(var(--primary-rgb) / 0.3);
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.changeBtn:hover {
|
|
background: rgba(var(--primary-rgb) / 0.08);
|
|
}
|
|
|
|
.compact .preview,
|
|
.compact .uploadZone,
|
|
.compact .cropArea {
|
|
width: 100%;
|
|
}
|
|
|
|
.compact .cropPanel {
|
|
width: 100%;
|
|
max-width: none;
|
|
margin-inline: 0;
|
|
align-self: stretch;
|
|
}
|
|
|
|
.compact .uploadZone {
|
|
gap: 4px;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.compact .hint {
|
|
font-size: 10px;
|
|
text-align: center;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.compact .cropControls {
|
|
padding: 10px;
|
|
gap: 10px;
|
|
}
|
|
|
|
.compact .zoomLabel {
|
|
gap: 8px;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.compact .cropActions {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: 6px;
|
|
}
|
|
|
|
.compact .cancelBtn,
|
|
.compact .applyBtn {
|
|
width: 100%;
|
|
justify-content: center;
|
|
text-align: center;
|
|
box-sizing: border-box;
|
|
padding: 8px 10px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.compact .changeBtn {
|
|
display: flex;
|
|
align-self: stretch;
|
|
justify-content: center;
|
|
padding: 6px 10px;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.compact .removeBtn {
|
|
top: 4px;
|
|
right: 4px;
|
|
width: 22px;
|
|
height: 22px;
|
|
}
|