/* Mobile Call Button Styles */

#callButton {
    background-color: #43b143 !important;
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    border-radius: 50%;
    position: fixed;
    bottom: 10px;
    left: 15px;
    z-index: 9997;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

#callButton i {
    font-size: 20px;
}

#callButton:hover {
    background-color: #ff0000;
    transform: scale(1.1);
}

/* Popup overlay */
#contactPopup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

/* Popup content */
.popup-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 320px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popup-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.popup-phone {
    font-size: 16px;
    color: #007cba;
    font-weight: bold;
    margin-bottom: 20px;
    background: #f0f8ff;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e6f3ff;
}

.contact-options {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.contact-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    color: white;
}

.call-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.call-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ba085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: white;
}

.zalo-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.zalo-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    color: white;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Tooltip Styles */
.tooltip {
    position: fixed;
    bottom: 60px;
    left: 15px;
    background: linear-gradient(to right, #fffacd, #e7fee0);
    color: #8b008b;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    max-width: calc(100vw - 30px);
    width: fit-content;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    opacity: 0;
    border: 1px double #2b7c12;
    transition: opacity 0.3s ease;
}

.tooltip::before {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fffacd;
}

.tooltip.show {
    opacity: 1;
}

.tooltip.hide {
    opacity: 0;
}

.typewriter {
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
    margin: 0;
    border-right: 2px solid #8b008b;
    animation: blink-caret 0.5s step-end infinite;
}

.phone-number-highlight {
    color: #ff0000;
    font-weight: bold;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #8b008b; }
}

/* Responsive design for smaller screens */
@media (max-width: 480px) {
    .tooltip {
        max-width: calc(100vw - 20px);
        font-size: 13px;
        padding: 10px 14px;
        left: 10px;
        bottom: 55px;
        font-style: italic;
    }
    
    .tooltip::before {
        left: 15px;
    }
    
    .popup-content {
        padding: 20px;
        max-width: 300px;
    }
    
    .contact-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-btn {
        padding: 14px 16px;
        font-size: 15px;
    }
}