/* Tools menu container */
.tools-menu-wrapper {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Black plus button */
.tools-plus-button {
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    padding: 0;
    border: 1px solid #000000;
    border-radius: 50%;

    background: #000000;
    color: #ffffff;

    cursor: pointer;
    transition:
        background 180ms ease,
        transform 180ms ease;
}

.tools-plus-button:hover {
    background: #292929;
}

.tools-plus-button:active {
    transform: scale(0.94);
}

.tools-plus-button:focus-visible,
.tools-menu-item:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 3px;
}

/* Popup menu */
.tools-menu {
    position: absolute;
    z-index: 1000;
    left: 0;
    bottom: calc(100% + 12px);

    width: 210px;
    padding: 7px;

    border: 1px solid #e5e7eb;
    border-radius: 15px;

    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.14);

    animation: toolsMenuAppear 160ms ease;
}

.tools-menu[hidden] {
    display: none;
}

/* Web Search option */
.tools-menu-item {
    width: 100%;
    min-height: 46px;

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

    padding: 10px 11px;
    border: none;
    border-radius: 10px;

    background: transparent;
    color: #171717;

    font: inherit;
    font-size: 14px;
    text-align: left;

    cursor: pointer;
    transition: background 160ms ease;
}

.tools-menu-item:hover {
    background: #f3f4f6;
}

/* Sky-blue magnifying glass */
.web-search-icon {
    flex-shrink: 0;
    color: #38bdf8;
}

/* Selected state */
.tools-menu-item[aria-pressed="true"] {
    background: #eff8ff;
}

.web-search-check {
    display: none;
    margin-left: auto;
    color: #0284c7;
    font-weight: 700;
}

.tools-menu-item[aria-pressed="true"] .web-search-check {
    display: inline;
}

@keyframes toolsMenuAppear {
    from {
        opacity: 0;
        transform: translateY(5px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tools-menu,
    .tools-plus-button {
        animation: none;
        transition: none;
    }
}