/**
 * ABM Trust Bar Styles
 * Responsive design with RTL/LTR support
 */

/* Main trust bar container */
.abm-trustbar {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0 20px 0;
    font-family: inherit;
    line-height: 1.6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    clear: both;
    overflow: hidden;
}

.abm-trustbar:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Content and badge layout - horizontal on desktop */
@media (min-width: 768px) {
    .abm-trustbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }
    
    .abm-trustbar-content {
        flex: 1;
    }
    
    .abm-trustbar-badge {
        flex-shrink: 0;
    }
}

/* Mobile stacked layout */
@media (max-width: 767px) {
    .abm-trustbar {
        display: block;
    }
    
    .abm-trustbar-badge {
        margin-top: 15px;
        text-align: center;
    }
}

/* Trust bar text section */
.abm-trustbar-text {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.abm-trustbar-text:last-child {
    margin-bottom: 0;
}

/* Icons container */
.abm-trustbar-icons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-top: 2px;
}

.abm-icon {
    width: 20px;
    height: 20px;
    color: #28a745;
    flex-shrink: 0;
}

.abm-icon-shield {
    color: #007cba;
}

.abm-icon-bolt {
    color: #ffc107;
}

.abm-icon-lock {
    color: #28a745;
}

/* Message text */
.abm-trustbar-message {
    flex: 1;
    color: #495057;
    font-size: 14px;
}

/* Payment methods line */
.abm-trustbar-payments {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

.payment-methods {
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Partner badge section */
.abm-trustbar-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.partner-badge-image {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

.partner-badge-text {
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
    white-space: nowrap;
}

/* Verify partnership button */
.verify-partnership-btn {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 11px;
    color: #007cba;
    text-decoration: none;
    border: 1px solid #007cba;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.verify-partnership-btn:hover {
    background: #007cba;
    color: white;
    text-decoration: none;
}

.verify-partnership-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* RTL Support */
.abm-trustbar.rtl {
    direction: rtl;
    text-align: right;
}

.abm-trustbar.rtl .abm-trustbar-text {
    flex-direction: row-reverse;
}

.abm-trustbar.rtl .abm-trustbar-icons {
    margin-top: 2px;
}

.abm-trustbar.rtl .abm-trustbar-badge {
    flex-direction: row-reverse;
}

/* LTR Support */
.abm-trustbar.ltr {
    direction: ltr;
    text-align: left;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .abm-trustbar {
        padding: 15px;
        margin: 10px 0 15px 0;
    }
    
    .abm-trustbar-text {
        gap: 10px;
    }
    
    .abm-icon {
        width: 18px;
        height: 18px;
    }
    
    .abm-trustbar-message {
        font-size: 13px;
    }
    
    .payment-methods {
        font-size: 11px;
    }
    
    .partner-badge-text {
        font-size: 11px;
    }
    
    .verify-partnership-btn {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    .abm-trustbar {
        border: 2px solid #000;
        background: #fff;
    }
    
    .abm-trustbar-message {
        color: #000;
    }
    
    .payment-methods {
        color: #333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .abm-trustbar,
    .verify-partnership-btn {
        transition: none;
    }
}

/* Print styles */
@media print {
    .abm-trustbar {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .verify-partnership-btn {
        border: 1px solid #000;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .abm-trustbar {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .abm-trustbar-message {
        color: #e2e8f0;
    }
    
    .payment-methods,
    .partner-badge-text {
        color: #a0aec0;
    }
    
    .abm-trustbar-payments {
        border-top-color: #4a5568;
    }
    
    .verify-partnership-btn {
        color: #63b3ed;
        border-color: #63b3ed;
    }
    
    .verify-partnership-btn:hover {
        background: #63b3ed;
        color: #1a202c;
    }
}

/* Focus management for accessibility */
.abm-trustbar:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Ensure proper spacing in WooCommerce context */
.woocommerce div.product .abm-trustbar {
    margin-top: 15px;
    margin-bottom: 20px;
}

/* Integration with common WooCommerce themes */
.summary .abm-trustbar {
    width: 100%;
    box-sizing: border-box;
}

/* Elementor compatibility */
.elementor-widget-shortcode .abm-trustbar {
    margin: 15px 0;
}

/* Gutenberg compatibility */
.wp-block-shortcode .abm-trustbar {
    margin: 15px 0;
}