/**
 * Prime Day Article Add-on — Frontend Styles
 * All selectors use the pd- prefix to avoid collisions with the parent plugin.
 * Color palette: Amazon Orange #FF9900 · Dark Navy #232F3E · Urgency Red #E31837
 */

/* ═══════════════════════════════════════════
   1. Hero Banner
   ═══════════════════════════════════════════ */
.pd-hero {
    background: linear-gradient(135deg, #232F3E 0%, #1a2030 60%, #111827 100%);
    border-radius: 14px;
    padding: 36px 32px 30px;
    margin: 0 0 36px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Warm glow in top-right corner */
.pd-hero::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 153, 0, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.pd-hero-badge {
    display: inline-block;
    background: #FF9900;
    color: #232F3E;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.pd-hero h2 {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin: 0 0 12px !important;
    border: none !important;
    padding: 0 !important;
    line-height: 1.35;
}

.pd-hero h2::after {
    display: none !important;
}

.pd-hero p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    margin: 0 0 22px;
    line-height: 1.65;
    max-width: 680px;
}

.pd-hero-cta {
    display: inline-block;
    background: #FF9900;
    color: #232F3E !important;
    font-weight: 700;
    padding: 11px 26px;
    border-radius: 7px;
    text-decoration: none !important;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: background 0.18s, transform 0.18s;
    box-shadow: 0 3px 10px rgba(255, 153, 0, 0.35);
}

.pd-hero-cta:hover {
    background: #e68900;
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════
   2. Deal-Overview Table
   ═══════════════════════════════════════════ */
.pd-deal-table-wrapper {
    margin: 0 0 36px;
}

.pd-deal-table-wrapper h2 {
    margin-bottom: 16px;
}

.pd-deal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
}

.pd-deal-table thead th {
    background: #232F3E;
    color: #fff;
    padding: 13px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.pd-deal-table thead th:first-child {
    text-align: center;
    width: 44px;
}

.pd-deal-table tbody tr {
    border-bottom: 1px solid #f0f2f5;
    background: #fff;
    transition: background 0.14s;
}

.pd-deal-table tbody tr:last-child {
    border-bottom: none;
}

.pd-deal-table tbody tr:hover {
    background: #FFF9F0;
}

.pd-deal-table td {
    padding: 13px 16px;
    vertical-align: middle;
}

.pd-tbl-rank {
    text-align: center !important;
    font-size: 18px;
    width: 44px;
}

.pd-tbl-name {
    font-weight: 600;
    color: #1a2942;
}

/* Badge variants */
.pd-tbl-badge {
    display: inline-block;
    background: #FFF3CD;
    color: #6d4c00;
    border: 1px solid #FFD866;
    border-radius: 5px;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pd-tbl-badge-green {
    background: #E8F5E9;
    color: #1b5e20;
    border-color: #A5D6A7;
}

.pd-tbl-badge-blue {
    background: #E3F2FD;
    color: #0d47a1;
    border-color: #90CAF9;
}

.pd-tbl-badge-red {
    background: #FFEBEE;
    color: #b71c1c;
    border-color: #EF9A9A;
}

.pd-tbl-badge-purple {
    background: #F3E5F5;
    color: #4a148c;
    border-color: #CE93D8;
}

.pd-tbl-link {
    white-space: nowrap;
}

.pd-tbl-link a {
    display: inline-block;
    background: #FF9900;
    color: #232F3E !important;
    padding: 6px 14px;
    border-radius: 5px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 12px;
    transition: background 0.15s;
}

.pd-tbl-link a:hover {
    background: #e68900;
}

/* ═══════════════════════════════════════════
   3. Deal Cards
   ═══════════════════════════════════════════ */
.pd-deal-card {
    position: relative;
    background: #fff;
    border: 1px solid #e4e8ed;
    border-radius: 14px;
    margin: 0 0 32px;
    padding: 30px 30px 22px 34px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.pd-deal-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

/* Left accent bar — colour per variant */
.pd-deal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: #FF9900;
}

.pd-deal-card.pd-value::before  { background: #2E7D32; }
.pd-deal-card.pd-premium::before { background: #1565C0; }
.pd-deal-card.pd-budget::before  { background: #E31837; }
.pd-deal-card.pd-hidden::before  { background: #6A1B9A; }

/* Ribbon label — top-right corner */
.pd-ribbon {
    position: absolute;
    top: 20px;
    right: 0;
    background: #FF9900;
    color: #232F3E;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 16px 5px 12px;
    border-radius: 5px 0 0 5px;
    box-shadow: -2px 2px 6px rgba(0, 0, 0, 0.12);
    letter-spacing: 0.2px;
}

.pd-deal-card.pd-value   .pd-ribbon { background: #2E7D32;  color: #fff; }
.pd-deal-card.pd-premium .pd-ribbon { background: #1565C0;  color: #fff; }
.pd-deal-card.pd-budget  .pd-ribbon { background: #E31837;  color: #fff; }
.pd-deal-card.pd-hidden  .pd-ribbon { background: #6A1B9A;  color: #fff; }

/* Card header: title + deal-score side-by-side */
.pd-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
    padding-right: 110px; /* avoid overlap with ribbon */
}

.pd-card-header h3 {
    font-size: 21px !important;
    font-weight: 700 !important;
    color: #1a2942 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3;
}

.pd-deal-score {
    flex-shrink: 0;
    background: #FFF8E1;
    border: 1px solid #FFD54F;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 13px;
    color: #795548;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.4;
}

.pd-deal-score span {
    font-size: 17px;
    font-weight: 800;
    color: #E65100;
}

/* Price row: level text + CTA button */
.pd-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.pd-price-level {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.pd-price-level strong {
    color: #E65100;
    font-weight: 700;
}

.pd-cta-btn {
    display: inline-block;
    background: #FF9900;
    color: #232F3E !important;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 7px;
    text-decoration: none !important;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.18s, transform 0.18s;
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.30);
}

.pd-cta-btn:hover {
    background: #e68900;
    transform: translateY(-1px);
}

/* Card body text */
.pd-card-body p {
    font-size: 15px;
    color: #444;
    line-height: 1.7;
    margin-bottom: 14px;
}

.pd-card-body p:last-child {
    margin-bottom: 0;
}

/* Feature bullet list */
.pd-features {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}

.pd-features li {
    position: relative;
    padding: 6px 0 6px 22px;
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.pd-features li:last-child {
    border-bottom: none;
}

.pd-features li::before {
    content: '›';
    position: absolute;
    left: 4px;
    top: 6px;
    color: #FF9900;
    font-weight: 900;
    font-size: 16px;
    line-height: 1.5;
}

/* Bottom CTA button */
.pd-bottom-cta {
    text-align: center;
    margin: 22px 0 4px !important;
}

.pd-bottom-cta a {
    display: inline-block;
    background: #FF9900;
    color: #232F3E !important;
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 7px;
    text-decoration: none !important;
    font-size: 15px;
    transition: background 0.18s, transform 0.18s;
    box-shadow: 0 3px 10px rgba(255, 153, 0, 0.30);
}

.pd-bottom-cta a:hover {
    background: #e68900;
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════
   4. Spar-Strategie
   ═══════════════════════════════════════════ */
.pd-strategy {
    background: linear-gradient(135deg, #F0F7FF 0%, #EAF4F0 100%);
    border: 1px solid #C8DFF5;
    border-radius: 14px;
    padding: 30px 32px;
    margin: 0 0 36px;
}

.pd-strategy h2 {
    color: #1a2942 !important;
    margin-top: 0 !important;
    font-size: 20px !important;
}

.pd-strategy ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pd-strategy ul li {
    position: relative;
    padding: 11px 0 11px 32px;
    font-size: 15px;
    color: #333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    line-height: 1.6;
}

.pd-strategy ul li:last-child {
    border-bottom: none;
}

.pd-strategy ul li::before {
    content: '✓';
    position: absolute;
    left: 4px;
    top: 11px;
    color: #2E7D32;
    font-weight: 900;
    font-size: 16px;
}

/* ═══════════════════════════════════════════
   5. Prime Membership CTA
   ═══════════════════════════════════════════ */
.pd-prime-cta {
    background: linear-gradient(135deg, #232F3E 0%, #37475A 100%);
    color: #fff;
    border-radius: 14px;
    padding: 32px;
    margin: 0 0 36px;
    text-align: center;
}

.pd-prime-cta h2 {
    color: #FF9900 !important;
    font-size: 22px !important;
    margin: 0 0 14px !important;
    border: none !important;
    padding: 0 !important;
}

.pd-prime-cta h2::after {
    display: none !important;
}

.pd-prime-cta p {
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.7;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.pd-prime-btn {
    display: inline-block;
    background: #FF9900;
    color: #232F3E !important;
    font-weight: 700;
    padding: 13px 34px;
    border-radius: 7px;
    text-decoration: none !important;
    font-size: 15px;
    transition: background 0.18s, transform 0.18s;
    box-shadow: 0 4px 14px rgba(255, 153, 0, 0.40);
}

.pd-prime-btn:hover {
    background: #e68900;
    transform: translateY(-1px);
}

/* ═══════════════════════════════════════════
   6. FAQ
   ═══════════════════════════════════════════ */
.pd-faq {
    margin: 0 0 36px;
}

.pd-faq-item {
    background: #F8F9FA;
    border: 1px solid #E9ECEF;
    border-radius: 11px;
    padding: 20px 24px;
    margin-bottom: 12px;
    border-left: 4px solid #FF9900;
}

.pd-faq-item:last-child {
    margin-bottom: 0;
}

.pd-faq-item h3 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a2942 !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    line-height: 1.4;
}

.pd-faq-item p {
    font-size: 14px;
    color: #555;
    margin: 0;
    line-height: 1.65;
}

/* ═══════════════════════════════════════════
   7. Conclusion — override the parent plugin's
      blue-accent style with Prime Day amber.
   ═══════════════════════════════════════════ */
.pd-faq ~ h2 + .conclusion-module,
.pd-prime-cta ~ .pd-faq ~ h2 + .conclusion-module {
    background: linear-gradient(135deg, #FFF9F0 0%, #FFF3DC 100%) !important;
    border-left-color: #FF9900 !important;
}

/* Broader fallback: any conclusion-module that follows pd-faq content */
.pd-faq + h2 + .conclusion-module,
.conclusion-module:has(+ *) {
    border-left-color: #FF9900;
}

/* Direct override when prime day CSS is loaded — conclusion gets amber */
.entry-content .conclusion-module {
    background: linear-gradient(135deg, #FFF9F0 0%, #FFF3DC 100%);
    border-left-color: #FF9900;
}

.entry-content .conclusion-module p:last-child {
    border-top-color: rgba(255, 153, 0, 0.25);
    color: #7B4F00;
}

/* ═══════════════════════════════════════════
   8. Responsive
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .pd-hero {
        padding: 26px 20px 22px;
    }

    .pd-hero h2 {
        font-size: 20px !important;
    }

    .pd-card-header {
        flex-direction: column;
        gap: 10px;
        padding-right: 0;
    }

    .pd-ribbon {
        position: static;
        display: inline-block;
        border-radius: 5px;
        margin-bottom: 10px;
    }

    .pd-deal-card {
        padding: 22px 18px 18px 22px;
    }

    .pd-price-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .pd-cta-btn {
        width: 100%;
        text-align: center;
    }

    .pd-deal-table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pd-deal-table td,
    .pd-deal-table th {
        padding: 9px 10px;
    }

    .pd-strategy,
    .pd-prime-cta {
        padding: 22px 18px;
    }

    .pd-bottom-cta a {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .pd-hero h2 {
        font-size: 18px !important;
    }

    .pd-card-header h3 {
        font-size: 18px !important;
    }

    .pd-deal-table .pd-tbl-name,
    .pd-deal-table td:nth-child(3) {
        /* hide deal-type column on very small screens */
        display: none;
    }
}
