/* style.css */

/* Custom Scrollbar for side panel */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Hide scrollbar for code editor but keep functionality */
#code-input::-webkit-scrollbar,
#code-output::-webkit-scrollbar {
    display: none;
}

#code-input,
#code-output {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Checkerboard Background Pattern */
.checkerboard {
    background-color: #0F1115;
    background-image: linear-gradient(45deg, #1A1D24 25%, transparent 25%, transparent 75%, #1A1D24 75%, #1A1D24),
        linear-gradient(45deg, #1A1D24 25%, transparent 25%, transparent 75%, #1A1D24 75%, #1A1D24);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

/* For the transparent background button */
.checkerboard-btn {
    background-color: #fff;
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc),
        linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc);
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
}

/* Custom Select Dropdown Arrow */
.custom-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
}

/* Custom Checkbox Toggle */
input:checked~.dot {
    transform: translateX(100%);
    background-color: #fff;
}

input:checked~.toggle-bg {
    background-color: #6366F1;
    border-color: #6366F1;
}

/* Code Output Styling Adjustment */
#code-output.hljs {
    background: transparent !important;
    padding: 0 !important;
}

/* Editor positioning trick to perfectly align textarea and pre */
#code-input,
#code-output {
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    tab-size: 2;
    white-space: pre !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    overflow-x: auto;
}

#code-input {
    color: transparent;
    background: transparent;
    caret-color: white;
    /* Important so we can see the cursor */
}

/* Make sure container handles width properly */
#code-window {
    width: min-content;
    /* Shrink to fit content */
}

/* Scale container to fit window if needed */
#capture-target {
    transform-origin: center center;
}

.toast-show {
    opacity: 1 !important;
    transform: translateY(0) !important;
}