.cwp-widget {
    position: fixed;
    z-index: 999999;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
    align-items: center;
    justify-content: center;
    overflow: visible;
    border: none;
    background: transparent;
    box-shadow: none;
}

.cwp-widget-container {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.15));
}

.cwp-widget-bubble {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    fill: #25D366;
}

.cwp-widget-icon {
    position: relative;
    z-index: 2;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cwp-widget-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    display: block;
}

.cwp-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cwp-indicator--online {
    background: #4CAF50;
}

.cwp-indicator--badge {
    background: #f44336;
    top: 1px;
    right: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
    width: 18px;
    height: 18px;
}

.cwp-indicator--badge .cwp-indicator-count {
    line-height: 1;
    margin-top: -1px;
}

.cwp-widget.bottom-left {
    right: auto;
    left: 20px;
}

.cwp-widget.bottom-left .cwp-indicator {
    right: auto;
    left: -2px;
}

.cwp-widget:hover {
    transform: scale(1.1);
}

.cwp-widget:hover .cwp-widget-container {
    filter: drop-shadow(0 6px 25px rgba(0, 0, 0, 0.3));
}

.cwp-widget:hover .cwp-widget-bubble {
    filter: brightness(1.1);
}

@keyframes cwp-icon-bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-180deg);
    }
    50% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes cwp-icon-bounce-out {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) rotate(180deg);
    }
}

@keyframes cwp-icon-float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.05);
    }
}

.cwp-widget-icon.animate-in {
    animation: cwp-icon-bounce-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.cwp-widget-icon.animate-out {
    animation: cwp-icon-bounce-out 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.cwp-widget-icon.float {
    animation: cwp-icon-float 3s ease-in-out infinite;
}

.cwp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    display: none;
}

.cwp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.cwp-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--cwp-modal-bg, #ffffff);
    border-radius: 20px;
    padding: 15px 30px 15px 30px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cwp-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: none !important;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.cwp-modal-close:hover {
    color: #333;
    background: none !important;
    box-shadow: none !important;
}

.cwp-modal-close svg {
    width: 20px;
    height: 20px;
}

.cwp-modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
    text-align: center;
}

.cwp-modal-subtitle {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.cwp-modal-main {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.cwp-qr-section {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 15px;
}

.cwp-buttons-section {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 15px;
}

.cwp-qr-container {
    background: white;
    border-radius: 15px;
    padding: 10px 20px 20px 20px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cwp-qr-title {
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-top: -5px;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.cwp-qr-title-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cwp-qr-title-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.cwp-qr-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: visible;
    border-radius: 10px;
}

.cwp-qr-scan-animation {
    position: absolute;
    top: -5px;
    left: -5px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cwp-qr-scan-animation.active {
    opacity: 1;
}

.cwp-scan-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: #00a8ff;
    border-width: 3px;
    opacity: 0.9;
}

.cwp-scan-corner-tl {
    top: -5px;
    left: -5px;
    border-top-style: solid;
    border-left-style: solid;
    border-top-left-radius: 8px;
}

.cwp-scan-corner-tr {
    top: -5px;
    right: -5px;
    border-top-style: solid;
    border-right-style: solid;
    border-top-right-radius: 8px;
}

.cwp-scan-corner-bl {
    bottom: -5px;
    left: -5px;
    border-bottom-style: solid;
    border-left-style: solid;
    border-bottom-left-radius: 8px;
}

.cwp-scan-corner-br {
    bottom: -5px;
    right: -5px;
    border-bottom-style: solid;
    border-right-style: solid;
    border-bottom-right-radius: 8px;
}

.cwp-scan-line {
    position: absolute;
    left: -2.5%;
    width: 105%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00a8ff, transparent);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.8);
    opacity: 0;
    border-radius: 2px;
}

@keyframes cwp-scan-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes cwp-scan-line {
    0% {
        top: -2px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: calc(100% + 2px);
        opacity: 0;
    }
}

.cwp-scan-corner {
    animation: cwp-scan-pulse 2s ease-in-out infinite;
}

.cwp-scan-corner-tl {
    animation-delay: 0s;
}

.cwp-scan-corner-tr {
    animation-delay: 0.5s;
}

.cwp-scan-corner-bl {
    animation-delay: 1s;
}

.cwp-scan-corner-br {
    animation-delay: 1.5s;
}

.cwp-scan-line {
    animation: cwp-scan-line 2s ease-in-out infinite;
}

.cwp-qr-image {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    display: block;
}

.cwp-qr-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.05) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333 !important;
    transition: all 0.3s ease;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 1 !important;
    z-index: 10;
    visibility: visible !important;
}

.cwp-qr-navigation:hover {
    color: #000 !important;
    background: rgba(255, 255, 255, 1) !important;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cwp-qr-navigation:active,
.cwp-qr-navigation:focus {
    background: rgba(255, 255, 255, 1) !important;
    outline: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.cwp-qr-wrapper:hover .cwp-qr-navigation {
    opacity: 1 !important;
}

.cwp-qr-prev {
    left: -25px;
}

.cwp-qr-next {
    right: -25px;
}

.cwp-qr-navigation svg {
    width: 20px;
    height: 20px;
}

.cwp-qr-hint {
    font-size: 12px;
    color: #666;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 5px 10px;
    border-radius: 6px;
    margin: -20px auto 0 auto;
    display: block;
    width: fit-content;
    z-index: 3;
}

.cwp-messenger-button {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: none;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    min-height: 50px;
}

.cwp-messenger-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

.cwp-button-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 12px;
}

.cwp-button-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.cwp-button-text {
    flex: 1;
    text-align: center;
    margin-right: 36px;
}

.cwp-button--whatsapp { background-color: #25D366; }
.cwp-button--telegram { background-color: #0088CC; }
.cwp-button--max { 
    background: linear-gradient(135deg, #4bc2fd 0%, #8E44AD 100%);
}

.cwp-modal-footer {
    margin-top: 20px;
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

.cwp-modal-footer p:last-child {
    margin-bottom: 0;
}

.cwp-mobile-sheet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000000;
    display: none;
}

.cwp-mobile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cwp-mobile-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cwp-modal-bg, #ffffff);
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cwp-mobile-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    padding: 20px 20px 10px 20px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.cwp-mobile-drag-handle {
    width: 40px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-bottom: 15px;
}

.cwp-mobile-close {
    display: none;
}

.cwp-mobile-body {
    padding: 0 20px 20px 20px;
}

.cwp-mobile-title-section {
    margin-bottom: 20px;
    text-align: center;
}

.cwp-mobile-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
}

.cwp-mobile-subtitle {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.cwp-mobile-buttons-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.cwp-mobile-footer {
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.4;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.cwp-mobile-footer p:last-child {
    margin-bottom: 0;
}

.cwp-mobile-safe-area {
    height: 10px;
    background: transparent;
}

.cwp-mobile-sheet.open .cwp-mobile-overlay {
    opacity: 1;
}

.cwp-mobile-sheet.open .cwp-mobile-content {
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .cwp-modal-content {
        max-width: 90%;
        padding: 25px;
    }
    
    .cwp-modal-main {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .cwp-modal {
        display: none !important;
    }
    
    .cwp-widget {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }
    
    .cwp-widget.bottom-left {
        right: auto;
        left: 20px;
    }
    
    .cwp-widget-container {
        width: 60px;
        height: 60px;
    }
    
    .cwp-widget-bubble {
        width: 60px;
        height: 60px;
    }
    
    .cwp-qr-section {
        display: none;
    }
    
    .cwp-buttons-section {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .cwp-widget {
        width: 56px;
        height: 56px;
        bottom: 16px;
        right: 16px;
    }
    
    .cwp-widget.bottom-left {
        right: auto;
        left: 16px;
    }
    
    .cwp-widget-container {
        width: 56px;
        height: 56px;
    }
    
    .cwp-widget-bubble {
        width: 56px;
        height: 56px;
    }
    
    .cwp-widget-icon {
        width: 22px;
        height: 22px;
    }
    
    .cwp-mobile-content {
        max-height: 80vh;
    }
    
    .cwp-mobile-body {
        padding: 0 16px 16px 16px;
    }
    
    .cwp-messenger-button {
        padding: 14px 15px;
        font-size: 15px;
        min-height: 54px;
    }
    
    .cwp-button-icon {
        width: 26px;
        height: 26px;
    }
}

@keyframes cwp-widget-appear {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    60% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes cwp-widget-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.cwp-widget.animate {
    animation: cwp-widget-appear 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.cwp-widget.pulse {
    animation: cwp-widget-pulse 2s ease-in-out infinite;
}

.cwp-modal.mobile-open .cwp-modal-content {
    animation: cwp-slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cwp-text-style-controls {
    margin-top: 8px;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.cwp-text-style-controls label {
    font-weight: normal;
    font-size: 13px;
    margin-right: 5px;
}

.cwp-widget.bottom-right {
    right: var(--cwp-margin-right, 20px);
    bottom: var(--cwp-margin-bottom, 20px);
}

.cwp-widget.bottom-left {
    left: var(--cwp-margin-left, 20px);
    bottom: var(--cwp-margin-bottom, 20px);
}

.cwp-modal-title {
    font-size: var(--cwp-title-font-size, 24px);
    color: var(--cwp-title-color, #333);
}

.cwp-modal-subtitle {
    font-size: var(--cwp-subtitle-font-size, 14px);
    color: var(--cwp-subtitle-color, #666);
}

.cwp-qr-hint {
    font-size: var(--cwp-qr-hint-font-size, 12px);
    color: var(--cwp-qr-hint-color, #666);
}

.cwp-modal-footer {
    font-size: var(--cwp-footer-text-font-size, 12px);
    color: var(--cwp-footer-text-color, #666);
}