/* ============================================================
   Thịnh Series - Button Contact (Frontend CSS)
   ============================================================ */

.tbc-container {
    position: fixed;
    bottom: 30px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none; /* Let clicks pass through container */
}

/* Positions */
.tbc-pos-left {
    left: 30px;
    align-items: flex-start;
}
.tbc-pos-right {
    right: 30px;
    align-items: flex-end;
}

/* Hide settings */
@media (max-width: 768px) {
    .tbc-hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
    .tbc-hide-desktop { display: none !important; }
}

/* Base Item */
.tbc-item {
    position: relative;
    pointer-events: auto; /* Re-enable clicks for items */
    display: flex;
    align-items: center;
}
.tbc-pos-right .tbc-item {
    flex-direction: row-reverse;
}

/* Circle Icon */
.tbc-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
    transition: transform 0.3s ease;
}
.tbc-circle a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}
.tbc-circle:hover {
    transform: scale(1.1);
}

/* Pulse Animation (Only for Phone) */
.tbc-item-phone .tbc-circle {
    animation: tbc-pulse-bg 2s infinite;
}

.tbc-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid transparent;
    border-radius: 50%;
    z-index: 1;
    animation: tbc-pulse-ring 2s infinite;
    pointer-events: none;
}

@keyframes tbc-pulse-ring {
    0% { transform: scale(0.6); opacity: 0; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}
@keyframes tbc-pulse-bg {
    0% { box-shadow: 0 0 0 0 rgba(0,0,0,0.5); }
    70% { box-shadow: 0 0 0 15px rgba(0,0,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

/* Phone Bar (Pill shape) */
.tbc-bar {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 20px;
    color: #fff !important;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
    position: absolute;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Bar Positioning */
.tbc-pos-left .tbc-bar {
    left: 25px; /* Overlap with circle */
    padding-left: 35px;
    border-radius: 0 20px 20px 0;
}
.tbc-pos-right .tbc-bar {
    right: 25px; /* Overlap with circle */
    padding-right: 35px;
    border-radius: 20px 0 0 20px;
}

.tbc-item-phone:hover .tbc-bar {
    transform: translateX(5px);
}
.tbc-pos-right .tbc-item-phone:hover .tbc-bar {
    transform: translateX(-5px);
}

/* Mobile Adjustments */
@media (max-width: 576px) {
    .tbc-container { bottom: 20px; }
    .tbc-pos-left { left: 20px; }
    .tbc-pos-right { right: 20px; }
    .tbc-circle { width: 44px; height: 44px; }
    .tbc-circle svg { width: 20px; height: 20px; }
    .tbc-bar { height: 34px; font-size: 14px; }
}
