/* Reset all styles for trust bar */
.tbp-trust-bar,
.tbp-trust-bar * {
    box-sizing: border-box;
}

.tbp-trust-bar {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden;
    background: transparent;
}

.tbp-items-wrapper {
    display: grid !important;
    gap: 0 !important;
    justify-content: center;
    align-items: start;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tbp-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-align: center;
    height: 100%;
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
}

.tbp-item:hover {
    transform: scale(1.02);
}

.tbp-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}

.tbp-item-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
}

.tbp-item-text {
    text-align: center;
    font-weight: 500;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    width: 100%;
    padding: 0 5px !important;
    margin: 0 !important;
    box-sizing: border-box;
}

/* Popup Styles */
.tbp-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.tbp-popup.active {
    display: flex;
}

.tbp-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: tbpFadeIn 0.3s ease;
}

.tbp-popup-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: visible;
    animation: tbpSlideIn 0.3s ease;
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    min-width: 300px;
    z-index: 1001;
    margin: 20px;
}

.tbp-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 35px;
    height: 35px;
    background: #dc3545;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1002;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 0;
    margin: 0;
}

.tbp-popup-close:hover {
    background: #c82333;
    transform: scale(1.1);
}

.tbp-popup-inner {
    padding: 20px;
    overflow: auto;
    max-height: calc(90vh - 40px);
    box-sizing: border-box;
}

/* Animations */
@keyframes tbpFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes tbpSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 480px) {
    .tbp-trust-bar {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .tbp-items-wrapper {
        gap: 0 !important;
        padding: 0 !important;
    }
    
    .tbp-item {
        gap: 3px;
    }
    
    .tbp-item-icon {
        width: var(--tbp-mobile-size, 100px);
        height: var(--tbp-mobile-size, 100px);
        margin: 0 auto !important;
    }
    
    .tbp-item-text {
        font-size: 12px;
        max-width: 100%;
        padding: 0 2px !important;
    }
    
    .tbp-popup-content {
        max-width: 95%;
        min-width: auto;
        margin: 10px;
    }
    
    .tbp-popup-close {
        top: -12px;
        right: -12px;
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
    
    .tbp-popup-inner {
        padding: 15px;
        max-height: calc(90vh - 30px);
    }
}

/* Responsive Design - Tablet */
@media (min-width: 481px) and (max-width: 768px) {
    .tbp-trust-bar {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .tbp-items-wrapper {
        gap: 0 !important;
        padding: 0 !important;
    }
    
    .tbp-item-icon {
        width: var(--tbp-tablet-size, 150px);
        height: var(--tbp-tablet-size, 150px);
        margin: 0 auto !important;
    }
    
    .tbp-popup-content {
        max-width: 85%;
        min-width: 350px;
        margin: 15px;
    }
    
    .tbp-popup-inner {
        padding: 20px;
    }
}

/* Responsive Design - Desktop */
@media (min-width: 769px) {
    .tbp-trust-bar {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .tbp-items-wrapper {
        gap: 0 !important;
        padding: 0 !important;
    }
    
    .tbp-item-icon {
        width: var(--tbp-desktop-size, 250px);
        height: var(--tbp-desktop-size, 250px);
        margin: 0 auto !important;
    }
    
    .tbp-popup-content {
        max-width: 70%;
        min-width: 400px;
        max-height: 80vh;
        margin: 20px;
    }
    
    .tbp-popup-inner {
        padding: 20px;
        max-height: calc(80vh - 40px);
    }
}

/* Fix for text alignment */
.tbp-item-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tbp-item:hover .tbp-item-text {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
}