/**
 * Nausys Discount Display Styles
 */

/* Discount Badge */
.badge-nl.discount-nl {
    background: #01024d;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(1, 2, 77, 0.3);
}

.badge-nl.discount-nl i {
    font-size: 11px;
}

.badge-nl.discount-nl.discount-active {
    background: #01024d;
    box-shadow: 0 2px 8px rgba(1, 2, 77, 0.3);
}

.badge-nl.discount-nl.discount-inactive {
    display: none;
}

@keyframes discount-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Price Prefix Text */
.listing-price-prefix {
    color: #777;
    font-size: 14px;
    font-weight: 400;
    margin-right: 2px;
}

/* Original Price (strikethrough) */
.listing-price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    font-weight: 400;
}

/* Discounted Price */
.listing-price-discounted {
    color: #27ae60 !important;
    font-weight: 700 !important;
    font-size: 18px !important;
}

/* Savings Indicator */
.listing-discount-savings {
    background: #27ae60;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

/* Live Price Container */
.nausys-live-price {
    text-align: right;
}

.nausys-live-price .listing-price-discounted {
    margin: 0;
    display: inline;
}

.nausys-live-price .listing-discount-savings {
    vertical-align: middle;
}

/* Loading State */
.listing-booking-nl.nausys-loading {
    position: relative;
    opacity: 0.6;
}

.listing-booking-nl.nausys-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: nausys-spin 0.8s linear infinite;
}

@keyframes nausys-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .badge-nl.discount-nl {
        font-size: 11px;
        padding: 3px 8px;
    }

    .listing-price-prefix {
        font-size: 12px;
    }

    .listing-price-original {
        font-size: 12px;
    }

    .listing-price-discounted {
        font-size: 16px !important;
    }

    .listing-discount-savings {
        font-size: 10px;
        padding: 1px 4px;
    }
}

/* Ensure badges wrap properly */
.listing-badges-nl {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

/* Multiple discount badges container */
.nausys-discount-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

/* Compact style for multiple badges */
.nausys-discount-badges .badge-nl.discount-nl {
    padding: 3px 8px;
    font-size: 11px;
    animation: none; /* Disable pulse for multiple badges */
}

.nausys-discount-badges .badge-nl.discount-nl i {
    font-size: 10px;
}

/* Consistent dark blue color for all badges */
.nausys-discount-badges .badge-nl.discount-nl:nth-child(1),
.nausys-discount-badges .badge-nl.discount-nl:nth-child(2),
.nausys-discount-badges .badge-nl.discount-nl:nth-child(3) {
    background: #01024d;
}

/* Price period styling consistency */
.nausys-live-price + .price-period-nl {
    display: block;
    width: 100%;
    margin-top: 2px;
}

/* Responsive for multiple badges */
@media (max-width: 768px) {
    .nausys-discount-badges {
        gap: 3px;
    }

    .nausys-discount-badges .badge-nl.discount-nl {
        padding: 2px 6px;
        font-size: 10px;
    }
}

/* ========================================
   Single Listing Page - Discounts Tab Section
   ======================================== */

.nausys-discounts-section {
    margin-bottom: 30px;
}

.nausys-discounts-section h3 {
    margin-bottom: 20px;
}

.nausys-discounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.nausys-discount-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #01024d;
}

.nausys-discount-card .discount-percent {
    background: #01024d;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
}

.nausys-discount-card .discount-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nausys-discount-card .discount-info strong {
    color: #333;
    font-size: 14px;
}

.nausys-discount-card .discount-month {
    color: #666;
    font-size: 13px;
}

.nausys-discount-card .discount-period {
    color: #999;
    font-size: 11px;
}

/* Responsive */
@media (max-width: 768px) {
    .nausys-discounts-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Booking Widget - Price Discount Display
   ======================================== */

.nausys-price-discount {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #f0f4ff;
    border-radius: 6px;
    border-left: 3px solid #01024d;
}

.nausys-price-discount .original-price-struck {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.nausys-price-discount .discount-badge {
    background: #01024d;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.nausys-price-discount .discount-name {
    color: #01024d;
    font-size: 12px;
    font-weight: 500;
}

/* Single listing page badges container */
.single-listing .nausys-discount-badges,
.listing-titlebar .nausys-discount-badges,
.listing-titlebar-tags .nausys-discount-badges {
    margin: 15px 0;
    display: inline-flex;
}

.single-listing .nausys-discount-badges .badge-nl.discount-nl,
.listing-titlebar .nausys-discount-badges .badge-nl.discount-nl,
.listing-titlebar-tags .nausys-discount-badges .badge-nl.discount-nl,
.listing-titlebar-tags .badge-nl.discount-nl {
    padding: 6px 12px;
    font-size: 13px;
    color: #fff !important;
}

.listing-titlebar-tags .badge-nl.discount-nl .discount-text,
.listing-titlebar .badge-nl.discount-nl .discount-text,
.single-listing .badge-nl.discount-nl .discount-text {
    color: #fff !important;
}

.listing-titlebar-tags .badge-nl.discount-nl i,
.listing-titlebar .badge-nl.discount-nl i,
.single-listing .badge-nl.discount-nl i {
    color: #fff !important;
}

/* Responsive */
@media (max-width: 768px) {
    .nausys-discount-list {
        padding: 15px;
    }

    .nausys-discount-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .nausys-discount-item .discount-percent {
        margin-right: 0;
    }

    .nausys-discount-item:nth-child(even) {
        margin: 0 -15px;
        padding: 12px 15px;
    }
}

/* ========================================
   Booking Widget - Pricing Breakdown
   ======================================== */

.nausys-booking-price-breakdown {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 15px;
}

.nausys-bpb-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: #333;
}

.nausys-bpb-row .nausys-bpb-label {
    font-weight: 400;
}

.nausys-bpb-row .nausys-bpb-value {
    font-weight: 500;
    text-align: right;
}

/* Discount rows */
.nausys-bpb-discount .nausys-bpb-label,
.nausys-bpb-discount .nausys-bpb-value {
    color: #27ae60;
}

/* Charter Total row */
.nausys-bpb-charter-total {
    border-top: 1px dashed #d1d5db;
    margin-top: 4px;
    padding-top: 8px;
    font-size: 15px;
}

.nausys-bpb-charter-total .nausys-bpb-label,
.nausys-bpb-charter-total .nausys-bpb-value {
    font-weight: 600;
}

/* Separator */
.nausys-bpb-separator {
    border-top: 2px solid #e5e7eb;
    margin: 8px 0;
}

/* TOTAL TO PAY NOW */
.nausys-bpb-total {
    padding-top: 4px;
}

.nausys-bpb-total .nausys-bpb-label {
    font-weight: 700;
    font-size: 14px;
    color: #27ae60;
}

.nausys-bpb-total .nausys-bpb-value {
    font-weight: 700;
    font-size: 18px;
    color: #27ae60;
}

@media (max-width: 768px) {
    .nausys-booking-price-breakdown {
        padding: 12px;
    }

    .nausys-bpb-row {
        font-size: 13px;
    }

    .nausys-bpb-total .nausys-bpb-value {
        font-size: 16px;
    }
}
