/* Scoped veneer sample card and original-texture viewer. */
.sp-texture {
    box-sizing: border-box;
    appearance: none;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid var(--gray-border, #e3e3e3);
    border-radius: 12px;
    background: var(--white, #fff);
    color: var(--black, #171717);
    font: inherit;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.sp-texture:hover { border-color: var(--red, #e61408); background: #fdfbfa; }
.sp-texture:focus-visible,
.sp-texture-dialog button:focus-visible,
.sp-texture-dialog a:focus-visible { outline: 2px solid var(--red, #e61408); outline-offset: 4px; }
.sp-texture__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 72px;
    overflow: hidden;
    border-radius: 4px;
    background: #f4f3f1;
}
.sp-texture .sp-texture__preview img {
    display: block;
    flex: 0 0 auto;
    width: 44px;
    height: 72px;
    max-width: none;
    margin: 0;
    object-fit: contain;
}
.sp-texture__copy { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.sp-texture__label { color: var(--gray-text, #6b6b6b); font-size: 12px; font-weight: 400; }
.sp-texture__name { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.sp-texture__action { color: var(--red, #e61408); font-size: 12px; font-weight: 500; }
.sp-texture__expand { display: block; flex: 0 0 22px; width: 22px; height: 22px; color: var(--gray-text, #6b6b6b); }
html.sp-texture-open,
html.sp-texture-open body { overflow: hidden; }
.sp-texture-dialog {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    width: min(960px, calc(100vw - 48px));
    max-width: none;
    height: min(960px, calc(100vh - 48px));
    height: min(960px, calc(100dvh - 48px));
    max-height: none;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: var(--white, #fff);
    color: var(--black, #171717);
    font-family: "Onest", sans-serif;
    line-height: 1.4;
    overflow: hidden;
    box-shadow: 0 16px 70px rgb(0 0 0 / .2);
}
.sp-texture-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.sp-texture-dialog::backdrop { background: rgb(0 0 0 / .62); }
.sp-texture-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; }
.sp-texture-dialog__eyebrow { margin: 0 0 3px; color: var(--gray-text, #6b6b6b); font-size: 13px; }
.sp-texture-dialog .sp-texture-dialog__title { margin: 0; color: var(--black, #171717); font-size: 22px; line-height: 1.25; font-weight: 500; overflow-wrap: anywhere; }
.sp-texture-dialog__close {
    appearance: none;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--gray-border, #e3e3e3);
    border-radius: 50%;
    background: #fff;
    color: var(--black, #171717);
    cursor: pointer;
}
.sp-texture-dialog__close:hover { border-color: var(--red, #e61408); color: var(--red, #e61408); }
.sp-texture-dialog__close svg { display: block; width: 20px; height: 20px; }
.sp-texture-dialog__body { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; margin: 0 24px; padding: 12px; background: #f4f3f1; overflow: hidden; border-radius: 8px; }
.sp-texture-dialog .sp-texture-dialog__image { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; object-fit: contain; }
.sp-texture-dialog .sp-texture-dialog__image[hidden],
.sp-texture-dialog .sp-texture-dialog__status[hidden] { display: none; }
.sp-texture-dialog__status { margin: 0; padding: 24px; color: var(--gray-text, #6b6b6b); text-align: center; font-size: 15px; }
.sp-texture-dialog__footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 24px 22px; }
.sp-texture-dialog__note { color: var(--gray-text, #6b6b6b); font-size: 13px; }
.sp-texture-dialog .sp-texture-dialog__download { display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; min-height: 44px; padding: 10px 18px; border: 1px solid var(--red, #e61408); border-radius: 10px; background: var(--red, #e61408); color: #fff; font-size: 14px; font-weight: 500; line-height: 1.3; text-decoration: none; text-align: center; }
.sp-texture-dialog__download svg { display: block; flex: 0 0 18px; width: 18px; height: 18px; }
@media (max-width: 720px) {
    .sp-texture { padding: 12px; gap: 12px; }
    .sp-texture-dialog { width: calc(100vw - 24px); height: calc(100vh - 32px); height: calc(100dvh - 32px); border-radius: 14px; }
    .sp-texture-dialog__header { gap: 12px; padding: 16px; }
    .sp-texture-dialog .sp-texture-dialog__title { font-size: 18px; }
    .sp-texture-dialog__body { margin: 0 16px; padding: 8px; }
    .sp-texture-dialog__footer { align-items: stretch; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }
    .sp-texture-dialog__note { text-align: center; font-size: 12px; }
}
