/* PDF designer extras: layers panel, marquee, rulers, text-align toolbar */
.pdf-editor-marquee-host {
    position: relative;
}
.pdf-editor-marquee {
    position: absolute;
    border: 1px dashed #ec4899;
    background: rgba(236, 72, 153, 0.08);
    pointer-events: none;
    z-index: 20;
    display: none;
}
.pdf-editor-layers-panel {
    margin-top: 1rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
    max-height: 220px;
    overflow-y: auto;
}
.dark .pdf-editor-layers-panel {
    border-top-color: #4a5568;
}
.pdf-editor-layers-panel h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.pdf-editor-layer-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.35rem;
    border-radius: 0.35rem;
    font-size: 0.75rem;
    cursor: pointer;
    user-select: none;
}
.pdf-editor-layer-row:hover {
    background: #f3f4f6;
}
.dark .pdf-editor-layer-row:hover {
    background: #374151;
}
.pdf-editor-layer-row.active {
    background: #e0e7ff;
    outline: 1px solid #667eea;
}
.dark .pdf-editor-layer-row.active {
    background: #312e81;
}
.pdf-editor-layer-row .layer-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pdf-editor-layer-row button {
    padding: 0.15rem 0.35rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #6b7280;
}
.pdf-editor-layer-row button:hover {
    color: #111827;
}
.pdf-editor-ruler-wrap {
    display: flex;
    flex-direction: column;
}
.pdf-editor-ruler-corner {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.dark .pdf-editor-ruler-corner {
    background: #1f2937;
    border-color: #4b5563;
}
.pdf-editor-ruler-h {
    height: 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}
.dark .pdf-editor-ruler-h {
    background: #1f2937;
    border-color: #4b5563;
}
.pdf-editor-ruler-h-inner {
    height: 100%;
    position: relative;
    background-image: repeating-linear-gradient(
        90deg,
        #d1d5db 0,
        #d1d5db 1px,
        transparent 1px,
        transparent 9px
    );
}
.pdf-editor-ruler-v {
    width: 20px;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}
.dark .pdf-editor-ruler-v {
    background: #1f2937;
    border-color: #4b5563;
}
.pdf-editor-ruler-v-inner {
    width: 100%;
    height: 100%;
    position: relative;
    background-image: repeating-linear-gradient(
        0deg,
        #d1d5db 0,
        #d1d5db 1px,
        transparent 1px,
        transparent 9px
    );
}
.pdf-editor-ruler-cursor {
    position: absolute;
    background: #ec4899;
    z-index: 2;
}
.pdf-editor-ruler-h .pdf-editor-ruler-cursor {
    width: 1px;
    top: 0;
    bottom: 0;
}
.pdf-editor-ruler-v .pdf-editor-ruler-cursor {
    height: 1px;
    left: 0;
    right: 0;
}
.pdf-editor-canvas-row {
    display: flex;
    flex-direction: row;
}
.prop-segmented {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.prop-segmented button {
    padding: 0.35rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    background: #fff;
    cursor: pointer;
}
.prop-segmented button.active {
    border-color: #667eea;
    background: #eef2ff;
    color: #4338ca;
}
.dark .prop-segmented button {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}
.dark .prop-segmented button.active {
    background: #312e81;
    border-color: #818cf8;
}
