#services-drawer-root {
    position: absolute;
    right: 0;
}

/* Drawer Container */
.drawerContainer {
    position: relative;
    display: inline-block;
}

.drawerTrigger {
    background: rgb(255, 255, 255);
    backdrop-filter: blur(20px);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    margin: 0 1em;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.drawerTrigger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
}

.drawerTrigger.active {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 50%;
}

.triggerDots {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 6px);
    gap: 4px;
    transition: all 0.4s ease;
}

.triggerDots span {
    width: 6px;
    height: 6px;
    background: #666;
    border-radius: 50%;
    transition: all 0.4s ease;
}

.drawerTrigger.active .triggerDots {
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawerTrigger.active .triggerDots span {
    position: absolute;
}

.drawerTrigger.active .triggerDots span:nth-child(1),
.drawerTrigger.active .triggerDots span:nth-child(3),
.drawerTrigger.active .triggerDots span:nth-child(7),
.drawerTrigger.active .triggerDots span:nth-child(9) {
    opacity: 0;
    transform: scale(0);
}

.drawerTrigger.active .triggerDots span:nth-child(2) {
    width: 20px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transform: rotate(45deg);
}

.drawerTrigger.active .triggerDots span:nth-child(8) {
    width: 20px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transform: rotate(-45deg);
}

.drawerTrigger.active .triggerDots span:nth-child(4),
.drawerTrigger.active .triggerDots span:nth-child(5),
.drawerTrigger.active .triggerDots span:nth-child(6) {
    opacity: 0;
    transform: scale(0);
}

.drawerPopup {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px) saturate(180%);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 
                0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top right;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 9999;
    width: 340px;
}

.drawerPopup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.drawerPopup::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 1.8em;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.98);
    transform: rotate(45deg);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.servicesGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.serviceItem {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 10px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    border: 1px solid transparent;
}

.serviceItem:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: translateY(-3px) scale(1.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.serviceItem:active {
    transform: translateY(-1px) scale(1.02);
}

.serviceIcon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.serviceItem:hover .serviceIcon {
    transform: scale(1.15);
}

.serviceName {
    font-size: 12px;
    font-weight: 500;
    color: #1d1d1f;
    text-align: center;
    line-height: 1.2;
}

.drawerOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

.drawerOverlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    #services-drawer-root {
        position: relative;
        right: 0;
    }

    .drawerPopup {
        right: 10px;
    }

    .drawerPopup::before {
        right: 15px;
    }

    .servicesGrid {
        gap: 10px;
    }

    .serviceItem {
        padding: 16px 8px;
    }

    .serviceIcon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
}

.dark .drawerTrigger {
    background: rgb(0, 0, 0);
}

.dark .triggerDots span {
    background: #fff;
}

.dark .drawerTrigger.active .triggerDots span:nth-child(2),
.dark .drawerTrigger.active .triggerDots span:nth-child(8) {
    background: #fff;
}

.dark .drawerPopup {
    background: rgba(30, 30, 30, 0.98);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

.dark .drawerPopup::before {
    background: rgba(30, 30, 30, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .serviceItem {
    background: rgba(255, 255, 255, 0.05);
}

.dark .serviceItem:hover {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.dark .serviceName {
    color: #f5f5f7;
}
