/**
 * ==========================================
 * MEDICAL TRUST - PRICE SUMMARY STYLES
 * Version: 5.0.0 - Ultra Slim Horizontal
 * Prefix: mtps (Medical Trust Price Summary)
 * ==========================================
 */

/* Reset lokalny dla naszego kontenera */
.mtps-widget *,
.mtps-widget *::before,
.mtps-widget *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

/* Główny wrapper */
.mtps-wrapper {
    display: block !important;
    width: 100% !important;
    margin: 15px 0 !important;
}

/* Główny kontener - Ultra Slim Design */
.mtps-widget {
    background: #f8fffe !important;
    border-radius: 12px !important;
    padding: 14px !important;
    border: 1px solid #e5e7eb !important;
    position: relative !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Główny wiersz */
.mtps-main-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

/* Sekcja cen */
.mtps-prices {
    display: flex !important;
    gap: 19px !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;
}

/* Pojedyncza pozycja ceny */
.mtps-price-item {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

/* Label */
.mtps-label {
    font-size: 12px !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    font-weight: 400 !important;
}

/* Wartość */
.mtps-value {
    font-size: 17px !important;
    color: #1e293b !important;
    font-weight: 600 !important;
}

/* Suma końcowa */
.mtps-total {
    font-size: 20px !important;
    color: #0d9488 !important;
    font-weight: 700 !important;
}

/* Badge dostawy */
.mtps-shipping-badge {
    background: #dcfce7 !important;
    color: #166534 !important;
    padding: 6px 11px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Ikona w badge */
.mtps-shipping-badge i,
.mtps-shipping-badge svg {
    width: 16px !important;
    height: 16px !important;
    fill: currentColor !important;
}

/* Mini progress bar */
.mtps-progress-mini {
    background: white !important;
    padding: 10px !important;
    border-radius: 8px !important;
}

/* Tekst progressu */
.mtps-progress-text {
    font-size: 13px !important;
    color: #64748b !important;
    margin-bottom: 8px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.mtps-progress-text strong {
    color: #3b82f6 !important;
    font-weight: 600 !important;
}

/* Pasek postępu */
.mtps-progress-bar {
    height: 6px !important;
    background: #e0e7ff !important;
    border-radius: 3px !important;
    overflow: hidden !important;
}

.mtps-progress-fill {
    height: 100% !important;
    background: linear-gradient(90deg, #3b82f6, #60a5fa) !important;
    transition: width 0.5s ease !important;
}

/* Wiersz zaufania */
.mtps-trust-row {
    display: flex !important;
    justify-content: space-around !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e5e7eb !important;
}

/* Element zaufania */
.mtps-trust-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    color: #64748b !important;
}

.mtps-trust-item i,
.mtps-trust-item svg {
    color: #3b82f6 !important;
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
    fill: currentColor !important;
}

/* Override dla cen WooCommerce */
.mtps-widget .woocommerce-Price-amount,
.mtps-widget .amount {
    font-weight: inherit !important;
    color: inherit !important;
    font-size: inherit !important;
    vertical-align: baseline !important;
}

.mtps-widget .woocommerce-Price-currencySymbol {
    font-size: inherit !important;
}

/* Animacja ładowania */
.mtps-widget.loading {
    opacity: 0.6 !important;
    pointer-events: none !important;
    position: relative !important;
}

.mtps-widget.loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 30px !important;
    height: 30px !important;
    border: 3px solid #3b82f6 !important;
    border-top-color: transparent !important;
    border-radius: 50% !important;
    animation: mtpsSpin 1s linear infinite !important;
}

@keyframes mtpsSpin {
    to { 
        transform: translate(-50%, -50%) rotate(360deg); 
    }
}

/* ==========================================
 * RESPONSYWNOŚĆ
 * ==========================================
 */

/* Desktop */
@media (min-width: 1024px) {
    .mtps-widget {
        max-width: 600px !important;
    }
    
    body.woocommerce-checkout .mtps-wrapper {
        display: flex !important;
        justify-content: flex-end !important;
    }
    
    body.woocommerce-checkout .mtps-widget {
        margin: 10px 0 !important;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .mtps-widget {
        padding: 12px !important;
    }
    
    .mtps-main-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .mtps-prices {
        justify-content: space-between !important;
        width: 100% !important;
    }
    
    .mtps-shipping-badge {
        align-self: flex-start !important;
        width: 100% !important;
        justify-content: center !important;
        margin-top: 5px !important;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .mtps-wrapper {
        margin: 10px -10px !important;
    }
    
    .mtps-widget {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
    
    .mtps-prices {
        gap: 12px !important;
    }
    
    .mtps-value {
        font-size: 15px !important;
    }
    
    .mtps-total {
        font-size: 19px !important;
    }
    
    .mtps-trust-item {
        font-size: 11px !important;
    }
}

/* Ultra Mobile (320px) */
@media (max-width: 380px) {
    .mtps-prices {
        gap: 10px !important;
    }
    
    .mtps-label {
        font-size: 11px !important;
    }
    
    .mtps-value {
        font-size: 14px !important;
    }
    
    .mtps-total {
        font-size: 17px !important;
    }
    
    .mtps-shipping-badge {
        font-size: 13px !important;
        padding: 5px 9px !important;
    }
    
    .mtps-progress-text {
        font-size: 12px !important;
    }
}

/* ==========================================
 * KOMPATYBILNOŚĆ Z MOTYWAMI
 * ==========================================
 */

/* Zapewnienie widoczności */
.woocommerce .mtps-widget,
.woocommerce-page .mtps-widget,
#content .mtps-widget,
.site-content .mtps-widget,
body.woocommerce-checkout .mtps-widget,
body.woocommerce-cart .mtps-widget {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 99 !important;
}

/* Storefront */
.storefront-full-width-content .mtps-widget {
    max-width: 100% !important;
}

/* Astra */
.ast-woocommerce-container .mtps-widget {
    margin: 10px 0 !important;
}

/* OceanWP */
.oceanwp-theme .mtps-widget {
    max-width: 100% !important;
}

/* Flatsome */
.flatsome .mtps-widget {
    margin: 10px auto !important;
}

/* ==========================================
 * HOVER EFFECTS
 * ==========================================
 */

.mtps-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
    transition: box-shadow 0.3s ease !important;
}

.mtps-shipping-badge:hover {
    background: #bbf7d0 !important;
    transition: background 0.2s ease !important;
}

/* ==========================================
 * PRINT STYLES
 * ==========================================
 */

@media print {
    .mtps-widget {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
        page-break-inside: avoid !important;
        background: white !important;
    }
    
    .mtps-progress-mini {
        display: none !important;
    }
}

/* Nuclear option - wymuszenie widoczności */
html body .mtps-widget,
html body.woocommerce .mtps-widget,
html body.woocommerce-page .mtps-widget,
html body.woocommerce-checkout .mtps-widget,
html body.woocommerce-cart .mtps-widget {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    pointer-events: auto !important;
}