/* Common appearance for native Dialog components; features own their layout. */
.app-dialog {
    box-sizing: border-box;
    border: 1px solid rgba(242, 90, 0, 0.2);
    border-radius: 24px;
    background: linear-gradient(180deg, #261b16, #110c0a);
    color: #fff7ed;
    font: inherit;
    box-shadow: 0 20px 64px rgba(0, 0, 0, 0.58);
}

.app-dialog[open] {
    display: flex;
    flex-direction: column;
}

/* Poster selection and rating-image previews share this bottom panel layout. */
.app-dialog-sheet {
    position: fixed;
    inset: auto 0 max(12px, env(safe-area-inset-bottom));
    width: calc(100% - 24px);
    max-width: 480px;
    max-height: calc(100dvh - 24px);
    margin: 0 auto;
    padding: 18px;
}

.app-dialog-sheet[open] {
    gap: 14px;
}

.app-dialog::backdrop {
    background: rgba(8, 5, 4, 0.78);
}

.app-dialog button {
    cursor: pointer;
}

.app-dialog .app-dialog-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.045);
    color: #e9ddd4;
    font: inherit;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    touch-action: manipulation;
}

.app-dialog .app-dialog-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: #f25a00;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    touch-action: manipulation;
}

.app-dialog button:disabled,
.app-dialog fieldset:disabled {
    cursor: not-allowed;
}

.app-dialog .app-dialog-primary:not(:disabled):hover {
    background: #dc5200;
}

.app-dialog .app-dialog-close:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.08);
}

.app-dialog button:focus-visible,
.app-dialog a:focus-visible,
.app-dialog textarea:focus-visible {
    outline: 2px solid #ff7a2a;
    outline-offset: 2px;
}

/* Poster and rating-image previews share this neutral compact sheet. */
.app-dialog-compact {
    max-width: 400px;
    padding: 14px;
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: #211917;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.app-dialog-compact[open] {
    gap: 12px;
}

.app-dialog-compact .app-dialog-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
}
