/* Remarques sur l'outil : le bouton latéral et sa feuille. */

/* La forme de bouton est partagée avec les autres actions de la coquille. */
.remark-trigger {
    position: relative;
}

.remark-trigger-label {
    display: inline;
}

.remark-trigger-icon {
    display: grid;
    width: 1rem;
    height: 1rem;
    color: var(--gl-text-2);
}

.remark-trigger-icon svg {
    width: 100%;
    height: 100%;
}

.remark-badge {
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.3rem;
    border-radius: var(--gl-radius-capsule);
    background: var(--ok-wash);
    color: var(--ok);
    font-size: var(--gl-text-footnote);
    font-weight: 700;
    line-height: 1.15rem;
    text-align: center;
}

/* =========================================
   La feuille
   ========================================= */
.remark-sheet {
    width: min(40rem, calc(100vw - 2 * var(--gl-gutter)));
    max-height: calc(100dvh - 2 * var(--gl-gutter));
    margin: auto;
    padding: var(--gl-space-l);
    border: 0;
    border-radius: var(--gl-radius-xl);
    background: var(--gl-glass-strong);
    backdrop-filter: var(--gl-glass-filter);
    -webkit-backdrop-filter: var(--gl-glass-filter);
    color: var(--gl-text);
    box-shadow: var(--gl-glass-rim), var(--gl-shadow-3);
    overflow-y: auto;
}

.remark-sheet::backdrop {
    background: color-mix(in oklch, var(--gl-island) 38%, transparent);
}

.remark-sheet[open] {
    display: flex;
    flex-direction: column;
    gap: var(--gl-space-xs);
}

.remark-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gl-space-xs);
    flex-wrap: wrap;
}

.remark-title {
    font-size: var(--gl-text-title3);
    font-weight: 680;
}

.remark-intro, .remark-context, .remark-hint {
    font-size: var(--gl-text-subhead);
    color: var(--gl-text-2);
    line-height: 1.5;
}

.remark-context {
    color: var(--gl-text);
    padding: var(--gl-space-xs);
    background: var(--gl-surface-2);
    border-radius: var(--gl-radius-s);
    overflow-wrap: anywhere;
}

.remark-item-moment { font-size: var(--gl-text-subhead); line-height: 1.5; }

.remark-resume {
    position: fixed;
    inset: auto var(--gl-gutter) var(--gl-gutter);
    padding: var(--gl-space-m);
    background: var(--gl-surface);
    color: var(--gl-text);
    box-shadow: var(--gl-shadow-3);
    border-radius: var(--gl-radius-l);
    text-align: center;
    font-size: var(--gl-text-title2);
    z-index: 100;
    margin: auto;
    border: 0;
}

.remark-text {
    width: 100%;
    min-height: 9rem;
    field-sizing: content;
    padding: var(--gl-space-xs);
    border-radius: var(--gl-radius-s);
    background: var(--gl-surface);
    border: 1px solid var(--gl-separator-strong);
    color: var(--gl-text);
    font: inherit;
    font-size: var(--gl-text-body);
    line-height: 1.5;
    resize: vertical;
    caret-color: var(--gl-ink);
}

.remark-text:focus {
    outline: 2px solid var(--gl-accent-ink);
    outline-offset: 2px;
    box-shadow: var(--gl-focus-ring);
}

.remark-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gl-space-xs);
}

.remark-spot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gl-space-2xs);
    padding: var(--gl-space-2xs) var(--gl-space-xs);
    border: 0;
    border-radius: var(--gl-radius-s);
    background: color-mix(in oklch, var(--gl-ink) 16%, var(--gl-surface));
    font-size: var(--gl-text-subhead);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.remark-spot[hidden] {
    display: none;
}

.remark-spot .btn {
    flex-shrink: 0;
}

.remark-item-spot {
    color: var(--gl-text-2);
    font-size: var(--gl-text-subhead);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.remark-pick-banner {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    padding: var(--gl-space-xs) var(--gl-space-m);
    border-bottom: 1px solid var(--warn);
    background: var(--gl-surface-2);
    color: var(--gl-text);
    box-shadow: var(--gl-shadow-2);
    font-size: var(--gl-text-body);
    line-height: 1.5;
    text-align: center;
}

.remark-picking, .remark-picking * {
    cursor: crosshair !important;
}

.remark-spot-hover {
    outline: 3px solid var(--warn) !important;
    outline-offset: 2px !important;
}

.remark-status {
    padding: var(--gl-space-2xs) var(--gl-space-xs);
    border-radius: var(--gl-radius-s);
    background: var(--late-wash);
    color: var(--late);
    font-size: var(--gl-text-subhead);
    line-height: 1.5;
}

.remark-list-title {
    margin-top: var(--gl-space-2xs);
    font-size: var(--gl-text-subhead);
    font-weight: 650;
    color: var(--gl-text-2);
}

.remark-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--gl-space-2xs);
}

.remark-empty {
    font-size: var(--gl-text-subhead);
    color: var(--gl-text-2);
}

.remark-item {
    display: flex;
    flex-direction: column;
    gap: var(--gl-space-3xs);
    padding: var(--gl-space-xs);
    background: transparent;
    border-top: 1px solid var(--gl-separator);
    border-radius: 0;
}

.remark-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gl-space-3xs) var(--gl-space-xs);
    font-size: var(--gl-text-subhead);
    color: var(--gl-text-2);
}

.remark-state {
    margin-left: auto;
    font-weight: 650;
}

.remark-state.is-waiting {
    color: var(--late);
}

.remark-state.is-sent {
    color: var(--gl-text-2);
}

.remark-state.is-done {
    color: var(--ok);
}

.remark-body {
    font-size: var(--gl-text-body);
    line-height: 1.5;
    white-space: pre-wrap;
}

.remark-reply {
    padding: var(--gl-space-2xs) var(--gl-space-xs);
    border: 0;
    background: var(--ok-wash);
    border-radius: var(--gl-radius-s);
    font-size: var(--gl-text-subhead);
    line-height: 1.5;
}
