/* Misc molecules — AssetSlot, BlockStub, QueuedNotice, MarkdownActions,
 * ZoomImage. Specs: component-specs/{asset-slot,block-stub,queued-notice,
 * markdown-actions,zoom-image}.md */

/* ---------- AssetSlot ---------- */
.asset-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 250px;
    text-align: center;
    padding: 24px;
    border: var(--border-hairline) dashed var(--border-interactive);
    border-radius: 8px;
}

.asset-slot-label {
    font-size: var(--text-micro-size);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-quaternary);
}

.asset-slot-description {
    font-size: var(--text-small-size);
    color: var(--text-tertiary);
    max-width: 32ch;
}

/* ---------- BlockStub ---------- */
.block-stub {
    border: var(--border-hairline) solid #ffffff12;
    border-radius: 8px;
    background: #ffffff0f;
    padding: 20px;
}

[data-theme='light'] .block-stub {
    border-color: #0000000f;
    background: #00000008;
}

.block-stub-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.block-stub-tag {
    font-size: var(--text-micro-size);
    font-weight: var(--font-weight-medium);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.block-stub-dnum {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    color: var(--text-tertiary);
    border: var(--border-hairline) solid #ffffff12;
    border-radius: 3px;
}

[data-theme='light'] .block-stub-dnum {
    border-color: #0000000f;
}

.block-stub-title {
    font-size: var(--text-mini-size);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.block-stub-body {
    font-size: var(--text-small-size);
    line-height: var(--text-small-line-height);
    color: var(--text-secondary);
}

.block-stub-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 250px;
    padding: 24px;
    border: var(--border-hairline) solid var(--border-default);
    border-radius: 12px;
    background-color: var(--surface-canvas);
    text-align: center;
}

.block-stub-diagram-label {
    font-size: var(--text-micro-size);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.block-stub-diagram-desc {
    max-width: 54ch;
    margin: 0;
    font-size: var(--text-small-size);
    font-weight: var(--font-weight-normal);
    line-height: var(--text-small-line-height);
    color: var(--text-tertiary);
    text-wrap: pretty;
}

/* ---------- QueuedNotice ---------- */
.queued-notice {
    border: var(--border-hairline) dashed #ffffff12;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: var(--text-small-size);
    line-height: var(--text-small-line-height);
    font-style: italic;
    color: var(--text-tertiary);
}

[data-theme='light'] .queued-notice {
    border-color: #0000000f;
}

/* ---------- MarkdownActions ---------- */
.markdown-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-block: 0 24px;
}

/* ---------- ZoomImage ---------- */
.zoom-image {
    margin: 0;
}

.zoom-image-wrapper {
    display: block;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    line-height: 0;
}

.zoom-image-img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

.zoom-image-caption {
    margin-top: 13px;
    text-align: center;
    font-size: 0.6875rem;
    color: var(--text-tertiary);
}

.zoom-image-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-settings-modal) - 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: #000000d9;
    animation: zoom-image-fade-in 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme='light'] .zoom-image-overlay {
    background: #ffffffa6;
}

.zoom-image-lightbox {
    position: relative;
    z-index: var(--z-settings-modal);
    max-width: 100%;
    max-height: 100%;
    cursor: zoom-out;
    animation: zoom-image-scale-in 0.175s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.zoom-image-zoomed {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 64px);
    width: auto;
    height: auto;
    border-radius: 8px;
}

.zoom-image-close {
    position: absolute;
    top: -40px;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--stone-875);
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.1s ease;
}

[data-theme='light'] .zoom-image-close {
    background: var(--stone-150);
}

@media (any-hover: hover) {
    .zoom-image-close:hover {
        background: var(--stone-850);
    }

    [data-theme='light'] .zoom-image-close:hover {
        background: var(--stone-150);
    }
}

@keyframes zoom-image-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoom-image-scale-in {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
