/* ============================================================
   View image modal
   ============================================================ */
.view-modal-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* polaroid frame */
.view-modal-polaroid {
    margin: 0;
    background: #fff;
    padding: 8px 8px 0;
    border-radius: 6px;
    box-shadow: 2px 4px 16px rgba(0, 0, 0, 0.14);
}

.view-modal-image-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 4px;
    background: var(--ui-border);
}

.view-modal-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.view-modal-caption {
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    text-align: center;
    min-height: 44px;
    padding: 8px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* author row */
.view-modal-author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--ui-surface-2);
    border: 1px solid var(--ui-border);
    border-radius: 12px;
}

.view-modal-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-accent);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.view-modal-author-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex-grow: 1;
}

.view-author-time {
    font-size: 0.78rem;
    color: var(--ui-muted);
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}

.view-modal-author-label {
    font-size: 0.72rem;
    color: var(--ui-muted);
}

.view-modal-author-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* action buttons */
.view-modal-actions {
    display: flex;
    gap: 8px;
}

.view-modal-action-btn {
    flex: 1;
    padding: 12px 10px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 0.15s, background 0.15s, transform 0.1s;
}

.view-modal-action-btn:active {
    transform: scale(0.97);
}

.view-modal-action-btn[hidden] {
    display: none;
}

.view-modal-action-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.view-modal-action-btn--primary {
    background: var(--color-accent);
    color: white;
}

.view-modal-action-btn--primary:hover {
    opacity: 0.88;
}

.view-modal-action-btn--secondary {
    background: var(--ui-surface-2);
    color: var(--color-text);
    box-shadow: inset 0 0 0 1.5px var(--ui-border);
}

.view-modal-action-btn--secondary:hover {
    background: var(--ui-overlay);
}

.view-modal-action-btn--secondary.is-active {
    background: rgba(132, 13, 13, 0.08);
    color: var(--color-accent);
    box-shadow: inset 0 0 0 1.5px var(--color-accent);
}

/* delete icon button — no flex grow */
.view-modal-action-btn--danger-ghost {
    flex: 0 0 auto;
    background: transparent;
    color: var(--ui-danger);
    box-shadow: inset 0 0 0 1.5px rgba(239, 68, 68, 0.35);
    padding: 12px 14px;
}

.view-modal-action-btn--danger-ghost:hover {
    background: var(--ui-danger-hover);
}

/* confirm delete danger button */
.view-modal-action-btn--danger {
    background: var(--ui-danger);
    color: white;
}

.view-modal-action-btn--danger:hover {
    opacity: 0.88;
}

/* confirm delete panel */
.view-modal-confirm-delete {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 12px;
}

.view-modal-confirm-delete p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--color-text);
    line-height: 1.5;
}

.view-modal-confirm-btns {
    display: flex;
    gap: 8px;
}