/* Independent Floating Price Island */
#stickyPriceContainer {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 45;
    display: none;
    animation: slideUpIn 0.3s ease-out;
    max-width: 56rem; /* max-w-4xl = 896px - match calculator width */
    width: calc(100% - 2rem);
    
    /* Enhanced backdrop blur effect */
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    backdrop-filter: blur(12px) saturate(180%);
    
    /* Smooth transitions */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-price-island {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    transition: all 0.3s ease;
}

.dark .sticky-price-island {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.sticky-price-island:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.dark .sticky-price-island:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

#stickyPriceContainer.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

#stickyPriceContainer.hide {
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
}

/* Price breakdown sections */
.price-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.dark .price-breakdown-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.price-breakdown-item:last-child {
    border-bottom: none;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 2px solid rgba(59, 130, 246, 0.2);
    font-weight: 600;
}

.breakdown-label {
    font-size: 0.875rem;
    color: #6b7280;
    transition: color 0.2s ease;
}

.dark .breakdown-label {
    color: #9ca3af;
}

.breakdown-value {
    font-weight: 500;
    color: #374151;
    transition: color 0.2s ease;
}

.dark .breakdown-value {
    color: #f3f4f6;
}

.breakdown-multiplier {
    color: #059669;
    font-size: 0.875rem;
}

.dark .breakdown-multiplier {
    color: #10b981;
}

.breakdown-discount {
    color: #dc2626;
    font-size: 0.875rem;
}

.dark .breakdown-discount {
    color: #ef4444;
}

/* Final price styling */
.final-price-value {
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 700;
}

.dark .final-price-value {
    color: #f9fafb;
}

/* Price update animation */
#currentPrice, #finalCalculation {
    transition: all 0.2s ease;
}

.price-update {
    animation: priceUpdate 0.3s ease-out;
}

@keyframes priceUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); color: #3b82f6; }
    100% { transform: scale(1); }
}

/* Animation */
@keyframes slideUpIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #stickyPriceContainer {
        bottom: 0.5rem;
        max-width: calc(100% - 2rem); /* Full width minus padding on mobile */
        width: calc(100% - 2rem);
    }
    
    .sticky-price-island {
        padding: 0.75rem;
        border-radius: 12px;
    }
    
    .price-breakdown-item {
        padding: 0.375rem 0;
    }
    
    .breakdown-label {
        font-size: 0.8125rem;
    }
    
    .final-price-value {
        font-size: 1rem;
    }
}

/* Hide on very small screens to avoid overlap */
@media (max-width: 380px) {
    #stickyPriceContainer {
        display: none !important;
    }
}

/* Blur effect support fallback */
@supports not (backdrop-filter: blur(12px)) {
    .sticky-price-island {
        background: rgba(255, 255, 255, 0.95);
    }
    
    .dark .sticky-price-island {
        background: rgba(17, 24, 39, 0.95);
    }
}