@keyframes slideDownButton {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

.floating-button {
    position: fixed;
    bottom: 120px;
    right: 30px;
    z-index: 999;
    font-family: "Roboto", sans-serif;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-direction: row;
    animation: slideDownButton 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@media (max-width: 767px) {
    .floating-button {
        bottom: 100px;
        right: 16px;
        gap: 8px;
        flex-direction: column-reverse;
        align-items: flex-end;
    }
}

.floating-button__main {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #df6417;
    border: 3.5px solid #0e0e0e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 4px 0px rgba(14, 14, 14, 0.2), 0 8px 24px rgba(223, 100, 23, 0.25);
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.floating-button__main.idle {
    animation: gentlePulse 2s ease-in-out infinite;
}

.floating-button__main:hover:not(.active) {
    transform: scale(1.12) rotate(-2deg) translateY(-2px);
    box-shadow: 5px 5px 0px rgba(14, 14, 14, 0.25), 0 12px 32px rgba(14, 14, 14, 0.3);
}

.floating-button__main.active {
    background: #0e0e0e !important;
    color: #ffffff;
    box-shadow: 4px 4px 0px rgba(14, 14, 14, 0.3), 0 8px 24px rgba(14, 14, 14, 0.35) !important;
    animation: none !important;
}

.floating-button__main svg {
    width: 36px;
    height: 36px;
    stroke: #0e0e0e;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.floating-button__main.active svg {
    transform: rotate(45deg) scale(1.05);
    stroke: #ffffff;
}

@media (max-width: 480px) {
    .floating-button__main {
        width: 56px;
        height: 56px;
        border-width: 3px;
        box-shadow: 3px 3px 0px rgba(14, 14, 14, 0.2), 0 6px 16px rgba(14, 14, 14, 0.25);
    }
    
    .floating-button__main svg {
        width: 32px;
        height: 32px;
    }
}

.floating-button__menu {
    position: absolute;
    bottom: 90px;
    right: 0;
    background: #000;
    border: 3px solid #0e0e0e;
    box-shadow: 5px 5px 0px rgba(14, 14, 14, 0.2), 0 20px 60px rgba(14, 14, 14, 0.2);
    overflow: visible;
    opacity: 0;
    visibility: hidden;
    transform: scaleY(0);
    transform-origin: bottom center;
    transition: all 0.1s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: auto;
    width: auto;
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 0;
}

@media (max-width: 480px) {
    .floating-button__menu {
        position: absolute;
        bottom: 80px;
        right: 0;
        left: auto;
        width: auto;
        min-width: unset;
        max-width: calc(100vw - 80px);
        overflow: visible;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .floating-button__menu {
        position: absolute;
        bottom: 80px;
        right: 0;
        left: auto;
        width: auto;
        min-width: unset;
        max-width: calc(100vw - 100px);
        overflow: visible;
    }
}

.floating-button__menu.active {
    opacity: 1;
    visibility: visible;
    transform: scaleY(1);
}

.floating-button__item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #0e0e0e;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #0e0e0e;
    position: relative;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .floating-button__item {
        flex-direction: column;
        padding: 12px 10px;
        gap: 6px;
        text-align: center;
        position: relative;
    }
}

.floating-button__item:hover {
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    transform: translateX(4px) scale(1.01);
}

@media (max-width: 767px) {
    .floating-button__item:hover {
        background: #f0f0f0;
        padding-left: 12px;
        transform: none;
    }
}

.floating-button__item__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f5f5f5;
    border: 2px solid #0e0e0e;
    border-radius: 0;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 1px 1px 0px rgba(14, 14, 14, 0.1);
}

@media (max-width: 767px) {
    .floating-button__item__icon {
        width: 32px;
        height: 32px;
        border: 2px solid #0e0e0e;
        box-shadow: 1px 1px 0px rgba(14, 14, 14, 0.1);
    }
}

.floating-button__item:hover .floating-button__item__icon {
    background: #0e0e0e;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 3px 3px 0px rgba(14, 14, 14, 0.15);
}

@media (max-width: 767px) {
    .floating-button__item:hover .floating-button__item__icon {
        transform: none;
    }
}

.floating-button__item__icon svg {
    width: 22px;
    height: 22px;
    stroke: #0e0e0e;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s ease;
}

@media (max-width: 767px) {
    .floating-button__item__icon svg {
        width: 24px;
        height: 24px;
        stroke-width: 1.5;
    }
}

.floating-button__item:hover .floating-button__item__icon svg {
    stroke: #ffffff;
    transform: scale(1.18) rotate(8deg);
}

.floating-button__item__text {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    color: #0e0e0e;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

@media (max-width: 767px) {
    .floating-button__item__text {
        font-size: 11px;
        flex: 0;
        margin-top: 2px;
        min-height: 16px;
        font-weight: 500;
        text-transform: none;
    }
}

.floating-button__item__arrow {
    width: 16px;
    height: 16px;
    margin-left: auto;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.floating-button__item:hover .floating-button__item__arrow {
    opacity: 1;
    transform: translateX(4px);
}

.floating-button__item--orange {
    background: linear-gradient(135deg, #df6417 0%, #e67e27 100%);
    color: #ffffff;
}

.floating-button__item--orange .floating-button__item__text {
    color: #ffffff;
    font-weight: 600;
}

.floating-button__item--orange .floating-button__item__icon {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
}

.floating-button__item--orange .floating-button__item__icon svg {
    stroke: #ffffff;
    color: #ffffff;
}

.floating-button__item--orange:hover {
    background: linear-gradient(135deg, #e55f0f 0%, #df6417 100%);
    transform: translateX(4px);
}

.floating-button__item--orange:hover .floating-button__item__icon {
    background: #ffffff;
    border-color: #ffffff;
}

.floating-button__item--orange:hover .floating-button__item__icon svg {
    stroke: #df6417;
    color: #df6417;
}

.floating-button__item__img {
    width: 32px;
    height: 32px;
    display: block;
    filter: invert(1) brightness(1);
}

.floating-button__item--orange:hover .floating-button__item__img {
    filter: invert(0) brightness(1) sepia(1) hue-rotate(15deg);
}

.floating-button__item--with-submenu {
    cursor: pointer;
}

.floating-button__item--with-submenu.submenu-active {
    background: linear-gradient(135deg, #e55f0f 0%, #df6417 100%);
    transform: translateX(4px);
}

.floating-button__item--with-submenu.submenu-active .floating-button__item__icon {
    background: #ffffff;
    border-color: #ffffff;
}

.floating-button__item--with-submenu.submenu-active .floating-button__item__icon svg {
    stroke: #df6417;
    color: #df6417;
}

.floating-button__item--with-submenu.submenu-active .floating-button__item__img {
    filter: invert(0) brightness(1) sepia(1) hue-rotate(15deg);
}

.floating-button__item--with-submenu:hover + .floating-button__item__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.floating-button__item__submenu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

@media (max-width: 767px) {
    .floating-button__item__arrow {
        display: none;
    }
}

.floating-button__item__submenu {
    position: absolute;
    top: 0;
    right: 100%;
    transform: translateX(-8px) scale(0.9);
    transform-origin: right top;
    background: #0e0e0e;
    border: 3px solid #0e0e0e;
    box-shadow: 4px 4px 0px rgba(14, 14, 14, 0.15), 0 16px 50px rgba(14, 14, 14, 0.2);
    overflow: visible;
    opacity: 0;
    visibility: hidden;
    transition: all 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 160px;
    z-index: 2000;
    pointer-events: none;
}

.floating-button__item__submenu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}



@media (max-width: 767px) {
    .floating-button__item__submenu {
        position: absolute;
        top: 0;
        right: 100%;
        transform: translateX(-4px) scale(0.9);
        transform-origin: right top;
        border: 2px solid #0e0e0e;
        box-shadow: 2px 2px 0px rgba(14, 14, 14, 0.1), 0 4px 12px rgba(14, 14, 14, 0.1);
        background: #0e0e0e;
        min-width: auto;
        opacity: 0;
        visibility: hidden;
        transition: all 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
        z-index: 2000;
        pointer-events: none;
    }

    .floating-button__item__submenu.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(0) scale(1);
        pointer-events: auto;
    }
}

.floating-button__submenu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #1a1a1a;
    cursor: pointer;
    transition: all 0.12s ease;
    text-decoration: none;
    color: #ffffff;
    pointer-events: auto;
    background: linear-gradient(135deg, #df6417 0%, #e67e27 100%);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

@media (max-width: 767px) {
    .floating-button__submenu-item {
        flex-direction: column;
        padding: 12px 10px;
        gap: 6px;
        text-align: center;
        justify-content: center;
    }
}

.floating-button__submenu-item:hover {
    background: linear-gradient(135deg, #e55f0f 0%, #df6417 100%);
    transform: translateX(4px);
}

@media (max-width: 767px) {
    .floating-button__submenu-item:hover {
        transform: none;
    }
}

.floating-button__submenu-item:last-child {
    border-bottom: none;
}

.floating-button__submenu-item svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.floating-button__submenu-item:hover svg {
    stroke: #ffffff;
}

.floating-button__submenu-item__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #ffffff;
    border-radius: 0;
    transition: all 0.3s ease;
    box-shadow: 1px 1px 0px rgba(255, 255, 255, 0.2);
}

@media (max-width: 767px) {
    .floating-button__submenu-item__icon {
        width: 32px;
        height: 32px;
        border: 2px solid #ffffff;
        box-shadow: 1px 1px 0px rgba(255, 255, 255, 0.2);
    }
}

.floating-button__submenu-item:hover .floating-button__submenu-item__icon {
    background: #ffffff;
    transform: scale(1.08) translateY(-1px);
    box-shadow: 2px 2px 0px rgba(14, 14, 14, 0.12);
}

.floating-button__submenu-item__icon svg {
    width: 100%;
    height: 100%;
    stroke: #ffffff;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s ease;
    padding: 5px;
}

.floating-button__submenu-item:hover .floating-button__submenu-item__icon svg {
    stroke: #df6417;
    transform: scale(1.15) rotate(6deg);
}

.floating-button__submenu-item__text {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
}

.floating-button__submenu-item span {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
}

@media (max-width: 767px) {
    .floating-button__submenu-item__text {
        font-size: 11px;
        font-weight: 500;
    }
    
    .floating-button__submenu-item span {
        font-size: 11px;
        font-weight: 500;
    }
}

.floating-button__label {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    opacity: 1;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    animation: slideDownButton 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    order: -1;
    padding: 8px 14px;
    border: 2.5px solid #0e0e0e;
    border-radius: 0;
    background: #ffffff;
    box-shadow: 3px 3px 0px rgba(14, 14, 14, 0.15);
    position: relative;
    flex-shrink: 0;
}

.floating-button.active .floating-button__label {
    opacity: 0;
    visibility: hidden;
}

.floating-button__label-text {
    font-size: 12px;
    font-weight: 800;
    color: #0e0e0e;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-style: italic;
    position: relative;
    z-index: 1;
}

@media (max-width: 767px) {
    .floating-button__label {
        display: none;
    }
}

.floating-button__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(14, 14, 14, 0.28);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.floating-button__overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}
