/* Way Assistant Styles - Design Moderno */
.way-assistant {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 99999 !important; /* Aumentado z-index significativamente */
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 500px;
    pointer-events: auto;
}

.way-assistant-content {
    width: 100%;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    overflow: visible !important; /* Alterado para garantir que elementos não sejam cortados */
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    animation: waySlideUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.way-assistant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    padding: 15px 20px;
    position: relative;
    z-index: 2; /* Garantir que o cabeçalho fique acima */
}

.way-assistant-header:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none; /* Garantir que não bloqueie cliques */
    z-index: 1; /* Colocar abaixo do conteúdo */
}

.way-assistant-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    pointer-events: none; /* Impedir que o título bloqueie cliques */
}

.way-assistant-minimize {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
    position: relative;
    z-index: 10; /* Valor muito alto para garantir que esteja acima de tudo */
    margin-left: 15px; /* Mais espaço para clicar */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Sombra para destacar o botão */
}

.way-assistant-minimize:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Aumentar a área clicável do botão com um pseudo-elemento */
.way-assistant-minimize:before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: -1;
}

.way-assistant-body {
    padding: 20px;
    background-color: #FAFAFA;
    position: relative;
    z-index: 2;
}

.way-assistant-body p {
    margin: 0 0 15px;
    font-size: 14px;
    color: #4B5563;
    line-height: 1.5;
}

.way-assistant-body p.success-message {
    color: #047857;
    font-weight: 500;
    font-size: 16px;
    background-color: #ECFDF5;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid #10B981;
    margin-bottom: 20px;
    position: relative;
    animation: wayFadeIn 0.5s ease-in-out;
}

@keyframes wayFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.discount-code {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    background-color: white;
    border-radius: 12px;
    padding: 12px 15px;
    margin-top: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px dashed #8B5CF6;
    position: relative;
    overflow: hidden;
}

.discount-code:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
    opacity: 0.03;
    pointer-events: none; /* Garantir que não bloqueie cliques */
}

.discount-code .code-container {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.discount-code .buttons-container {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.discount-code code {
    font-size: 22px;
    padding: 0 10px;
    font-weight: bold;
    color: #4A5568;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

.copy-code {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(107, 114, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 3;
}

.copy-code:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(107, 114, 255, 0.5);
}

.copy-code:active {
    transform: translateY(0);
}

.apply-code {
    background: linear-gradient(135deg, #10B981 0%, #047857 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 3;
    margin-left: 8px;
}

.apply-code:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.5);
}

.apply-code:active {
    transform: translateY(0);
}

.way-assistant-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(90, 90, 255, 0.4);
    position: absolute;
    bottom: 0;
    right: 0;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    animation: wayPulse 2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 99999; /* Garantir que o ícone esteja sempre no topo */
}

.way-assistant-icon:hover {
    transform: scale(1.1);
}

.message-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(to bottom right, #FF416C, #FF4B2B);
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(255, 65, 108, 0.4);
    animation: wayJump 2s infinite;
}

@keyframes waySlideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes wayPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

@keyframes wayJump {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Responsivo para telas menores */
@media (max-width: 576px) {
    .way-assistant {
        bottom: 15px !important;
        right: 15px !important;
        max-width: 300px;
    }

    .discount-code code {
        font-size: 18px;
    }

    .discount-code .buttons-container {
        flex-direction: row;
    }

    .copy-code, .apply-code {
        margin: 5px;
        flex: 1;
    }
}

.wayassistant-free-shipping-notifier {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.wayassistant-message {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.wayassistant-message i {
    margin-right: 10px;
    color: #2fb5d2;
}

.wayassistant-progress {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.wayassistant-progress-bar {
    height: 100%;
    background-color: #2fb5d2;
    transition: width 0.3s ease;
}

/* Multi-message styles */
.way-assistant-messages {
    max-height: 300px;
    overflow-y: auto;
}

.way-assistant-message-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.way-assistant-message-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Make sure the message count is properly displayed */
.way-assistant-icon .message-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff5722;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}
