.annotation-drawer.is-visible.is-prd-mode {
    width: min(520px, 42vw);
    min-width: 420px;
}

.annotation-drawer.is-visible.is-prd-mode.is-expanded {
    width: min(760px, 58vw);
    min-width: 560px;
}

.annotation-drawer.is-visible.is-prd-mode.is-user-sized {
    width: var(--prd-drawer-width);
    min-width: var(--prd-drawer-width);
}

.annotation-drawer.is-visible.is-prd-mode.is-fullscreen {
    width: 100% !important;
    min-width: 100% !important;
}

body.is-resizing-prd-drawer .annotation-drawer {
    transition: none !important;
}

/* PRD Drawer Resize Handle */
.prd-drawer-resize-handle {
    position: absolute;
    top: 0;
    left: -5px;
    bottom: 0;
    width: 10px;
    z-index: 220;
    cursor: col-resize;
    display: none;
}

.annotation-drawer.is-visible.is-prd-mode .prd-drawer-resize-handle {
    display: block;
}

.prd-drawer-resize-handle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 4px;
    width: 2px;
    height: 100%;
    background: transparent;
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.prd-drawer-resize-handle:hover::after,
body.is-resizing-prd-drawer .prd-drawer-resize-handle::after {
    background: rgba(99, 102, 241, 0.72);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.16);
}


.annotation-drawer__header {
    padding: 14px 22px 12px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.annotation-drawer__topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.annotation-drawer:not(.is-prd-mode) .annotation-drawer__topbar {
    display: none;
}

.annotation-drawer.is-prd-mode .annotation-drawer__topbar {
    display: none;
}

.annotation-drawer__heading {
    display: none;
}

.annotation-drawer__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}

.annotation-drawer__title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.annotation-drawer__meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    min-height: 28px;
    min-width: 0;
    flex: 1 1 auto;
}

.annotation-drawer__meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 32px;
    min-width: 0;
}

.annotation-drawer:not(.is-prd-mode) .annotation-drawer__meta-row {
    display: block;
}

.prd-meta,
.prd-meta--select {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.prd-meta__breadcrumb {
    font-size: 0.82rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 140px;
    transition: max-width 0.15s ease, opacity 0.15s ease;
}

.prd-meta__divider {
    color: rgba(100, 116, 139, 0.72);
}

.prd-meta__dirty {
    color: var(--accent);
    font-weight: 700;
}

.prd-meta__select {
    max-width: min(260px, 42vw);
    min-width: 132px;
    height: 26px;
    border: 0;
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-primary);
    font: inherit;
    font-weight: 700;
    padding: 0 24px 0 8px;
    outline: none;
}

.prd-meta__select:focus {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.16);
    background: rgba(255, 255, 255, 0.92);
}

.doc-drawer-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.annotation-drawer:not(.is-prd-mode) .doc-drawer-actions {
    display: none;
}

.doc-drawer-icon-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.doc-drawer-icon-btn:hover {
    color: var(--text-primary);
    border-color: rgba(15, 23, 42, 0.16);
    background: rgba(255, 255, 255, 0.96);
}

.doc-drawer-icon-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
}

.doc-drawer-icon-btn--primary {
    border-color: rgba(79, 70, 229, 0.22);
    background: rgba(79, 70, 229, 0.1);
    color: var(--accent);
}

.doc-drawer-icon-btn--primary:not(:disabled):hover {
    border-color: rgba(79, 70, 229, 0.34);
    background: rgba(79, 70, 229, 0.16);
    color: #3730a3;
}

.doc-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.06);
}

.doc-tab {
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.doc-tab.is-active {
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-primary);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.annotation-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.annotation-scope-toggle {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.annotation-scope-toggle__button {
    min-width: 0;
    height: 24px;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.16s ease;
}

.annotation-scope-toggle__button span:last-child {
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
    font-size: 0.64rem;
    line-height: 17px;
    text-align: center;
}

.annotation-scope-toggle__button:hover {
    color: var(--text-primary);
}

.annotation-scope-toggle__button.is-active {
    color: var(--accent);
}

.annotation-scope-toggle__button.is-active span:last-child {
    background: rgba(79, 70, 229, 0.12);
    color: var(--accent);
}

.annotation-scope-toggle__divider {
    color: rgba(100, 116, 139, 0.72);
    font-weight: 600;
}

.annotation-drawer__empty {
    margin: auto 0;
    border: 1px dashed rgba(99, 102, 241, 0.28);
    border-radius: 18px;
    padding: 20px 18px;
    background: rgba(99, 102, 241, 0.05);
}

.annotation-drawer__empty strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.annotation-drawer__empty p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.annotation-drawer__tips {
    margin: auto 0;
    border: 1px dashed rgba(99, 102, 241, 0.28);
    border-radius: 18px;
    padding: 22px 20px;
    background: rgba(99, 102, 241, 0.04);
}

.annotation-drawer__tips-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.annotation-drawer__tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.annotation-drawer__tips-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.annotation-drawer__tips-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.annotation-drawer__tips-list .tip-icon {
    font-size: 0.88rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.annotation-drawer__tips-list .tip-text {
    flex-grow: 1;
}

.prd-empty__action {
    margin-top: 16px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(99, 102, 241, 0.24);
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.prd-empty__action:hover {
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(99, 102, 241, 0.34);
    transform: translateY(-1px);
}



.prd-doc-switcher {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.76);
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.prd-doc-switcher span {
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 700;
}

.prd-doc-switcher select {
    width: 100%;
    min-width: 0;
    height: 34px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #fff;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0 34px 0 10px;
    outline: none;
}

.prd-doc-switcher select:focus {
    border-color: rgba(99, 102, 241, 0.48);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.prd-editor-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 100%;
}

.prd-editor-toolbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.96);
}

.prd-editor-pane-toolbar {
    flex: 0 0 auto;
}

.prd-editor-preview-toolbar {
    display: none;
    justify-content: flex-end;
    padding: 6px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.96);
}

.prd-editor-grid--preview .prd-editor-preview-toolbar {
    display: flex;
}

.prd-editor-toolbar__group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.prd-editor-toolbar__spacer {
    flex: 1 1 auto;
    min-width: 12px;
}

.prd-editor-tool,
.prd-editor-layout__btn,
.prd-editor-action {
    height: 28px;
    min-width: 28px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 7px;
    background: #fff;
    color: #334155;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.prd-editor-tool:hover,
.prd-editor-layout__btn:hover,
.prd-editor-action:hover {
    border-color: rgba(79, 70, 229, 0.3);
    color: var(--accent);
    transform: translateY(-1px);
}

.prd-editor-layout {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.06);
}

.prd-editor-layout__btn {
    min-width: 40px;
    border-color: transparent;
    background: transparent;
    color: var(--text-secondary);
}

.prd-editor-layout__btn.is-active {
    background: #fff;
    color: var(--text-primary);
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.08);
}

.prd-editor-action {
    min-width: 66px;
    padding: 0 10px;
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    white-space: nowrap;
}

.prd-editor-action--ghost {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.12);
    color: var(--text-secondary);
}

.prd-editor-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.prd-slash-menu {
    position: absolute;
    top: 42px;
    left: 8px;
    z-index: 6;
    width: min(360px, 100%);
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.prd-slash-menu[hidden] {
    display: none;
}

.prd-slash-menu__item {
    width: 100%;
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    text-align: left;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    cursor: pointer;
}

.prd-slash-menu__item:hover,
.prd-slash-menu__item.is-active {
    background: rgba(79, 70, 229, 0.09);
}

.prd-slash-menu__label {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
}

.prd-slash-menu__description {
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prd-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    flex: 1 1 auto;
}

.annotation-drawer.is-expanded .prd-editor-grid--split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.prd-editor-grid--source .prd-editor-pane--preview,
.prd-editor-grid--preview .prd-editor-pane--source {
    display: none;
}

.prd-editor-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 460px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.88);
    overflow: hidden;
}

.prd-editor-textarea {
    width: 100%;
    min-height: 560px;
    flex: 1 1 auto;
    height: 100%;
    resize: vertical;
    border: 0;
    outline: none;
    padding: 16px;
    background: #fff;
    color: #0f172a;
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.72;
    tab-size: 2;
}

.prd-editor-textarea:focus {
    box-shadow: none;
    outline: none;
}

.prd-editor-preview {
    min-height: 560px;
    flex: 1 1 auto;
    padding: 16px;
    background: #fff;
    overflow: auto;
}

.prd-editor-preview-empty {
    color: var(--text-secondary);
}

.prd-document {
    color: #111827;
    font-size: 0.9rem;
    line-height: 1.78;
}

.prd-document h1,
.prd-document h2,
.prd-document h3,
.prd-document h4 {
    color: #111827;
    font-family: 'Outfit', 'Inter', sans-serif;
    line-height: 1.28;
}

.prd-document h1 {
    font-size: 1.34rem;
    margin: 4px 0 18px;
}

.prd-document h2 {
    font-size: 1.12rem;
    margin: 24px 0 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.prd-document h3 {
    font-size: 1rem;
    margin: 20px 0 8px;
}

.prd-document h4 {
    font-size: 0.93rem;
    margin: 18px 0 8px;
}

.prd-document p,
.prd-document ul,
.prd-document ol {
    margin: 0 0 12px;
}

.prd-document blockquote {
    margin: 14px 0 18px;
    padding: 4px 0 4px 16px;
    border-left: 4px solid rgba(99, 102, 241, 0.36);
    background: transparent;
    color: #475569;
    font-style: italic;
}

.prd-document hr {
    height: 1px;
    margin: 20px 0;
    border: 0;
    background: rgba(15, 23, 42, 0.1);
}

.prd-document ul,
.prd-document ol {
    padding-left: 22px;
}

.prd-document li + li {
    margin-top: 6px;
}

.prd-document code {
    padding: 1px 5px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.06);
    color: #4f46e5;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.82em;
}

.prd-document pre {
    margin: 12px 0 16px;
    padding: 12px;
    border-radius: 10px;
    background: #111827;
    color: #e5e7eb;
    overflow-x: auto;
}

.prd-document pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.prd-document a {
    color: var(--accent);
    font-weight: 650;
    text-decoration: none;
    border-bottom: 1px solid rgba(79, 70, 229, 0.24);
}

.prd-document a:hover {
    border-bottom-color: rgba(79, 70, 229, 0.6);
}

.prd-document del {
    color: #64748b;
}

.prd-document__image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px 0 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.prd-table-wrap {
    margin: 12px 0 16px;
    overflow-x: auto;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
}

.prd-document table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
    background: rgba(255, 255, 255, 0.78);
}

.prd-document th,
.prd-document td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    text-align: left;
    vertical-align: top;
    font-size: 0.82rem;
}

.prd-document th {
    background: rgba(15, 23, 42, 0.04);
    color: #374151;
    font-weight: 700;
}

.prd-document tr:last-child td {
    border-bottom: 0;
}

/* PRD Code Blocks (Dracula Theme Style) */
.prd-code-block {
    margin: 14px 0 18px;
    background: #282a36;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.prd-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #191a21;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    color: #6272a4;
}

.prd-code-lang {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    color: #ff79c6;
}

.prd-code-copy-btn {
    border: none;
    background: transparent;
    color: #6272a4;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.prd-code-copy-btn:hover {
    color: #f8f8f2;
    background: rgba(255, 255, 255, 0.08);
}

.prd-code-block pre {
    margin: 0 !important;
    padding: 16px !important;
    background: transparent !important;
    overflow-x: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.prd-code-block pre::-webkit-scrollbar {
    display: none; /* Hide scrollbars */
}

.prd-code-block code {
    background: transparent !important;
    color: #f8f8f2 !important;
    font-family: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre;
    word-break: normal;
    word-wrap: normal;
}

/* Syntax Highlighting Tokens matching Dracula Theme */
.prd-code-block .token.keyword { color: #ff79c6; font-weight: 500; }
.prd-code-block .token.string { color: #f1fa8c; }
.prd-code-block .token.comment { color: #6272a4; font-style: italic; }
.prd-code-block .token.number { color: #bd93f9; }
.prd-code-block .token.boolean { color: #bd93f9; }
.prd-code-block .token.function { color: #50fa7b; }

/* Image Sizing Optimizations (portrait/phone vertical limits) */
.prd-document__image--portrait,
.prd-document__image--phone {
    max-width: 320px !important;
    margin: 18px auto !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12) !important;
}

.prd-document__image--square {
    max-width: 460px !important;
    margin: 18px auto !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12) !important;
}

.prd-document__image--wide {
    max-width: 100% !important;
}

/* Floating AI Q&A Popover for Text Selection */
.prd-selection-ai-popover {
    position: fixed;
    z-index: 10000;
    background: #1e1e2e; /* Sleek Dracula dark background */
    border: 1px solid rgba(139, 92, 246, 0.4); /* purple tint border */
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    padding: 3px;
    transform: translate(-50%, -100%) translateY(-6px);
    pointer-events: auto;
    transition: opacity 0.16s ease, transform 0.16s ease;
    animation: prd-popover-fade-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes prd-popover-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -100%) translateY(0);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -100%) translateY(-6px);
    }
}

.prd-selection-ai-btn {
    border: none;
    background: transparent;
    color: #f8f8f2;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.prd-selection-ai-btn:hover {
    background: rgba(139, 92, 246, 0.2); /* elegant violet hover */
    color: #c084fc; /* bright sparkle violet */
}

.prd-selection-ai-btn svg {
    color: #a78bfa;
    transition: transform 0.2s ease;
}

.prd-selection-ai-btn:hover svg {
    transform: scale(1.1) rotate(15deg);
}

/* Manage Button Trigger */
.prd-meta__manage-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0 8px 0 10px;
    cursor: pointer;
    transition: all 0.16s ease;
    outline: none;
    max-width: min(200px, 40vw);
    min-width: 0;
}

.prd-meta__manage-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.prd-meta__manage-btn:hover {
    background: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.16);
}

.prd-meta__manage-btn:focus {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.16);
    background: rgba(255, 255, 255, 0.92);
}

.prd-meta__arrow {
    flex: 0 0 auto;
    color: rgba(100, 116, 139, 0.8);
    transition: transform 0.16s ease;
}

.prd-meta__manage-btn:hover .prd-meta__arrow {
    color: var(--text-primary);
}

/* PRD Switcher Dropdown */
.prd-meta__switcher-wrapper {
    position: relative;
    display: inline-flex;
}

.prd-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1000;
    width: 260px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
    padding: 6px;
    display: flex;
    flex-direction: column;
}

.prd-dropdown-menu[hidden] {
    display: none;
}

.prd-dropdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 280px;
    overflow-y: auto;
}

.prd-dropdown-empty {
    padding: 12px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.prd-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background-color 0.12s ease;
    gap: 12px;
}

.prd-dropdown-item:hover {
    background: rgba(15, 23, 42, 0.04);
}

.prd-dropdown-item.is-active {
    background: rgba(79, 70, 229, 0.06);
}

.prd-dropdown-item__left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
}

.prd-dropdown-item__name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.prd-dropdown-item__name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.prd-dropdown-item.is-active .prd-dropdown-item__name {
    color: var(--accent);
}

.prd-dropdown-item__badge {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(79, 70, 229, 0.12);
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.prd-dropdown-item__details {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.prd-dropdown-item__divider {
    color: rgba(15, 23, 42, 0.15);
}

.prd-dropdown-item__actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.prd-dropdown-item__delete-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.12s ease;
}

.prd-dropdown-item__delete-btn:hover {
    background: rgba(239, 68, 68, 0.10);
    color: #ef4444;
}

.prd-dropdown-footer {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.prd-dropdown-create-btn {
    width: 100%;
    height: 32px;
    border: 1px solid rgba(79, 70, 229, 0.16);
    border-radius: 8px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.prd-dropdown-create-btn:hover {
    background: rgba(79, 70, 229, 0.13);
    border-color: rgba(79, 70, 229, 0.24);
    transform: translateY(-1px);
}

/* Manage Button Active State */
.prd-meta__manage-btn.is-active {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.16);
}

.prd-meta__manage-btn.is-active .prd-meta__arrow {
    transform: rotate(180deg);
}

/* Responsive metadata drawer adjustments via Container Queries */
.annotation-drawer {
    container-type: inline-size;
}

@container (max-width: 440px) {
    .prd-meta__breadcrumb {
        max-width: 70px;
    }
    .prd-meta__manage-btn {
        max-width: 100px;
    }
}

@container (max-width: 350px) {
    .prd-meta__breadcrumb,
    .prd-meta__divider {
        display: none !important;
    }
    .prd-meta__manage-btn {
        padding: 0;
        width: 26px;
        justify-content: center;
    }
    .prd-meta__manage-btn span {
        display: none !important;
    }
    .prd-meta__manage-btn svg {
        margin: 0 !important;
    }
}
