/* My Discounts Shortcode Styles */

.wc-ubp-my-discounts {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Section Headers */
.wc-ubp-section {
    margin-bottom: 50px;
}

.wc-ubp-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 3px solid #3b82f6;
    position: relative;
}

.wc-ubp-section-title:before {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: #1d4ed8;
}

/* Unified Discount Cards (Bundles + Pricing Discounts) */
.wc-ubp-discount-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 24px 30px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.wc-ubp-discount-card:hover {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
    transform: translateY(-2px);
}

.wc-ubp-discount-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.wc-ubp-discount-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
}

.wc-ubp-fully-owned {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.wc-ubp-price-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.wc-ubp-price-item {
    text-align: center;
}

.wc-ubp-price-label {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 600;
}

.wc-ubp-price-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

.wc-ubp-price-item.original .wc-ubp-price-value {
    text-decoration: line-through;
    color: #9ca3af;
}

.wc-ubp-price-item.discounted .wc-ubp-price-value {
    color: #059669;
}

.wc-ubp-price-item.savings .wc-ubp-price-value {
    color: #dc2626;
}

.wc-ubp-owned-section {
    margin: 24px 0;
    padding: 20px;
    background: #f0fdf4;
    border-left: 4px solid #10b981;
    border-radius: 8px;
}

.wc-ubp-owned-section strong {
    display: block;
    font-size: 16px;
    color: #065f46;
    margin-bottom: 12px;
}

.wc-ubp-owned-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wc-ubp-owned-list li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: #047857;
    font-size: 15px;
}

.wc-ubp-owned-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 8px;
    width: 20px;
    height: 20px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.wc-ubp-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    align-items: center;
}

.wc-ubp-view-bundle {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff !important;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    border: none;
    cursor: pointer;
}

.wc-ubp-view-bundle:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.wc-ubp-add-to-cart-btn {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    border: none;
    cursor: pointer;
    line-height: 1.5;
}

.wc-ubp-add-to-cart-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.wc-ubp-no-bundles,
.wc-ubp-login-message {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 12px;
    color: #6b7280;
    font-size: 18px;
}

.wc-ubp-no-bundles:before,
.wc-ubp-login-message:before {
    content: "ℹ";
    display: block;
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: #dbeafe;
    color: #3b82f6;
    border-radius: 50%;
    font-size: 36px;
    line-height: 60px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-ubp-discount-card {
        padding: 20px;
    }
    
    .wc-ubp-discount-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wc-ubp-discount-header h3 {
        font-size: 18px;
    }

    .wc-ubp-discount-badge {
        align-self: flex-start;
    }
    
    .wc-ubp-price-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .wc-ubp-price-value {
        font-size: 24px;
    }
    
    .wc-ubp-actions {
        justify-content: center;
    }
    
    .wc-ubp-view-bundle,
    .wc-ubp-add-to-cart-btn {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .wc-ubp-my-discounts {
        padding: 10px 0;
    }
    
    .wc-ubp-discount-card {
        padding: 16px;
        margin-bottom: 16px;
    }
}

/* Pricing Discounts Section */
.wc-ubp-rightpress-section {
    margin-top: 50px;
}

.wc-ubp-discount-description {
    color: #6b7280;
    font-size: 15px;
    line-height: 1.6;
    margin: 12px 0;
}

.wc-ubp-discount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.wc-ubp-applicable-products {
    margin-top: 20px;
    padding: 16px;
    background: #fffbeb;
    border-radius: 8px;
}

.wc-ubp-applicable-products strong {
    display: block;
    color: #92400e;
    font-size: 14px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wc-ubp-product-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wc-ubp-product-list li {
    padding: 6px 0;
    color: #78350f;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wc-ubp-product-list li a {
    color: #d97706;
    text-decoration: none;
    transition: color 0.2s ease;
    margin: 0;
}

.wc-ubp-product-list li a:hover {
    color: #b45309;
    text-decoration: underline;
}

.wc-ubp-product-list li.wc-ubp-more-products {
    font-style: italic;
    color: #92400e;
    padding-top: 8px;
    border-top: 1px solid #fde68a;
    margin-top: 8px;
}

.wc-ubp-rule-note {
    color: #6b7280;
    font-size: 14px;
    margin: 12px 0 0 0;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 6px;
    font-style: italic;
}

/* ── Bundle items table ────────────────────────── */
.wc-ubp-bundle-items {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.wc-ubp-bundle-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wc-ubp-bundle-table thead tr {
    background: #f3f4f6;
}

.wc-ubp-bundle-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

.wc-ubp-bundle-table td {
    padding: 11px 14px;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

.wc-ubp-bundle-table tbody tr:last-child td {
    border-bottom: none;
}

/* Owned row – green tint */
.wc-ubp-row--owned {
    background: #f0fdf4;
}

.wc-ubp-row--owned .wc-ubp-col-product a {
    color: #065f46;
    font-weight: 600;
    text-decoration: none;
}

.wc-ubp-row--owned .wc-ubp-col-product a:hover {
    text-decoration: underline;
}

/* Missing row – grey tint */
.wc-ubp-row--missing {
    background: #f9fafb;
}

.wc-ubp-row--missing .wc-ubp-col-product a {
    color: #9ca3af;
    text-decoration: none;
}

.wc-ubp-row--missing .wc-ubp-col-product a:hover {
    color: #6b7280;
    text-decoration: underline;
}

.wc-ubp-row--missing .wc-ubp-col-price {
    color: #9ca3af;
}

/* Status badges */
.wc-ubp-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.wc-ubp-status-badge--owned {
    background: #dcfce7;
    color: #15803d;
}

.wc-ubp-status-badge--missing {
    background: #f3f4f6;
    color: #9ca3af;
}

/* Column widths */
.wc-ubp-col-status { width: 120px; }
.wc-ubp-col-price  { width: 120px; text-align: right; }

@media (max-width: 480px) {
    .wc-ubp-col-price { display: none; }
    .wc-ubp-col-status { width: 100px; }
}
