/* ==============================================================================
   Discount Badge and Price Display Styles
   ============================================================================== */

/* Discount Badge */
.discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.4);
    z-index: 10;
    animation: pulse-discount 2s ease-in-out infinite;
}

.discount-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    border-radius: 20px;
}

@keyframes pulse-discount {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(255, 77, 79, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(255, 77, 79, 0.6);
    }
}

/* Price Container */
.room-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 12px;
}

/* Old Price (Crossed Out) */
.room-price-old {
    font-size: 14px;
    color: #ff4d4f;
    text-decoration: line-through;
    text-decoration-color: #ff4d4f;
    text-decoration-thickness: 2px;
    opacity: 0.85;
    font-weight: 500;
    position: relative;
}

.room-price-old[aria-hidden="true"] {
    /* Accessibility: hidden from screen readers */
}

/* Current/Discounted Price */
.room-price-current {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.room-price-current.with-discount {
    color: #ff4d4f;
    animation: fade-in-price 0.3s ease-out;
}

@keyframes fade-in-price {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Price Label */
.room-price-label {
    font-size: 12px;
    color: #595959;
    font-weight: 500;
    margin-top: 2px;
}

/* Price Currency Symbol */
.price-currency {
    font-size: 18px;
    margin-left: 4px;
    font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .discount-badge {
        top: 8px;
        right: 8px;
        padding: 4px 10px;
        font-size: 12px;
    }

    .room-price-current {
        font-size: 20px;
    }

    .room-price-old {
        font-size: 12px;
    }
}

/* Card Hover Effect with Discount */
.room-card.has-discount:hover {
    box-shadow: 0 12px 32px rgba(255, 77, 79, 0.15);
    transform: translateY(-4px);
    transition: all 0.3s ease;
}

/* Admin Preview Styles */
.admin-discount-preview {
    border: 2px dashed #ff4d4f;
    background: #fff1f0;
    padding: 16px;
    border-radius: 8px;
    margin-top: 12px;
}

.admin-discount-preview-title {
    font-size: 14px;
    font-weight: 600;
    color: #ff4d4f;
    margin-bottom: 8px;
}

.admin-discount-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 13px;
}

.admin-discount-info-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #ffe7e7;
}

.admin-discount-info-label {
    color: #595959;
}

.admin-discount-info-value {
    font-weight: 600;
    color: #1a1a1a;
}

/* Discount Schedule Indicator */
.discount-schedule {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #8c8c8c;
    margin-top: 4px;
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 12px;
}

.discount-schedule-icon {
    font-size: 10px;
}

/* Discount Expired/Upcoming Styles */
.discount-expired {
    opacity: 0.5;
    text-decoration: line-through;
}

.discount-upcoming {
    background: linear-gradient(135deg, #faad14 0%, #ffc53d 100%);
    color: #ffffff;
}

/* Number Formatting Helper */
.price-number {
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
}

/* Accessibility Improvements */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .room-price-current {
        color: #ffffff;
    }

    .room-price-current.with-discount {
        color: #ff7875;
    }

    .room-price-old {
        color: #8c8c8c;
    }

    .admin-discount-preview {
        background: #2c1618;
        border-color: #ff7875;
    }
}