/**
 * Copyright © Mgwalk. All rights reserved.
 * Price Change Indicator Styles
 */

/* ========================================
   Listing Page (Compact) Styles
   ======================================== */

.price-box.listing-price {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.price-box.listing-price .price-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.price-box.listing-price .price {
    font-size: 38px;
    font-weight: 700;
    color: #333;
}

/* Price Change Badge (Compact) */
.price-change-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.price-change-badge.price-arrow-up {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.price-change-badge.price-arrow-down {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.3);
}

.price-change-badge .price-arrow {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.price-change-badge .price-change-percent {
    font-size: 0.85rem;
}

/* ========================================
   Product Detail Page (Detailed) Styles
   ======================================== */

.property-price-container {
    margin-bottom: 15px;
}

.property-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--era-red);
    margin-bottom: 5px;
}

.price-change-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Price Change Indicator (Detailed) */
.price-change-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.price-change-indicator.price-arrow-up {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.price-change-indicator.price-arrow-down {
    background-color: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.3);
}

.price-change-indicator .price-arrow {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.price-change-indicator .price-change-amount {
    font-size: 1rem;
    line-height: 1.2;
}

.price-change-summary {
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.4;
}

/* Text Color Utilities */
.text-success {
    color: #198754 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-muted {
    color: #6c757d !important;
}

/* ========================================
   Animation Effects
   ======================================== */

.price-change-badge,
.price-change-indicator {
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse effect for price drops */
.price-arrow-down .price-arrow {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .property-price {
        font-size: 2rem;
    }

    .price-change-indicator {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .price-change-indicator .price-arrow {
        font-size: 1.3rem;
    }

    .price-box.listing-price {
        padding: 10px 12px;
    }

    .price-box.listing-price .price {
        font-size: 1.25rem;
    }

    .price-change-badge {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
}

@media (max-width: 576px) {
    .price-change-details {
        align-items: flex-start;
    }

    .price-change-summary {
        text-align: left;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .price-change-badge,
    .price-change-indicator {
        background-color: transparent !important;
        border: 1px solid #000 !important;
        color: #000 !important;
    }

    .price-arrow-up,
    .price-arrow-down {
        border-color: #000 !important;
    }
}
