/**
 * Secure Pricing Styles
 * 
 * Styles for the pricing display that only shows
 * when loaded via authenticated AJAX requests.
 */

/* Price container - hidden by default until loaded */
.product-price {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animated loading state */
.product-price:empty::before {
    content: '';
    display: block;
    width: 80px;
    height: 24px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 25%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Price display */
.product-price .price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #4caf50;
    display: inline-block;
}

/* Stock indicator */
.product-price .stock {
    display: inline-block;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 10px;
    font-weight: 500;
}

.product-price .stock.in-stock {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.product-price .stock.low-stock {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
}

.product-price .stock.out-of-stock {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
}

/* Login prompt link */
.product-price .login-for-pricing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(247, 147, 30, 0.15));
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 8px;
    color: #ff6b35;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-price .login-for-pricing:hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.25), rgba(247, 147, 30, 0.25));
    transform: translateY(-1px);
}

/* When price is loaded successfully */
.product-price.loaded {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Customer header bar (shown when logged in) */
.customer-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 16px;
    font-size: 0.85rem;
}

.customer-bar .welcome {
    color: #888;
}

.customer-bar .welcome strong {
    color: #fff;
}

.customer-bar .account-link {
    color: #4fc3f7;
    text-decoration: none;
}

.customer-bar .account-link:hover {
    text-decoration: underline;
}

.customer-bar .logout-link {
    color: #f44336;
    text-decoration: none;
}

/* Adjust body when customer bar is shown */
body.has-customer-bar {
    padding-top: 40px;
}
