/* WorkDone Contact Widget - Styles v1.0.0 */
.wd-widget-wrapper {
    --wd-primary: rgb(113, 71, 205);
    --wd-primary-dark: rgb(91, 57, 165);
    --wd-primary-light: rgb(135, 93, 227);
    --wd-bg-light: rgb(242, 237, 253);
    --wd-bg-lighter: rgb(248, 245, 254);
    --wd-text-dark: rgb(41, 36, 43);
    --wd-text-medium: rgb(91, 86, 93);
    --wd-text-light: rgb(141, 136, 143);
    --wd-white: rgb(255, 255, 255);
    --wd-shadow-primary: rgba(113, 71, 205, 0.3);
    --wd-shadow-dark: rgba(41, 36, 43, 0.1);
}

.wd-widget-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Widget container */
.wd-contact-widget {
    position: fixed;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    font-family: 'Montserrat', -apple-system, sans-serif;
}

.wd-contact-widget.wd-bottom-right {
    bottom: 30px;
    right: 30px;
}

.wd-contact-widget.wd-bottom-left {
    bottom: 30px;
    left: 30px;
    align-items: flex-start;
}

.wd-contact-widget.wd-top-right {
    top: 30px;
    right: 30px;
}

.wd-contact-widget.wd-top-left {
    top: 30px;
    left: 30px;
    align-items: flex-start;
}

/* Contact menu */
.wd-contact-menu {
    display: none;
    background: var(--wd-white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    box-shadow:
        0 20px 40px var(--wd-shadow-dark),
        0 10px 20px var(--wd-shadow-primary),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 360px;
    position: relative;
    border: 1px solid var(--wd-bg-light);
    overflow: hidden;
}

.wd-contact-menu.wd-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Menu arrow */
.wd-contact-menu::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--wd-white);
    transform: rotate(45deg);
    box-shadow: 5px 5px 10px var(--wd-shadow-dark);
    border: 1px solid var(--wd-bg-light);
}

.wd-bottom-right .wd-contact-menu::after {
    bottom: -8px;
    right: 35px;
    border-top: none;
    border-left: none;
}

.wd-bottom-left .wd-contact-menu::after {
    bottom: -8px;
    left: 35px;
    border-top: none;
    border-right: none;
}

.wd-top-right .wd-contact-menu::after {
    top: -8px;
    right: 35px;
    border-bottom: none;
    border-left: none;
}

.wd-top-left .wd-contact-menu::after {
    top: -8px;
    left: 35px;
    border-bottom: none;
    border-right: none;
}

/* Menu header */
.wd-menu-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--wd-bg-light);
    position: relative;
}

.wd-menu-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wd-text-dark);
    margin-bottom: 8px;
    position: relative;
    display: inline-block;
}

/* Status indicator */
.wd-status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--wd-primary);
    border-radius: 50%;
    margin-left: 8px;
    position: relative;
    animation: wd-pulse-status 2s ease infinite;
}

.wd-status-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: var(--wd-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: wd-pulse-wave 2s ease infinite;
}

@keyframes wd-pulse-status {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes wd-pulse-wave {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.wd-menu-subtitle {
    font-size: 14px;
    color: var(--wd-text-medium);
}

/* Contact list */
.wd-contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wd-contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px;
    background: var(--wd-bg-lighter);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.wd-contact-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--wd-primary);
    opacity: 0.1;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.wd-contact-item:hover::before {
    width: 300px;
    height: 300px;
}

.wd-contact-item:hover {
    transform: translateX(-8px) scale(1.02);
    background: var(--wd-white);
    box-shadow:
        0 10px 25px var(--wd-shadow-primary),
        0 5px 10px var(--wd-shadow-dark);
    border-color: var(--wd-primary-light);
}

/* Contact icons */
.wd-contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.wd-contact-item:hover .wd-contact-icon {
    transform: scale(1.1) rotate(5deg);
}

.wd-contact-icon svg {
    width: 26px;
    height: 26px;
    fill: white;
    position: relative;
    z-index: 1;
}

.wd-contact-icon.wd-phone {
    background: linear-gradient(135deg, var(--wd-primary), var(--wd-primary-light));
    box-shadow: 0 5px 15px var(--wd-shadow-primary);
}

.wd-contact-icon.wd-email {
    background: linear-gradient(135deg, var(--wd-text-dark), var(--wd-text-medium));
    box-shadow: 0 5px 15px var(--wd-shadow-dark);
}

.wd-contact-icon.wd-telegram {
    background: linear-gradient(135deg, #2AABEE, #229ED9);
    box-shadow: 0 5px 15px rgba(42, 171, 238, 0.3);
}

.wd-contact-icon.wd-viber {
    background: linear-gradient(135deg, var(--wd-primary), #9b59b6);
    box-shadow: 0 5px 15px var(--wd-shadow-primary);
}

.wd-contact-icon.wd-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.wd-contact-icon.wd-instagram {
    background: linear-gradient(135deg, #F58529, #E1306C, #833AB4);
    box-shadow: 0 5px 15px rgba(225, 48, 108, 0.3);
}

/* Contact info */
.wd-contact-info {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.wd-contact-label {
    font-size: 12px;
    color: var(--wd-text-light);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
    line-height: 1.2;
}

.wd-contact-value {
    margin-top: 5px;
    font-size: 14px;
    font-weight: 700;
    color: var(--wd-text-dark);
    line-height: 1.2;
}

/* Main toggle button */
.wd-contact-toggle {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--wd-primary) 0%, var(--wd-primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        0 15px 35px var(--wd-shadow-primary),
        0 5px 15px var(--wd-shadow-dark),
        inset 0 -2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid var(--wd-white);
    position: relative;
    overflow: visible;
    animation: wd-float 3s ease infinite;
}

@keyframes wd-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Pulse rings */
.wd-contact-toggle::before,
.wd-contact-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--wd-primary);
    opacity: 0.4;
    transform: translate(-50%, -50%);
    animation: wd-pulse-ring 3s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.wd-contact-toggle::after {
    animation-delay: 1s;
}

@keyframes wd-pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

.wd-contact-toggle.wd-active::before,
.wd-contact-toggle.wd-active::after {
    animation: none;
}

.wd-contact-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow:
        0 20px 40px var(--wd-shadow-primary),
        0 10px 20px var(--wd-shadow-dark);
    animation-play-state: paused;
}

.wd-contact-toggle:active {
    transform: scale(0.95);
}

.wd-contact-toggle svg {
    width: 32px;
    height: 32px;
    fill: white;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.wd-contact-toggle.wd-active svg {
    transform: rotate(90deg) scale(0.8);
}

/* Badge */
.wd-contact-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff3b30 0%, #ff6b6b 100%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 9px;
    border-radius: 12px;
    border: 2px solid white;
    animation: wd-badge-bounce 2s ease infinite;
    box-shadow: 0 3px 10px rgba(255, 59, 48, 0.3);
}

@keyframes wd-badge-bounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.05) rotate(5deg);
    }
}

/* CTA Button */
.wd-cta-button {
    background: linear-gradient(135deg, var(--wd-primary) 0%, var(--wd-primary-light) 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 5px 20px var(--wd-shadow-primary);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wd-cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.wd-cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.wd-cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px var(--wd-shadow-primary);
}

/* Widget hint */
.wd-widget-hint {
    position: absolute;
    bottom: 85px;
    right: 0;
    background: linear-gradient(135deg, var(--wd-primary) 0%, var(--wd-primary-light) 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow:
        0 10px 25px var(--wd-shadow-primary),
        0 5px 10px var(--wd-shadow-dark);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.wd-widget-hint::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 30px;
    width: 12px;
    height: 12px;
    background: var(--wd-primary);
    transform: rotate(45deg);
}

.wd-widget-hint.wd-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: wd-hint-float 3s ease-in-out infinite;
}

@keyframes wd-hint-float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

/* Quick actions */
.wd-quick-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--wd-bg-light);
}

.wd-quick-action {
    flex: 1;
    padding: 10px;
    background: var(--wd-bg-lighter);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.wd-quick-action:hover {
    background: var(--wd-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--wd-shadow-primary);
    border-color: var(--wd-primary-light);
}

.wd-quick-action-icon {
    font-size: 20px;
    margin-bottom: 5px;
}

.wd-quick-action-text {
    font-size: 11px;
    color: var(--wd-text-medium);
    font-weight: 600;
}

/* Loading indicator */
.wd-loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
    transparent,
    var(--wd-primary),
    var(--wd-primary-light),
    transparent);
    background-size: 200% 100%;
    animation: wd-loading 2s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.wd-loading-indicator.wd-active {
    opacity: 1;
}

@keyframes wd-loading {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Mobile responsive */
@media (max-width: 768px) {

    .wd-contact-menu {
        max-width: calc(100vw - 60px);
        padding: 20px;
    }

    .wd-contact-toggle {
        width: 60px;
        height: 60px;
    }

    .wd-contact-toggle svg {
        width: 28px;
        height: 28px;
    }
}

/* Widget entrance animation */
@keyframes wd-widget-entrance {
    from {
        transform: translateY(100px) scale(0.5);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.wd-contact-widget {
    animation: wd-widget-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
