/* Label designs gallery + trash */

.label-designs-page {
    padding: 1rem 1.5rem;
}

.label-designs-header {
    margin-bottom: 1rem;
}

.label-designs-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: #6b6b74;
}

.label-designs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.label-design-card {
    background: var(--blue-gray);
    box-shadow: var(--soft-continer-outer-shadow);
    border: none;
    border-radius: 1.5rem;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.label-design-card-body {
    margin-top: auto;
}

.label-design-card-thumbnail {
    border-radius: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    min-height: 7rem;
    flex: 1;
}

.label-design-card-thumbnail img {
    max-width: 100%;
    max-height: 9rem;
    border: none;
    border-radius: 0.75rem;
    box-shadow: var(--continer-outer-shadow);
    background: #ffffff;
}

.label-design-card-placeholder {
    width: 95%;
    max-height: 9rem;
    box-shadow: var(--continer-outer-shadow);
    border-radius: 0.75rem;
    background: #ffffff;
}

.label-design-card-name {
    font-weight: 650;
    display: block;
}

.label-design-card-meta {
    display: block;
    font-size: 0.8rem;
    color: #6b6b74;
}

.label-designs-size-warning {
    font-size: 0.8rem;
    color: #6b6b74;
    margin: 0;
}

/* Print-function chip: rides inline with the media size on gallery cards. */
.label-design-card-flag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.5rem;
    border-radius: 1rem;
    background: var(--deep-background-color);
    box-shadow: var(--container-inner-shadow);
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: var(--light-global-font-color);
    white-space: nowrap;
}

/* Designer */

.label-designer {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 6.1rem);
    min-height: 30rem;
    margin-top: 1rem;
    border-radius: 1rem;
}

.label-designer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.label-designer-name {
    font-size: 1rem;
    font-weight: 650;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    padding: 0.25rem 0.4rem;
    min-width: 14rem;
    background: transparent;
}

.label-designer-media-badge {
    font-size: 0.8rem;
    color: #6b6b74;
    white-space: nowrap;
}

.label-designer-zoom {
    font-size: 0.8rem;
    color: #6b6b74;
    min-width: 3rem;
    text-align: center;
}

.label-designer-body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 0.5rem;
}

.label-design-card-actions {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.label-design-card-actions nb-button::part(button) {
    height: 2rem;
}

.label-designer-canvas-wrap {
    flex: 1 1 auto;
    overflow: auto;
    background: var(--deep-background-color);
    box-shadow: var(--container-inner-shadow);
    display: flex;
    border-radius: 1rem;
}

.label-designer-canvas-wrap canvas {
    margin: auto;
    outline: none;
    touch-action: none;
}

.label-designer-inspector {
    width: 300px;
    flex: 0 0 auto;
    border-left: 1px solid #e2e0dc;
    padding: 0.25rem 0.75rem;
    overflow-y: auto;
}

.label-designer-inspector sl-input::part(form-control) {
    height: fit-content;
}
.label-designer-inspector sl-input::part(base) {
    height: 2rem;
}
.label-designer-inspector sl-select::part(combobox) {
    padding-inline: 0;
    padding: 0.25rem 1rem;
    min-height: 2rem;
}

.label-designer-inspector-hint {
    font-size: 0.85rem;
    color: #6b6b74;
}

.ld-section {
    margin-bottom: 1rem;
}

.ld-section h4 {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b6b74;
}

.ld-field-grid {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 0.4rem 0.6rem;
}

.ld-field-grid label,
.ld-field {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: var(--light-global-font-color);
    gap: 0.15rem;
}

.ld-field-grid input,
.ld-field-grid select,
.ld-field textarea {
    border: 1px solid #d9d6d1;
    border-radius: 0.25rem;
    padding: 0.3rem 0.4rem;
    font-size: 0.85rem;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.ld-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Data palette: one chip per contract field; clicking arms placement on the canvas. */
.ld-data-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ld-data-field {
    border: none;
    border-radius: 1rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 650;
    font-family: inherit;
    color: var(--light-global-font-color);
    background: var(--deep-background-color);
    box-shadow: var(--soft-continer-outer-shadow);
    cursor: pointer;
}

.ld-data-field:hover {
    color: #2563eb;
}

/* Armed = the next canvas drag places this field; mirrors the selection accent. */
.ld-data-field.armed {
    color: #ffffff;
    background: #2563eb;
    box-shadow: var(--container-inner-shadow);
}

/* Print dialog: design picker cards (radio-like buttons, one selected at a time). */

.lp-design-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 0.6rem;
    max-height: 18rem;
    overflow-y: auto;
    padding: 0.25rem;
}

.lp-design-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem;
    border: 2px solid transparent;
    border-radius: 0.9rem;
    background: var(--blue-gray);
    box-shadow: var(--soft-continer-outer-shadow);
    font-family: inherit;
    cursor: pointer;
    text-align: center;
}

.lp-design-card img,
.lp-design-placeholder {
    max-width: 100%;
    max-height: 5.5rem;
    width: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    background: #ffffff;
    box-shadow: var(--continer-outer-shadow);
}

.lp-design-card.selected {
    border-color: #2563eb;
}

.lp-design-name {
    font-size: 0.85rem;
    font-weight: 650;
}

.lp-design-size {
    font-size: 0.75rem;
    color: #6b6b74;
}
