/* The label keeps its original height/margin. Notes never participate in layout. */
.production-note-heading { display: contents; }
.production-note-heading.notes-enabled { display: block; position: relative; width: max-content; max-width: calc(100% - 132px); }
button.production-note-button {
    flex-shrink: 0; min-height: 28px; padding: 2px 9px; border: 1px solid #d5dfe9;
    border-radius: 6px; background: #f8fafc; color: #64748b; font-size: 12px; font-weight: 500;
    line-height: 1.5; cursor: pointer; touch-action: manipulation;
}
button.production-note-button.has-note { color: #9a5800; background: #fff8e7; border-color: #edce8c; }
button.production-note-button:disabled { opacity: .5; cursor: default; }
button.production-note-button:focus-visible { outline: 2px solid #1267e5; outline-offset: 2px; }
.production-note-heading > button.production-note-button {
    position: absolute; left: calc(100% + 12px); top: 0; display: inline-flex;
    align-items: center; gap: 5px; width: max-content; height: 100%; min-height: 0;
    margin: 0; padding: 0 3px; border: 0; border-radius: 3px;
    background: transparent; color: #75869a; box-shadow: none;
    font-size: 12px; font-weight: 400; line-height: 1; white-space: nowrap;
}
.production-note-heading > button.production-note-button::before {
    content: ''; width: 13px; height: 14px; flex: 0 0 13px; background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 18'%3E%3Cpath d='M3 1h7l3 3v12H3V1Z M10 1v4h3 M5 8h6 M5 11h6 M5 14h4' fill='none' stroke='black' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.production-note-heading > button.production-note-button::after { content: ''; position: absolute; inset: -5px -3px; }
.production-note-heading > button.production-note-button.has-note { color: #326aa7; background: transparent; border: 0; }
.production-note-heading > button.production-note-button.has-note::before { color: #326aa7; }
.production-note-heading > button.production-note-button:hover:not(:disabled) { color: #125ebd; background: #eff6ff; }
.production-note-heading > button.production-note-button[hidden] { display: none; }
.production-note-dialog {
    width: min(560px, calc(100vw - 28px)); max-height: 85dvh; margin: auto; padding: 22px;
    border: 1px solid #d5dfe9; border-radius: 14px; background: #fff; color: #14243c;
    box-shadow: 0 16px 60px #071f4733; overflow-y: auto; overscroll-behavior: contain;
}
.production-note-dialog::backdrop { background: #071f4780; }
.production-note-dialog h2 { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.production-note-context { font-size: 13px; color: #64748b; margin: 0 0 16px; overflow-wrap: anywhere; }
.production-note-content { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.8; margin: 0; }
textarea.production-note-content { display: block; width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; resize: vertical; background: #fff; color: #14243c; }
.production-note-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.production-note-actions button { min-height: 40px; padding: 8px 20px; border: 1px solid #cbd5e1; border-radius: 7px; background: #f8fafc; color: #334155; cursor: pointer; }
.production-note-actions .production-note-save { color: #fff; background: #1267e5; border-color: #1267e5; }
.dark .production-note-dialog, .dark textarea.production-note-content { color: #e2e8f0; background: #1f2937; border-color: #475569; }
.dark .production-note-context { color: #a8bad0; }
.dark .production-note-actions button:not(.production-note-save) { color: #e2e8f0; background: #334155; border-color: #475569; }
.component-note-actions { display: flex; justify-content: flex-end; margin: 8px 12px; }
