/**
 * Frontend Styles for Contact Hotline Float
 */

.contact-hotline-wrapper {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999999;
    box-sizing: border-box;
}

/* Positions */
.contact-hotline-wrapper.position-left {
    left: 0;
}

.contact-hotline-wrapper.position-right {
    right: 0;
}

.contact-hotline-items {
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    /* Re-enable clicks on hotline items */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* Shape variants */
.shape-square .contact-hotline-item {
    border-radius: 0;
}

.shape-rounded .contact-hotline-items {
    border-radius: 8px;
}

.shape-circle .contact-hotline-items {
    border-radius: 30px;
}

.shape-circle .contact-hotline-item {
    border-radius: 50%;
    margin: 6px;
    border-bottom: none !important;
}

.shape-circle .contact-hotline-items {
    box-shadow: none;
    background: transparent !important;
    overflow: visible;
}

/* Item Styling */
.contact-hotline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-sizing: border-box;
    cursor: pointer;
}

.contact-hotline-item:last-child {
    border-bottom: none;
}

/* Icon box */
.hotline-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.hotline-icon-box svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.hotline-custom-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.hotline-custom-svg-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.hotline-custom-svg-wrapper svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Label styling */
.hotline-item-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Size Variants */
/* 1. Medium (Default) */
.size-medium .contact-hotline-item {
    width: 64px;
    height: 64px;
    padding: 10px 5px;
}

.size-medium .hotline-icon-box,
.size-medium .hotline-custom-icon-img,
.size-medium .hotline-custom-svg-wrapper {
    width: 24px;
    height: 24px;
}

.size-medium .hotline-item-label {
    font-size: 11px;
    margin-top: 5px;
}

/* 2. Small */
.size-small .contact-hotline-item {
    width: 54px;
    height: 54px;
    padding: 6px 3px;
}

.size-small .hotline-icon-box,
.size-small .hotline-custom-icon-img,
.size-small .hotline-custom-svg-wrapper {
    width: 18px;
    height: 18px;
}

.size-small .hotline-item-label {
    font-size: 9px;
    margin-top: 3px;
}

/* 3. Large */
.size-large .contact-hotline-item {
    width: 86px;
    height: 86px;
    padding: 14px 8px;
}

.size-large .hotline-icon-box,
.size-large .hotline-custom-icon-img,
.size-large .hotline-custom-svg-wrapper {
    width: 30px;
    height: 30px;
}

.size-large .hotline-item-label {
    font-size: 13px;
    margin-top: 6px;
}

/* Hover Effects */
/* 1. Scale */
.hover-scale .contact-hotline-item:hover {
    transform: scale(1.1);
    z-index: 2;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.hover-scale.shape-circle .contact-hotline-item:hover {
    transform: scale(1.15);
}

/* 2. Glow */
.hover-glow .contact-hotline-item:hover {
    box-shadow: inset 0 0 100px rgba(255, 255, 255, 0.2), 0 0 15px currentColor;
    z-index: 2;
}

/* 3. Slide Label (Starts collapsed, slides out label on hover) */
.hover-slide-label .contact-hotline-item {
    width: 50px;
    overflow: hidden;
    justify-content: flex-start;
    flex-direction: row;
    padding-left: 15px;
    padding-right: 15px;
}

.hover-slide-label.size-small .contact-hotline-item {
    width: 40px;
    padding-left: 11px;
}

.hover-slide-label.size-large .contact-hotline-item {
    width: 60px;
    padding-left: 15px;
}

.hover-slide-label .hotline-item-label {
    opacity: 0;
    max-width: 0;
    margin-top: 0;
    margin-left: 0;
    overflow: hidden;
}

.hover-slide-label .contact-hotline-item:hover {
    width: 150px;
}

.hover-slide-label.size-small .contact-hotline-item:hover {
    width: 120px;
}

.hover-slide-label.size-large .contact-hotline-item:hover {
    width: 180px;
}

.hover-slide-label .contact-hotline-item:hover .hotline-item-label {
    opacity: 1;
    max-width: 120px;
    margin-left: 10px;
}

/* Glassmorphism Effect */
.glass-effect .contact-hotline-items {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-effect .contact-hotline-item {
    background: transparent !important;
    color: #1f2937 !important;
    fill: #1f2937 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-effect.shape-circle .contact-hotline-item {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animations on Entrance */
.anim-fade-in {
    animation: hotlineFadeIn 0.8s ease forwards;
}

.anim-slide-in.position-right {
    animation: hotlineSlideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-slide-in.position-left {
    animation: hotlineSlideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-bounce {
    animation: hotlineBounce 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes hotlineFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes hotlineSlideInRight {
    from {
        transform: translate(100px, -50%);
        opacity: 0;
    }

    to {
        transform: translate(0, -50%);
        opacity: 1;
    }
}

@keyframes hotlineSlideInLeft {
    from {
        transform: translate(-100px, -50%);
        opacity: 0;
    }

    to {
        transform: translate(0, -50%);
        opacity: 1;
    }
}

@keyframes hotlineBounce {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }

    60% {
        transform: translateY(-60%);
        opacity: 0.8;
    }

    80% {
        transform: translateY(-45%);
        opacity: 0.9;
    }

    100% {
        transform: translateY(-50%);
        opacity: 1;
    }
}

/* Mobile Toggle CSS */
.hotline-mobile-toggle {
    display: none;
}

/* Device Visibility Settings */
@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    /* Reposition wrapper to bottom right/left corner on mobile */
    .contact-hotline-wrapper {
        top: auto !important;
        bottom: 20px !important;
        transform: none !important;
        margin: 0 !important;
    }

    .contact-hotline-wrapper.position-right {
        right: 20px !important;
        left: auto !important;
    }

    .contact-hotline-wrapper.position-left {
        left: 20px !important;
        right: auto !important;
    }

    /* Floating list styling on mobile: starts hidden and floats up when toggled */
    .contact-hotline-items {
        position: absolute;
        bottom: 68px;
        z-index: 99;
        opacity: 0;
        pointer-events: none;
        transform: translateY(20px) scale(0.85);
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    }

    .contact-hotline-wrapper.position-right .contact-hotline-items {
        right: 0;
        transform-origin: bottom right;
    }

    .contact-hotline-wrapper.position-left .contact-hotline-items {
        left: 0;
        transform-origin: bottom left;
    }

    /* Opened state */
    .contact-hotline-wrapper.is-open .contact-hotline-items {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    /* Style for the Hotline Item on mobile */
    .contact-hotline-item {
        width: 60px !important;
        height: 60px !important;
        padding: 8px 4px !important;
        transform: none !important;
        /* Disable hover scale to avoid glitches with slide-up */
    }

    .size-small .contact-hotline-item {
        width: 50px !important;
        height: 54px !important;
    }

    .size-large .contact-hotline-item {
        width: 70px !important;
        height: 74px !important;
    }

    /* Display mobile toggle button */
    .hotline-mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: #3b82f6;
        /* Default theme color */
        color: #ffffff;
        border: none;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        z-index: 100;
        outline: none;
        padding: 0;
        margin: 0;
    }

    .hotline-mobile-toggle svg {
        width: 26px;
        height: 26px;
        fill: currentColor;
        transition: transform 0.3s ease;
        display: block;
    }

    /* Icon states */
    .hotline-mobile-toggle .hotline-toggle-icon-close {
        display: none;
    }

    .contact-hotline-wrapper.is-open .hotline-mobile-toggle {
        background: #ef4444 !important;
        /* Turn red when open */
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
        transform: rotate(90deg);
    }

    .contact-hotline-wrapper.is-open .hotline-mobile-toggle .hotline-toggle-icon-open {
        display: none;
    }

    .contact-hotline-wrapper.is-open .hotline-mobile-toggle .hotline-toggle-icon-close {
        display: block;
    }

    /* Ripple pulsing effect */
    .hotline-mobile-toggle::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 50%;
        background: inherit;
        z-index: -1;
        animation: hotlinePulse 2s infinite;
        opacity: 0.4;
    }
}

@keyframes hotlinePulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}