Use highlight-only reason choices, show the associated target on one line, and replace inline submission progress with shared toast feedback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
323 lines
7.6 KiB
CSS
323 lines
7.6 KiB
CSS
/**
|
|
* Report form inside the shared modal runtime.
|
|
* @package AKSRT
|
|
*/
|
|
.aksrt-report-modal .aksrt-modal-runtime__dialog {
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
max-height: min(90vh, 820px);
|
|
max-height: min(90dvh, 820px);
|
|
background: var(--modal-surface);
|
|
color: var(--modal-ink);
|
|
}
|
|
|
|
.aksrt-report-modal:not(.aksrt-modal-runtime--bottom) .aksrt-modal-runtime__dialog {
|
|
width: min(600px, calc(100vw - 32px));
|
|
border-radius: var(--main-radius, 8px);
|
|
}
|
|
|
|
.aksrt-report-modal .aksrt-modal-runtime__header {
|
|
position: relative;
|
|
flex: none;
|
|
padding: 24px 64px 18px 24px;
|
|
border-bottom: 1px solid var(--modal-line-soft);
|
|
}
|
|
|
|
.aksrt-report-modal .aksrt-modal-runtime__title {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.aksrt-report-modal .aksrt-modal-runtime__close {
|
|
top: 14px;
|
|
right: 14px;
|
|
width: 44px;
|
|
height: 44px;
|
|
font-size: 26px;
|
|
color: var(--modal-muted);
|
|
}
|
|
|
|
.aksrt-report-modal .aksrt-modal-runtime__content {
|
|
display: flex;
|
|
min-height: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.aksrt-report-form {
|
|
display: flex;
|
|
flex: 1;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
min-height: 0;
|
|
margin: 0;
|
|
text-align: left;
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.aksrt-report-body {
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
overscroll-behavior: contain;
|
|
padding: 22px 24px 24px;
|
|
}
|
|
|
|
.aksrt-report-target {
|
|
display: flex;
|
|
align-items: baseline;
|
|
margin-bottom: 22px;
|
|
}
|
|
|
|
.aksrt-report-target__label {
|
|
flex: none;
|
|
color: var(--modal-muted);
|
|
}
|
|
|
|
.aksrt-report-target__name {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.aksrt-report-hint,
|
|
.aksrt-report-count {
|
|
color: var(--modal-muted);
|
|
font-size: 12px;
|
|
font-weight: 400;
|
|
}
|
|
|
|
.aksrt-report-form p { margin: 6px 0 0; }
|
|
.aksrt-report-count { font-variant-numeric: tabular-nums; }
|
|
|
|
.aksrt-report-reasons {
|
|
min-width: 0;
|
|
padding: 0;
|
|
margin: 0 0 22px;
|
|
border: 0;
|
|
}
|
|
|
|
.aksrt-report-reasons legend {
|
|
width: auto;
|
|
padding: 0;
|
|
margin: 0 0 10px;
|
|
border: 0;
|
|
color: inherit;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
line-height: inherit;
|
|
}
|
|
|
|
.aksrt-report-label .aksrt-report-hint,
|
|
.aksrt-report-reasons legend .aksrt-report-hint { margin-left: 8px; }
|
|
|
|
.aksrt-report-reasons__options {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 8px;
|
|
}
|
|
|
|
.aksrt-report-reason {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 44px;
|
|
padding: 10px 12px;
|
|
margin: 0;
|
|
border: 1px solid var(--modal-line);
|
|
border-radius: 8px;
|
|
background: var(--modal-surface);
|
|
font-weight: 400;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.aksrt-report-reason input[type="radio"] {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
border: 0;
|
|
clip-path: inset(50%);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.aksrt-report-reason:has(input:checked) {
|
|
border-color: var(--modal-primary);
|
|
background: color-mix(in srgb, var(--modal-primary) 10%, var(--modal-surface));
|
|
}
|
|
|
|
.aksrt-report-reason:has(input:focus-visible) {
|
|
outline: 2px solid var(--modal-primary);
|
|
outline-offset: 3px;
|
|
}
|
|
|
|
.aksrt-report-reason input:checked + span { font-weight: 600; }
|
|
.aksrt-report-other { margin-top: 12px; }
|
|
.aksrt-report-field + .aksrt-report-field { margin-top: 22px; }
|
|
|
|
.aksrt-report-label-row {
|
|
display: flex;
|
|
align-items: baseline;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.aksrt-report-label {
|
|
display: inline-block;
|
|
margin: 0;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.aksrt-report-form textarea {
|
|
display: block;
|
|
width: 100%;
|
|
min-height: 80px;
|
|
max-height: 240px;
|
|
padding: 11px 12px;
|
|
border: 1px solid var(--modal-line);
|
|
border-radius: 8px;
|
|
background: var(--modal-surface);
|
|
color: var(--modal-ink);
|
|
font: inherit;
|
|
line-height: 1.65;
|
|
resize: vertical;
|
|
}
|
|
|
|
.aksrt-report-form textarea::placeholder { color: var(--modal-muted); }
|
|
.aksrt-report-other textarea { margin-top: 8px; }
|
|
.aksrt-report-form [aria-invalid="true"] { border-color: var(--modal-danger); }
|
|
|
|
.aksrt-report-images,
|
|
.aksrt-report-images__list {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
}
|
|
|
|
.aksrt-report-images__list:empty { display: none; }
|
|
|
|
.aksrt-report-add,
|
|
.aksrt-report-image {
|
|
position: relative;
|
|
width: 90px;
|
|
height: 90px;
|
|
flex: none;
|
|
border: 1px solid var(--modal-line);
|
|
border-radius: 8px;
|
|
background: var(--modal-surface-3);
|
|
}
|
|
|
|
.aksrt-report-add {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
border-style: dashed;
|
|
color: var(--modal-ink-2);
|
|
font: inherit;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.aksrt-report-add i { font-size: 18px; }
|
|
.aksrt-report-image img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
|
|
|
|
.aksrt-report-image__state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 2px;
|
|
height: 100%;
|
|
padding: 8px;
|
|
color: var(--modal-muted);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.aksrt-report-image[data-upload-state="ready"] .aksrt-report-image__state { display: none; }
|
|
.aksrt-report-image[data-upload-state="error"] { border-color: var(--modal-danger); }
|
|
.aksrt-report-image [data-aksrt-report-retry] { min-width: 44px; min-height: 28px; border: 0; background: transparent; color: var(--modal-primary); text-decoration: underline; cursor: pointer; }
|
|
|
|
.aksrt-report-image__remove {
|
|
position: absolute;
|
|
top: -8px;
|
|
right: -8px;
|
|
display: grid;
|
|
place-items: center;
|
|
width: 30px;
|
|
height: 30px;
|
|
padding: 0;
|
|
border: 1px solid var(--modal-line);
|
|
border-radius: 50%;
|
|
background: var(--modal-surface);
|
|
color: var(--modal-ink-2);
|
|
font-size: 22px;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.aksrt-report-notice {
|
|
margin-top: 22px;
|
|
padding-top: 16px;
|
|
border-top: 1px solid var(--modal-line-soft);
|
|
color: var(--modal-ink-2);
|
|
font-size: 12px;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.aksrt-report-notice > :first-child { margin-top: 0; }
|
|
.aksrt-report-notice > :last-child { margin-bottom: 0; }
|
|
|
|
.aksrt-report-footer {
|
|
flex: none;
|
|
padding: 0 24px max(20px, env(safe-area-inset-bottom));
|
|
border-top: 1px solid var(--modal-line-soft);
|
|
background: var(--modal-surface);
|
|
}
|
|
|
|
.aksrt-report-form .aksrt-report-error { margin: 12px 0 0; color: var(--modal-danger); font-size: 13px; }
|
|
.aksrt-report-form .aksrt-report-status { color: var(--modal-muted); font-size: 12px; }
|
|
.aksrt-report-form .aksrt-report-status:empty { display: none; }
|
|
|
|
.aksrt-report-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 16px; }
|
|
|
|
.aksrt-report-actions button {
|
|
min-width: 96px;
|
|
min-height: 44px;
|
|
padding: 10px 20px;
|
|
border: 1px solid var(--modal-line);
|
|
border-radius: 8px;
|
|
font: inherit;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.aksrt-report-cancel { color: var(--modal-ink-2); background: var(--modal-surface); }
|
|
.aksrt-report-actions .aksrt-report-submit { color: var(--modal-on-primary); background: var(--modal-primary); border-color: transparent; }
|
|
.aksrt-report-form button:disabled { opacity: 0.55; cursor: not-allowed; }
|
|
.aksrt-report-form textarea:disabled { opacity: 0.65; }
|
|
.aksrt-report-modal :is(button, input, textarea, a):focus-visible { outline: 2px solid var(--modal-primary); outline-offset: 3px; }
|
|
.aksrt-report-modal [hidden] { display: none !important; }
|
|
|
|
@media (max-width: 768px) {
|
|
.aksrt-report-modal .aksrt-modal-runtime__header { padding: 20px 64px 16px 20px; }
|
|
.aksrt-report-body { padding: 18px 20px 22px; }
|
|
.aksrt-report-footer { padding-right: 20px; padding-left: 20px; }
|
|
.aksrt-report-actions button { flex: 1; min-width: 0; }
|
|
}
|
|
|
|
@media (max-width: 360px) {
|
|
.aksrt-report-reasons__options { grid-template-columns: 1fr; }
|
|
}
|