/* FariDocs 1.20.3 — semantic portal icons and compact document actions */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.workspace-sidebar-icon,
.workspace-user-dropdown a span,
.workspace-user-dropdown button span,
.menu-chevron,
.document-icon-action { display: grid; place-items: center; }
.workspace-sidebar-icon svg,
.workspace-user-dropdown svg,
.menu-chevron svg,
.document-icon-action svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.workspace-sidebar nav a .workspace-sidebar-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid #ffffff16;
    border-radius: 9px;
    background: #ffffff09;
    color: #63d8ca;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.workspace-sidebar nav a:hover .workspace-sidebar-icon,
.workspace-sidebar nav a.active .workspace-sidebar-icon {
    border-color: #5cd5c766;
    background: linear-gradient(135deg, #159b8f, #126985);
    color: #fff;
    box-shadow: 0 6px 14px rgba(2, 18, 29, .24);
    transform: translateY(-1px);
}
.workspace-create-link { display: flex; align-items: center; justify-content: center; gap: 7px; }
.workspace-create-link > span { font-size: 15px; line-height: 1; }
.workspace-user-menu-trigger .menu-chevron { width: 15px; }
.workspace-user-menu-trigger .menu-chevron svg { width: 13px; height: 13px; }

.workspace-document-table .column-actions { width: 12%; }
.document-actions {
    min-width: 106px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    flex-wrap: nowrap;
}
.document-actions form { margin: 0; }
.document-actions .document-icon-action {
    position: relative;
    width: 32px;
    height: 32px;
    min-height: 32px;
    flex: 0 0 32px;
    padding: 0;
    border: 1px solid #c9dce2;
    border-radius: 8px;
    background: #f8fbfc;
    color: #17475f;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.document-actions .document-icon-action:hover,
.document-actions .document-icon-action:focus-visible {
    z-index: 8;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(14, 52, 72, .15);
    outline: none;
}
.document-actions .view-pdf-action { border-color: #91d8cf; background: #edfaf8; color: #08796f; }
.document-actions .download-action { border-color: #a7c7d6; background: #eef5fa; color: #124f72; }
.document-actions .delete-action { border-color: #efc8cc; background: #fff4f4; color: #b33b46; }
.document-icon-action::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 20;
    top: 50%;
    right: calc(100% + 8px);
    min-width: max-content;
    padding: 6px 8px;
    border-radius: 6px;
    background: #092f45;
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    opacity: 0;
    transform: translate(4px, -50%);
    transition: opacity .15s ease, transform .15s ease;
}
.document-icon-action::before {
    content: "";
    position: absolute;
    z-index: 21;
    top: 50%;
    right: calc(100% + 2px);
    border: 4px solid transparent;
    border-left-color: #092f45;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity .15s ease;
}
.document-icon-action:hover::after,
.document-icon-action:hover::before,
.document-icon-action:focus-visible::after,
.document-icon-action:focus-visible::before { opacity: 1; }
.document-icon-action:hover::after,
.document-icon-action:focus-visible::after { transform: translate(0, -50%); }

html[data-theme="dark"] .document-actions .document-icon-action { border-color: #355966; background: #102c39; color: #cae2e8; }
html[data-theme="dark"] .document-actions .view-pdf-action { border-color: #2b7772; background: #103b3c; color: #88e2d7; }
html[data-theme="dark"] .document-actions .download-action { border-color: #38667c; background: #113246; color: #a9d6ea; }
html[data-theme="dark"] .document-actions .delete-action { border-color: #75494e; background: #3a242a; color: #ffadb5; }

@media (max-width: 800px) {
    .workspace-sidebar nav a { gap: 5px; }
    .workspace-sidebar nav a .workspace-sidebar-icon { width: 28px; height: 28px; flex-basis: 28px; }
    .workspace-sidebar-icon svg { width: 15px; height: 15px; }
}

@media (max-width: 720px) {
    .document-actions { min-width: 0; justify-content: flex-end; }
    .document-actions .document-icon-action { width: 34px; height: 34px; flex-basis: 34px; }
}
