.force-update-button {
    padding: 8px;
    margin-bottom: 12px;
    margin-right: 29px;
    border-radius: 20px;
    transform: translateY(calc(100% + 12px)) scale(0.5);
    transition: transform 0.2s ease, border-radius 0.4s ease, scale 0.4s ease;
}

[dir="rtl"] .force-update-button {
    margin-right: unset;
    margin-left: 29px;
}

.force-update-button.show {
    border-radius: 10px;
    transform: translate(0) scale(1);
}

.category-container {
    display: flex;
    position: relative;
    width: 100%;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.input-box-wrapper {
    background-color: var(--bg-input);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: calc(100% - 35px);
    height: 35px;
}

.input-box-wrapper.focus {
    border: 2px solid var(--btn-primary);
}

.input-box {
    outline: none;
    border: none;
    width: 100%;
    padding: 0 10px;
    font-family: inherit;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: transparent;
    resize: none;
    white-space: nowrap;
    word-wrap: break-word;
}

.add-btn {
    display: flex;
    border-radius: 8px;
    height: 35px;
    width: 35px;
    background-color: var(--btn-primary);
    border: none;
    justify-content: center;
    align-items: center;
}

.import-button svg,
.add-btn svg {
    fill: var(--btn-primary-text);
    z-index: 1;
}

.edit-btn,
.delete-btn {
    height: 35px;
    width: 35px;
    right: 0;
    margin-left: 5px;
    background-color: var(--btn-delete);
    display: flex;
    flex-shrink: 0;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    justify-content: center;
    align-items: center;

    svg {
        z-index: 1;
    }
}

[dir="rtl"] .edit-btn,
[dir="rtl"] .delete-btn {
    right: unset;
    left: 0;
    margin-left: unset;
    margin-right: 5px;
}

.edit-btn {
    background-color: var(--btn-edit);
}

.link-box {
    display: flex;
    min-width: 100%;
    align-items: center;
    gap: 5px;
}

.link-text {
    font-size: 14px;
    word-break: break-all;
    word-wrap: break-word;
}

.favicon-wrapper {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 35px;
    height: 35px;

    svg {
        padding: 5px;
        box-sizing: border-box;
        fill: var(--border-alt-text);
    }
}

.favicon {
    width: 100%;
    height: 100%;
    background-color: var(--border-alt);
    border-radius: 8px;
}

.favicon-loader {
    width: 22px;
    height: 22px;
    margin: 5px;
    border: 3px solid #ccc;
    border-top: 3px solid #555;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    left: 0;
}

.favicon-img {
    display: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.checkbox-wrapper {
    flex-shrink: 0;
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    padding: 7px;
    margin-left: auto;
}

[dir="rtl"] .checkbox-wrapper {
    margin-left: unset;
    margin-right: auto;
}

.checkbox {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 100%;
    border: 2px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 1s ease, transform 0.3s ease, background-color 0.2s ease;
}

.tick-symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.2s ease-out, opacity 0.3s ease;

    svg {
        fill: var(--btn-primary-text);
    }
}

.checkbox:checked + .custom-checkbox {
    border-color: var(--btn-primary);
    background-color: var(--btn-primary);
    transition: border-color 0.1s ease;
    animation: checked-bounce 0.3s ease-out;
}

.checkbox:not(:checked) + .custom-checkbox {
    animation: unchecked-bounce 0.3s ease-out;
}

.checkbox:checked + .custom-checkbox .tick-symbol {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

@keyframes checked-bounce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.8);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes unchecked-bounce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.8);
    }
    100% {
        transform: scale(1);
    }
}

.show-more-item span {
    text-align: center;
    width: 100%;
    user-select: none;
}

.help-btn {
    background-color: transparent;
    height: fit-content;
    width: fit-content;
    border: none;
    position: absolute;
    top: 10px;
    right: 10px;

    svg {
        fill: var(--text-primary);
    }
}

[dir="rtl"] .help-btn {
    right: unset;
    left: 10px;
}


[dir="rtl"] .format {
    direction: ltr !important;
    text-align: right !important;
}

.import-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.import-button {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--btn-primary);
    width: 100%;
    height: 35px;
    border-radius: 8px;
    border: none;
    margin: 5px 0;
    text-decoration: none;
}

.source-btn-wrapper {
    margin-top: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
}

#source-btn {
    color: var(--text-muted);
    border: 1px solid var(--text-muted);
}

.confirm-btn-container {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    gap: 5px;
    user-select: none;
}

.confirm-btn {
    background-color: inherit;
    color: currentColor;
    font-size: 14px;
    border: none;
    border-radius: 30px;
    padding: 12px;
}

/* editor workpace */
.editor-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.line-numbers {
    position: absolute;
    left: 0;
    top: 0;
    min-height: 100%;
    width: 30px;
    padding: 75px 3px 30px 0;
    color: var(--text-primary);
    background-color: var(--scroll-bar-color);
    border-right: 1px solid var(--border-color);
    text-align: right;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    z-index: 1;
    transition: padding-bottom 0.2s ease;
    user-select: none;
}

.edit-input {
    direction: ltr !important;
    position: relative;
    background-color: var(--bg-primary);
    height: 100%;
    width: 100%;
    color: inherit;
    font-size: 14px;
    line-height: 1.5;
    border: none;
    outline: none;
    resize: none;
    padding-left: 40px;
    padding-top: 5px;
    padding-bottom: 30px;
    box-sizing: border-box;
    transition: padding-bottom 0.2s ease;
    overflow-y: auto;
    white-space: nowrap;
    scrollbar-color: var(--scroll-bar-color) var(--bg-secondary);
}

#edit-input::-webkit-scrollbar {
    width: 25px;
    transition: width 0.2s ease;
}

#edit-input::-webkit-scrollbar-track {
    background-color: var(--bg-input);
}

#edit-input::-webkit-scrollbar-thumb {
    min-height: 40px;
    background-color: var(--scroll-bar-color);
    border-radius: 5px;
}
