/* ========================================
   Part C: Right Sidebar - Static Upgrades & Dynamic Total
   ======================================== */

.apply-sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Upgrade Cards (static info) */
.upgrade-card {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.upgrade-card:hover {
    border-color: var(--logoCyan, #2ebfa5);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 191, 165, 0.15);
}

.upgrade-card-header {
    background: linear-gradient(135deg, #e6f9f4, #d0f0e8);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.upgrade-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--logoCyan, #2ebfa5), #20a38d);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upgrade-card-icon i {
    font-size: 1rem;
    color: white;
}

.upgrade-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #343a40;
    margin: 0;
}

.upgrade-card-body {
    padding: 1rem 1.25rem;
}

/* Static info rows inside upgrade cards */
.upgrade-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    border-bottom: 1px dashed #e9ecef;
}

.upgrade-info-row:last-child {
    border-bottom: none;
}

.upgrade-info-row span {
    color: #6c757d;
}

.upgrade-info-row strong {
    color: #343a40;
}

.upgrade-info-row.upgrade-info-note {
    font-size: 0.95rem;
}
.upgrade-info-row.upgrade-info-note span,
.upgrade-info-row.upgrade-info-note strong {
    color: #6c757d;
}

.text-free {
    color: #28a745 !important;
}

.text-price {
    color: var(--logoBlue, #086AB0) !important;
}

/* Out of Stock */
.upgrade-card.out-of-stock {
    opacity: 0.75;
    position: relative;
    overflow: hidden;
}

.upgrade-card.out-of-stock::before {
    content: 'OUT OF STOCK';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 1.4rem;
    font-weight: 900;
    color: #dc3545;
    text-shadow: 0 0 20px rgba(255,255,255,0.9), 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 0.15em;
    white-space: nowrap;
    z-index: 2;
    pointer-events: none;
}

.upgrade-card.out-of-stock::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 4px,
        rgba(220, 53, 69, 0.12) 4px,
        rgba(220, 53, 69, 0.12) 8px
    );
    pointer-events: none;
    border-radius: 14px;
}

.upgrade-card.out-of-stock .upgrade-card-body,
.upgrade-card.out-of-stock .upgrade-card-header {
    filter: grayscale(0.4);
}

.upgrade-card.out-of-stock:hover {
    transform: none;
    border-color: #dee2e6;
}

.upgrade-card .out-of-stock-badge {
    margin-left: auto;
    background: #dc3545;
    color: white;
    font-size: 1rem;
    font-weight: 900;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- Total Price Card (dynamic) ---- */
.total-price-card {
    background: white;
    border: 2px solid #28a745;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.15);
    transition: all 0.3s ease;
}

.total-price-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.25);
}

.total-price-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.total-price-header i {
    font-size: 1.3rem;
}

.total-price-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.total-price-body {
    padding: 1.25rem;
    text-align: center;
}

.total-price-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #28a745;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.total-price-note {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
    padding: 0;
    font-style: italic;
    max-width: none;
}

/* Breakdown lines inside Total Price card */
.total-price-breakdown {
    margin: 0.75rem 0;
    border-top: 1px solid #e9ecef;
    padding-top: 0.75rem;
}

.total-price-breakdown:empty {
    display: none;
}

.tp-line {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: #495057;
    border-bottom: 1px dashed #e9ecef;
}

.tp-line:last-child {
    border-bottom: none;
}

.tp-line span:last-child {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
    .apply-sidebar-right {
        position: static;
        flex-direction: row;
        overflow-x: auto;
    }

    .upgrade-card,
    .total-price-card {
        min-width: 200px;
        flex: 1;
    }
}

@media (max-width: 576px) {
    .apply-sidebar-right {
        flex-direction: column;
    }

    .upgrade-card,
    .total-price-card {
        min-width: auto;
    }
}
