/* ============================================
   DISCOUNT CODE UI - Manual Entry & Display
   ============================================ */

/* Discount Banner (shown when code is applied) */
.discount-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-weight: 600;
    z-index: 99999;
    animation: slideDown 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.discount-banner code {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
}

.discount-banner .close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.discount-banner .close-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Discount Code Input Section */
.pm-discount-section {
    background: var(--bg-secondary, #10192b);
    border: 1px dashed var(--border, #24324a);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 24px;
    text-align: center;
}

.pm-discount-section.has-code {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.pm-discount-label {
    font-size: 0.875rem;
    color: var(--text-secondary, #b3c1d9);
    margin-bottom: 12px;
}

.pm-discount-input-group {
    display: flex;
    gap: 8px;
    max-width: 300px;
    margin: 0 auto;
}

.pm-discount-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border, #24324a);
    border-radius: 8px;
    background: var(--surface, #152238);
    color: var(--text, #fff);
    font-size: 1rem;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 1px;
}

.pm-discount-input:focus {
    outline: none;
    border-color: var(--primary, #0e7490);
}

.pm-discount-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pm-discount-btn {
    padding: 12px 20px;
    background: var(--primary, #0e7490);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.pm-discount-btn:hover {
    background: var(--primary-hover, #0b6077);
}

.pm-discount-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Applied Code Display */
.pm-discount-applied {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.pm-discount-code {
    font-family: 'Space Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
    padding: 8px 16px;
    border-radius: 8px;
}

.pm-discount-amount {
    font-size: 1rem;
    color: var(--text-secondary, #b3c1d9);
}

.pm-discount-remove {
    background: transparent;
    border: none;
    color: var(--text-muted, #8fa4c4);
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: underline;
}

.pm-discount-remove:hover {
    color: #ef4444;
}

/* Price Display with Discount */
.pm-price-with-discount {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.pm-original-price {
    font-size: 1.25rem;
    color: var(--text-muted, #8fa4c4);
    text-decoration: line-through;
}

.pm-discounted-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #22c55e;
}

.pm-savings-amount {
    font-size: 0.875rem;
    color: #22c55e;
    font-weight: 600;
}

/* Popular badge with discount */
.pm-card.pm-popular .pm-save.with-discount {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
}

/* Responsive */
@media (max-width: 480px) {
    .pm-discount-input-group {
        flex-direction: column;
    }
    
    .pm-discount-btn {
        width: 100%;
    }
}
