.flexy-mode-content {
    position: relative;
}

.flexy-error-popup {
    --flexy-error-popup-bg: rgba(28, 30, 32, 0.97);
    position: absolute;
    z-index: 102;
    background: var(--flexy-error-popup-bg);
    border: 1px solid var(--flexy-error, #ff6b6b);
    border-radius: 6px;
    box-shadow: 0 4px 14px 2px rgba(13, 13, 13, 0.4);
    width: max-content;
    font-size: 13px;
    line-height: 1.5;
    box-sizing: border-box;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.flexy-error-popup-visible {
    opacity: 1;
    transform: translateY(0);
}

.flexy-mode-item.active .flexy-mode-header {
    position: relative;
    z-index: 101;
}

.flexy-error-popup-surface {
    z-index: 100;
    width: auto;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 6px 14px rgba(13, 13, 13, 0.45);
    transform: translateY(-100%);
    clip-path: inset(100% 0 0 0);
    transition: transform 0.25s ease, clip-path 0.25s ease, opacity 0.15s ease;
}

.flexy-error-popup-surface.flexy-error-popup-visible {
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
}

.flexy-error-popup-canvas {
    z-index: 1000;
    border-top: 1px solid var(--flexy-error, #ff6b6b);
    border-radius: 6px;
    box-shadow: 0 4px 14px 2px rgba(13, 13, 13, 0.4);
    transform: translateY(-8px);
    clip-path: none;
    transition: transform 0.2s ease, opacity 0.15s ease;
}

.flexy-error-popup-canvas.flexy-error-popup-visible {
    transform: translateY(0);
}

.flexy-error-popup-canvas.flexy-error-popup-bottom {
    transform: translateY(8px);
}

.flexy-error-popup-canvas.flexy-error-popup-bottom.flexy-error-popup-visible {
    transform: translateY(0);
}

.flexy-error-popup-message {
    padding: 6px 10px;
    color: #f9f9f9;
    text-align: center;
    word-wrap: break-word;
}

.flexy-error-popup:not(.flexy-error-popup-surface)::after {
    content: '';
    position: absolute;
    left: var(--flexy-error-arrow-left, 50%);
    bottom: -6px;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    background: var(--flexy-error-popup-bg);
    border-right: 1px solid var(--flexy-error, #ff6b6b);
    border-bottom: 1px solid var(--flexy-error, #ff6b6b);
    transform: rotate(45deg);
}

.flexy-error-popup-below:not(.flexy-error-popup-surface)::after {
    bottom: auto;
    top: -6px;
    border-right: none;
    border-bottom: none;
    border-left: 1px solid var(--flexy-error, #ff6b6b);
    border-top: 1px solid var(--flexy-error, #ff6b6b);
}

.flexy-mobile-nav-btn.flexy-nav-has-error {
    position: relative;
}

.flexy-mobile-nav-btn.flexy-nav-has-error::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--flexy-error, #ff6b6b);
    box-shadow: 0 0 0 2px var(--flexy-bg-light);
}
