[data-3d-effect] {
        --3d-max-rotation: 10deg;
    --3d-max-move-x: 4px;
    --3d-max-move-y: 4px;
    --3d-scale: 1.02;
    --3d-shadow-blur: 15px;
    --3d-shadow-opacity: 0.2;
    --3d-perspective: 1000px;
    --3d-depth: 1;
    --3d-smoothness: 0;
    --3d-enter-duration: 0.3s;
    --3d-exit-duration: 0.4s;
    --3d-easing: cubic-bezier(0.23, 1, 0.32, 1);
    
    transform-style: preserve-3d;
    transform-origin: center center;
    position: relative;
    
    transition: box-shadow var(--3d-enter-duration) var(--3d-easing);
}

[data-3d-effect]:hover {
    box-shadow: 0 calc(var(--3d-shadow-blur) * 0.75) calc(var(--3d-shadow-blur) * 2) rgba(0, 0, 0, var(--3d-shadow-opacity));
}

[data-3d-effect]:not(:hover) {
    transition: box-shadow var(--3d-exit-duration) var(--3d-easing);
}

.column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.row {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.split-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.centered-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.row, .split-row, .centered-row {
    &.wrap {
        flex-wrap: wrap;
    }
}

.row, .split-row {
    > .column {
        flex: 1;
    }
}

.muted {
    color: var(--text-muted) !important;
}

.tertiary {
    color: var(--text-tertiary) !important;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="color"],
textarea:not(#messagebar) {
    &:not(.noDefaultStyling) {

        font-family: var(--font-family-primary);
        background: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
        outline: 1px solid rgba(255, 255, 255, 0.1);
        outline-offset: -1px;
        border: none;
        padding: 8px 12px;
        color: white;
        font-size: 16px;
        width: 100%;
        box-sizing: border-box;
        transition: 0.3s ease, outline-offset 0.15s ease;
    
        &:hover {
            background: rgba(255, 255, 255, 0.075);
            outline-offset: 3px;
            outline: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        &:active {
            background: rgba(255, 255, 255, 0.2) !important;
            outline: 1px solid rgba(255, 255, 255, 0.3) !important;
            outline-offset: -1px !important;
            transition: 0.05s, outline-offset 0.15s ease;
        }
    
        &:focus {
            background: rgba(255, 255, 255, 0.075);
            outline: 1px solid rgba(255, 255, 255, 0.2);
    
            &:hover {
                background: rgba(255, 255, 255, 0.05);
                outline: 1px solid rgba(255, 255, 255, 0.3);
            }
        }
    
        &::placeholder {
            color: rgba(255, 255, 255, 0.4);
            transform: translateY(0.5px);
        }
    
        &.rounded {
            border-radius: 17px;
        }
    }
}

.actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn,
a.btn,
button.btn {
    font-size: 14px;
    width: fit-content;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.075);
    outline: 1px solid rgba(255, 255, 255, 0.1);
    outline-offset: -1px;
    cursor: pointer;
    
    display: flex;
    align-items: center;
    gap: 8px;
    
    transition: 0.15s ease;
    
    &.transparent {
        background-color: transparent;
        outline: 1px solid rgba(255, 255, 255, 0);
    }

    &.red {
        color: rgba(255, 85, 85, 0.9);
        background-color: rgba(255, 100, 100, 0.1);

        &.transparent {
            background-color: transparent;
        }

        &:hover {
            color: rgba(255, 100, 100, 1);
            background-color: rgba(255, 100, 100, 0.15);
        }

        &:active {
            background-color: rgba(255, 100, 100, 0.2);
        }
    }

    &.autofit {
        padding: 6px 4px;

        &:hover {
            padding: 6px 12px;
        }
    }

    &:hover {
        color: var(--text-primary);
        background-color: rgba(255, 255, 255, 0.125);
        outline: 1px solid rgba(255, 255, 255, 0.1);
    }

    &:active {
        background-color: rgba(255, 255, 255, 0.175);
        outline: 1px solid rgba(255, 255, 255, 0.175);
        transition: 0s !important;
    }

    &.active {
        color: var(--text-primary);
        background-color: rgba(255, 255, 255, 0.175);
        outline: 1px solid rgba(255, 255, 255, 0.175);

        &:hover {
            background-color: rgba(255, 255, 255, 0.225);
            outline: 1px solid rgba(255, 255, 255, 0.225);
        }
    }
}

.btn.primary,
a.btn.primary,
button.btn.primary {
    color: rgba(255, 255, 255, 0.95);
    background: linear-gradient(135deg, rgba(140, 140, 255, 0.35), rgba(90, 90, 210, 0.4));
    outline: 1px solid rgba(160, 160, 255, 0.35);

    &:hover {
        color: rgba(255, 255, 255, 1);
        background: linear-gradient(135deg, rgba(160, 160, 255, 0.45), rgba(110, 110, 235, 0.5));
        outline: 1px solid rgba(170, 170, 255, 0.45);
    }

    &:active {
        background: linear-gradient(135deg, rgba(130, 130, 240, 0.5), rgba(95, 95, 210, 0.55));
        outline: 1px solid rgba(170, 170, 255, 0.55);
    }
}

a.action.btn {
    width: 30px;
    height: 30px;
    font-size: 16px;
    background: rgba(128, 128, 128, 0.6);
    color: rgba(205, 205, 255, 1);
    outline: 1px solid rgba(255, 255, 255, 0.05);
    outline-offset: -1px;
    box-shadow: 0 0 6px rgba(64, 64, 64, 0.6);
    border-radius: 50%;
    z-index: 1;

    backdrop-filter: blur(10px);
    
    display: flex;
    align-items: center;
    justify-content: center;

    transition: all 0.15s ease, color 0.5s ease;

    &.small {
        font-size: 13px;
        width: 24px;
        height: 24px;
    }

    &.transparent {
        background-color: transparent;
        outline: 1px solid rgba(255, 255, 255, 0);
    }

    &.red {
        color: rgba(255, 85, 85, 0.9);
        background-color: rgba(255, 100, 100, 0.1);

        &.transparent {
            background-color: transparent;
        }

        &:hover {
            color: rgba(255, 100, 100, 1);
            background-color: rgba(255, 100, 100, 0.15);
        }

        &:active {
            background-color: rgba(255, 100, 100, 0.2);
        }
    }

    &:hover {
        color: rgba(255, 255, 255, 0.9);
        background: rgba(128, 128, 128, 0.35);
        outline: 1px solid rgba(255, 255, 255, 0.3);
    }

    span.context {
        font-size: 12px;
        margin-top: 1px;
    }
}

div.btn-switcher {
    width: fit-content;
    background-color: rgba(32, 32, 32, 0.15);
    padding: 3px;
    border-radius: 19px;
    
    display: flex;
    align-items: center;

    .toggle {
        font-size: 15px;
        padding: 6px 10px;
        height: 32px;
        border-radius: 16px;
        outline: 1px solid rgba(255, 255, 255, 0);
        outline-offset: -1px;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.6);
        white-space: nowrap;

        display: flex;
        align-items: center;
        gap: 6px;

        transition: 0.15s ease;

        &:hover {
            color: var(--text-primary);
        }
        
        &:active {
            color: var(--text-secondary);
            transition: 0s;
        }

        &.active {
            color: var(--text-primary);
            background-color: rgba(255, 255, 255, 0.05);
            outline: 1px solid rgba(255, 255, 255, 0.1);
        }
    }
}

[data-contextmenu] {
    position: relative;

    &[data-placement="top"] {
        [data-menu-container] {
            position: absolute !important;
            top: calc(var(--mainPadding) * -1) !important;
            left: 50% !important;
            transform: translateX(-50%) translateY(-100%) !important;
            transform-origin: bottom center !important;
        }
    }

    &[data-placement="bottom"] {
        [data-menu-container] {
            position: absolute !important;
            top: calc(100% + var(--mainPadding)) !important;
            left: 50% !important;
            transform: translateX(-50%) translateY(0) !important;
            transform-origin: top center !important;
        }
    }

    [data-menu-container] {
        position: fixed;
        background-color: rgba(48, 48, 52, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        padding: 8px 0;
        z-index: 1000;
        min-width: 150px;
        display: flex;
        flex-direction: column;
        opacity: 0;
        visibility: hidden;
        scale: 0.95;
        transition: opacity 0.18s ease, transform 0.18s ease, scale 0.18s ease, visibility 0s linear 0.18s;
        pointer-events: none;
        will-change: transform, scale, opacity;

        
        &.context-menu-open {
            opacity: 1;
            visibility: visible;
            transform: translate3d(0, 0, 0);
            scale: 1;
            pointer-events: auto;
            transition-duration: 0.18s;
            transition-property: opacity, transform, scale, visibility;
            transition-delay: 0s;
        }

        &.context-menu-closed {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transform: translate3d(0, 0, 0);
            scale: 0.95;
            transition-delay: 0s, 0s, 0.18s;
        }

        &.context-menu-measuring {
            opacity: 0 !important;
            visibility: hidden !important;
            pointer-events: none !important;
            transform: translate3d(0, 0, 0) scale(1) !important;
            display: flex !important;
            transition: none !important;
        }

        a.action,
        .menu-item {
            padding: 8px 16px;
            color: var(--text-secondary, #aaa);
            text-decoration: none;
            font-size: 14px;
            transition: background-color 0.2s, color 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            white-space: nowrap;

            &:hover {
                background-color: rgba(255, 255, 255, 0.05);
                color: var(--text-primary, #fff);
            }

            &:active {
                background-color: rgba(255, 255, 255, 0.1);
                color: var(--text-secondary, #aaa);
                transition: background-color 0s, color 0s;
            }
        }

        .menu-item.disabled {
            opacity: 0.5;
            pointer-events: none;
            cursor: not-allowed;
        }

        .menu-divider {
            height: 1px;
            background-color: rgba(255, 255, 255, 0.1);
            margin: 4px 0;
        }
    }
}

i.fas.fa-times {
    transform: translateY(4%);
}