/* ============================================================
   Announcement tooltip
   ============================================================ */
.wpm-announcement-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
}

.wpm-announcement-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6B46C1;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
}

.wpm-announcement-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #f9fafb;
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: normal;
    min-width: 200px;
    max-width: 300px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    pointer-events: none;
}

/* Arrow */
.wpm-announcement-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
}

.wpm-announcement-tooltip.wpm-tooltip-visible {
    display: block;
}

.wpm-announcement-inline {
    font-size: 0.85em;
    color: #6b7280;
    font-style: italic;
}

/* ============================================================
   DCMAA-compliant discount display
   ============================================================ */
.wpm-price-wrapper {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3em 0.5em;
}

/* Price table DCMAA block */
.wpm-table-price-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wpm-table-standard,
.wpm-table-discount {
    display: block;
}

/* ============================================================
   Admin badges (also used in history page)
   ============================================================ */
.wpm-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.wpm-badge-scheduled {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FCD34D;
}

.wpm-badge-sale {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #6EE7B7;
}

/* ============================================================
   Public Styles (existing)
   ============================================================ */
.wpm-price {
    font-weight: bold;
}

.wpm-price-table {
    margin: 20px 0;
    overflow-x: auto;
}

.wpm-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    margin: 0;
}

.wpm-table th,
.wpm-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.wpm-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    border-bottom: 2px solid #f8f9fa;
    color: #000;
}

.wpm-table tbody tr:hover {
    background-color: #ddd;
    color: #000;
}

.wpm-table .wpm-price-name {
    font-weight: bold;
}

.wpm-table .wpm-price-value {
    font-weight: bold;
    font-size: 1.1em;
}

.wpm-table .wpm-price-description {
    font-size: 0.9em;
}

/* Widget Styles */
.wpm-widget-price {
    text-align: center;
    padding: 10px;
}

.wpm-widget-price-value {
    font-size: 1.5em;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.wpm-widget-description {
    font-size: 0.9em;
    line-height: 1.4;
}

/* Mobile Stacked Card Layout - Phone breakpoint only (Total theme: max-width 639px) */
@media (max-width: 639px) {
    .wpm-price-table {
        margin: 20px 0;
    }

    /* Hide the table structure and display as cards */
    .wpm-table {
        border: none;
    }

    .wpm-table thead {
        display: none;
    }

    .wpm-table tbody {
        display: block;
    }

    .wpm-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .wpm-table tbody tr:hover {
        background-color: #fff;
        color: #000;
    }

    .wpm-table td {
        display: block;
        border: none;
        padding: 8px 0;
        text-align: left;
    }

    /* Price Name - Larger and prominent */
    .wpm-table .wpm-price-name {
        font-size: 1.25em;
        font-weight: bold;
        color: #000;
        padding-bottom: 12px;
        border-bottom: 2px solid #f0f0f0;
        margin-bottom: 12px;
        text-align: center;
    }

    /* Price Value - Large and centered */
    .wpm-table .wpm-price-value {
        font-size: 1.5em;
        font-weight: bold;
        color: #000;
        text-align: center;
        padding: 0 0;
        display: block;
    }

    /* Description - Smaller text below */
    .wpm-table .wpm-price-description {
        color: #000;
        text-align: center;
        font-size: 0.9em;
        line-height: 1.2;
        padding-top: 12px;
        border-top: 1px solid #f0f0f0;
        margin-top: 12px;
    }
}
