:root {
    --wbc-annotate-primary-color: #1f1f1f;
    --wbc-annotate-secondary-color: #4CAF50;
    --wbc-annotate-border-color: #e9ecef;
    --wbc-annotate-background-color: #fff;
    --wbc-annotate-text-color: #333;
    --wbc-annotate-hover-color: #f8f9fa;
    --wbc-annotate-active-color: #e9ecef;
    --wbc-annotate-shadow-color: rgba(0, 0, 0, 0.1);
    --wbc-annotate-overlay-color: rgba(0, 0, 0, 0.5);
    --wbc-annotate-hover-backdrop: rgba(0, 0, 0, 0.05);
    --wbc-annotate-disabled-color: #ccc;
}

#wbc-annotate-editor-container-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--wbc-annotate-overlay-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.15s ease-in-out;
}

#wbc-annotate-editor {
    background: var(--wbc-annotate-background-color);
    border-radius: 8px;
    border: 1px solid var(--wbc-annotate-border-color);
    box-shadow: 0 10px 30px var(--wbc-annotate-shadow-color);
    max-width: 1200px;
    width: 95%;
    min-height: 70vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wbc-annotate-open-editor {
    display: inline-block;
    margin-left: 10px;
    padding: 8px 16px;
    background-color: var(--wbc-annotate-primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

#wbc-annotate-editor .wbc-annotate-annotate:hover {
    background-color: var(--wbc-annotate-primary-color);
}

#wbc-annotate-editor .wbc-annotate-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--wbc-annotate-background-color);
    border-bottom: 1px solid var(--wbc-annotate-border-color);
    justify-content: space-between;
}

#wbc-annotate-editor .wbc-annotate-tool-button.active {
    background-color: var(--wbc-annotate-active-color);
    border-color: var(--wbc-annotate-border-color);
}

#wbc-annotate-editor .wbc-annotate-editor-footer {
    background-color: var(--wbc-annotate-background-color);
    padding: 12px 20px;
    border-top: 1px solid var(--wbc-annotate-border-color);
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

#wbc-annotate-editor .wbc-annotate-canvas-container {
    flex: 1;
    overflow: auto;
    background-color: var(--wbc-annotate-background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 70vh;
    min-height: 70vh;
    max-width: 70vw;
    align-self: center;
    
}
.wbc-annotate-canvas-container img {
    height: 100% !important;
    width: 100% !important;
}
#wbc-annotate-editor .toolbar-footer {
    position: relative;
}

/* Button styles */
#wbc-annotate-editor .wbc-annotate-tool-button {
    padding: 8px;
    border: none;
    background-color: var(--wbc-annotate-background-color);
    border-bottom-left-radius: inherit;
    border-top-left-radius: inherit;
    color: var(--wbc-annotate-text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 32px;
    transition: all 0.2s ease;
}

#wbc-annotate-editor .wbc-annotate-tool-button:hover {
    background-color: var(--wbc-annotate-hover-backdrop);
}

#wbc-annotate-editor .wbc-annotate-button {
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    background-color: var(--wbc-annotate-background-color);
    color: var(--wbc-annotate-text-color);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

#wbc-annotate-editor .wbc-annotate-button.primary {
    background-color: var(--wbc-annotate-primary-color);
    color: white;
    border-color: var(--wbc-annotate-primary-color);
}

#wbc-annotate-editor .toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#wbc-annotate-editor .wbc-annotate-button:hover,
#wbc-annotate-editor .wbc-annotate-button.active {
    background-color: #efefef;
}

#wbc-annotate-editor .wbc-annotate-button.primary:hover {
    background-color: var(--wbc-annotate-primary-color);
    border-color: var(--wbc-annotate-primary-color);
}

#wbc-annotate-editor .wbc-annotate-tool-button.active {
    background-color: var(--wbc-annotate-hover-backdrop);
    color: var(--wbc-annotate-primary-color);
}

#wbc-annotate-editor .wbc-annotate-tool-button.active svg {
    stroke: var(--wbc-annotate-primary-color);
}

/* Color picker */
#wbc-annotate-editor .wbc-annotate-color-picker {
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--wbc-annotate-border-color);
    border-radius: 6px;
    background-color: var(--wbc-annotate-background-color);
}

#wbc-annotate-editor .wbc-annotate-color-option {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

#wbc-annotate-editor .wbc-annotate-color-option:hover,
#wbc-annotate-editor .wbc-annotate-color-option.active {
    border-color: var(--wbc-annotate-text-color);
}

/* Emoji picker */
#wbc-annotate-editor .wbc-annotate-emoji-picker {
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--wbc-annotate-border-color);
    border-radius: 6px;
    background-color: var(--wbc-annotate-background-color);
}

#wbc-annotate-editor .wbc-annotate-emoji {
    font-size: 20px;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

#wbc-annotate-editor .wbc-annotate-emoji:hover {
    background-color: var(--wbc-annotate-hover-color);
}

#wbc-annotate-editor .wbc-annotate-tool-group {
    position: relative;
    display: inline-flex;
}

#wbc-annotate-editor .wbc-annotate-tool-group {
    border: 1px solid transparent;
    flex-direction: row-reverse;
    border-radius: 5px;
}

#wbc-annotate-editor .wbc-annotate-tool-group:hover {
    border: 1px solid var(--wbc-annotate-border-color);
}

#wbc-annotate-editor .wbc-annotate-chevron {
    padding: 4px;
    border: none;
    background: none;
    cursor: pointer;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    display: flex;
    align-items: center;
}

#wbc-annotate-editor .wbc-annotate-chevron:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

#wbc-annotate-editor .wbc-annotate-chevron.active {
    background-color: rgba(0, 0, 0, 0.05);
}

#wbc-annotate-editor .wbc-annotate-dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--wbc-annotate-background-color);
    min-width: 160px;
    box-shadow: 0 2px 5px var(--wbc-annotate-shadow-color);
    z-index: 1000;
    border-radius: 8px;
    top: calc(100% + 8px);
    left: 0;
}

#wbc-annotate-editor .wbc-annotate-dropdown-content.show {
    display: block;
    animation: fadeIn 0.15s ease-in-out;
}

#wbc-annotate-editor .wbc-annotate-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    color: var(--wbc-annotate-text-color);
}

#wbc-annotate-editor .wbc-annotate-dropdown-item:hover {
    background-color: var(--wbc-annotate-hover-color);
}

#wbc-annotate-editor #undoButton,
#wbc-annotate-editor #redoButton,
#wbc-annotate-editor .property-button {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--wbc-annotate-text-color);
    border-radius: 10px;
    padding: 6px 12px;
}

#wbc-annotate-editor #undoButton svg,
#wbc-annotate-editor #redoButton svg {
    width: 20px;
    height: 20px;
}

#wbc-annotate-editor #selectButton,
#wbc-annotate-editor #deleteButton {
    padding: 6px 12px;
}

#wbc-annotate-editor #selectButton svg,
#wbc-annotate-editor #deleteButton svg,
#wbc-annotate-editor .property-button svg,
#wbc-annotate-editor svg {
    width: 18px;
    height: 18px;
}

#wbc-annotate-editor .wbc-annotate-chevron svg {
    width: 14px;
    height: 14px;
}

#wbc-annotate-editor #undoButton:disabled,
#wbc-annotate-editor #redoButton:disabled {
    color: var(--wbc-annotate-disabled-color);
}

#wbc-annotate-editor #undoButton:hover:not(:disabled),
#wbc-annotate-editor #redoButton:hover:not(:disabled) {
    background-color: var(--wbc-annotate-hover-color);
}

#wbc-annotate-editor .wbc-annotate-property-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

#wbc-annotate-editor .property-group {
    position: relative;
}

#wbc-annotate-editor .property-button {
    padding: 6px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wbc-annotate-editor .property-button:hover {
    background-color: var(--wbc-annotate-hover-backdrop);
}

#wbc-annotate-editor .property-dropdown {
    position: absolute;
    visibility: hidden;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--wbc-annotate-background-color);
    border-radius: 4px;
    box-shadow: 0 2px 8px var(--wbc-annotate-shadow-color);
    padding: 12px;
    margin-bottom: 8px;
    min-width: 220px;
    z-index: 1000;
    -webkit-animation-duration: 0.3s;
    animation-duration: 0.3s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    opacity: 0;
}

#wbc-annotate-editor .property-group.active .property-dropdown {
    visibility: visible;
    -webkit-animation-name: fadeIn;
    animation-name: fadeIn;
}

#wbc-annotate-editor .property-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 12px;
    padding: 5px 8px;
    position: relative;
}

#wbc-annotate-editor .property-row:last-child {
    margin-bottom: 0;
}

#wbc-annotate-editor .property-row label {
    font-size: 14px;
    color: var(--wbc-annotate-text-color);
    font-weight: 500;
}

#wbc-annotate-editor .property-row input[type="color"] {
    width: 40px;
    height: 24px;
    padding: 0;
    border: 1px solid var(--wbc-annotate-border-color);
}

#wbc-annotate-editor .property-row input[type="number"],
#wbc-annotate-editor .property-row select {
    border: 1px solid var(--wbc-annotate-border-color);
    border-radius: 4px;
    padding: 4px;
}

#wbc-annotate-editor .property-row input[type="number"] {
    width: 32px;
}

#wbc-annotate-editor .property-row select {
    width: 100px;
}

#wbc-annotate-editor .font-size-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

#wbc-annotate-editor .font-size-controls button {
    padding: 2px 8px;
    border: 1px solid var(--wbc-annotate-border-color);
    background: var(--wbc-annotate-background-color);
    border-radius: 4px;
    cursor: pointer;
}

#wbc-annotate-editor .font-size-controls button:hover {
    background: var(--wbc-annotate-hover-color);
}

#wbc-annotate-editor .property-row input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    margin: 0 8px;
    position: relative;
}

#wbc-annotate-editor .property-row input[type="range"]::-webkit-slider-runnable-track {
    background: var(--wbc-annotate-border-color);
    height: 4px;
    border-radius: 2px;
    position: relative;
}

#wbc-annotate-editor .property-row input[type="range"]::-moz-range-track {
    background: #e2e8f0;
    height: 4px;
    border-radius: 2px;
    position: relative;
}

#wbc-annotate-editor .property-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -6px;
    background-color: var(--wbc-annotate-primary-color);
    height: 16px;
    width: 16px;
    border-radius: 50%;
    border: 2px solid var(--wbc-annotate-background-color);
    box-shadow: 0 1px 2px var(--wbc-annotate-shadow-color);
    transition: all 0.1s ease;
    position: relative;
    z-index: 1;
}

#wbc-annotate-editor .property-row input[type="range"]::-moz-range-thumb {
    background-color: var(--wbc-annotate-primary-color);
    height: 16px;
    width: 16px;
    border-radius: 50%;
    border: 2px solid var(--wbc-annotate-background-color);
    box-shadow: 0 1px 2px var(--wbc-annotate-shadow-color);
    transition: all 0.1s ease;
    position: relative;
    z-index: 1;
}

#wbc-annotate-editor .property-row input[type="range"]:hover::-webkit-slider-thumb {
    background-color: var(--wbc-annotate-primary-color);
}

#wbc-annotate-editor .property-row input[type="range"]:hover::-moz-range-thumb {
    background-color: var(--wbc-annotate-primary-color);
}

#wbc-annotate-editor .property-row input[type="range"]:focus {
    outline: none;
}

#wbc-annotate-editor .property-row input[type="range"]:focus::-webkit-slider-thumb {
    background-color: var(--wbc-annotate-primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

#wbc-annotate-editor .property-row input[type="range"]:focus::-moz-range-thumb {
    background-color: var(--wbc-annotate-primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

#wbc-annotate-editor .property-row label {
    min-width: 60px;
    color: var(--wbc-annotate-text-color);
    font-size: 14px;
}

#wbc-annotate-editor .property-row span {
    min-width: 40px;
    text-align: right;
    color: var(--wbc-annotate-text-color);
    font-size: 14px;
}

/* Filled track styles */
#wbc-annotate-editor .property-row input[type="range"] {
    background: linear-gradient(to right, var(--wbc-annotate-primary-color) var(--value), var(--wbc-annotate-border-color) var(--value));
    border-radius: 2px;
}

#wbc-annotate-editor .property-row input[type="range"]::-webkit-slider-runnable-track {
    background: transparent;
}

#wbc-annotate-editor .property-row input[type="range"]::-moz-range-track {
    background: transparent;
}

#wbc-annotate-editor #currentFontSize {
    min-width: 24px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
}

#wbc-annotate-editor #opacityValue {
    font-size: 14px;
    font-weight: 500;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}