/**
 * Wholesale Reports teaser landing page.
 *
 * Styles for views/view-wwp-reports-teaser.php. The visual structure mirrors
 * Wholesale Prices Premium's wholesale-analytics page (sticky header, gradient
 * cards, #46BF93 brand accent, rounded-3xl cards) so the teaser preview reads
 * as a faithful snapshot of the real reports UI.
 *
 * Loaded only on the wholesale-reports admin screen when WWPP is inactive
 * (see WWP_Script_Loader::load_back_end_styles_and_scripts).
 *
 * @since 2.2.8
 */

/* Full-bleed canvas — extend edge-to-edge of #wpbody-content like WWPP. The
 * negative margins offset the small gap WP admin leaves on the right of the
 * content area so the gradient and sticky header reach the chrome edges.
 */
.wwp-reports-teaser {
    margin: 0;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    position: relative;
}

/* Preview canvas — full-width gradient surface that fills the wpbody-content
 * area, matching WWPP's reports page. No rounded corners, no margin.
 */
.wwp-reports-teaser__preview {
    background: linear-gradient( 135deg, #f8fafc 0%, #eff6ff 50%, #f1f5f9 100% );
    cursor: pointer;
    min-height: calc( 100vh - 32px );
}

.wwp-reports-teaser__preview[aria-hidden="true"] {
    cursor: default;
}

/* Sticky header bar — full-bleed within the contained preview, translucent
 * white with a subtle bottom border (matches WWPP's wholesale-analytics).
 */
.wwp-reports-teaser__header {
    position: sticky;
    top: 32px;
    z-index: 50;
    background: rgba( 255, 255, 255, 0.85 );
    backdrop-filter: blur( 12px );
    -webkit-backdrop-filter: blur( 12px );
    border-bottom: 1px solid rgba( 229, 231, 235, 0.5 );
    box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.04 );
}

.wwp-reports-teaser__header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px;
}

.wwp-reports-teaser__header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wwp-reports-teaser__header-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient( 135deg, #46BF93 0%, #3da882 50%, #359973 100% );
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 20px -8px rgba( 70, 191, 147, 0.4 );
}

#wwp-reports-teaser .wwp-reports-teaser__header-title {
    margin: 0;
    padding: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    line-height: 32px;
}

#wwp-reports-teaser .wwp-reports-teaser__header-desc {
    margin: 4px 0 0;
    padding: 0;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.wwp-reports-teaser__header-right {
    display: flex;
    align-items: center;
}

.wwp-reports-teaser__section-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient( 90deg, #eff6ff 0%, #eef2ff 50%, #eff6ff 100% );
    border: 1px solid rgba( 147, 197, 253, 0.5 );
    border-radius: 16px;
}

.wwp-reports-teaser__section-pill-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient( 135deg, #3b82f6 0%, #6366f1 100% );
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 12px -4px rgba( 59, 130, 246, 0.4 );
}

.wwp-reports-teaser__section-pill-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.wwp-reports-teaser__section-pill-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.wwp-reports-teaser__section-pill-sub {
    font-size: 12px;
    color: #6b7280;
}

.wwp-reports-teaser__section-pill-chevron {
    color: #9ca3af;
    font-size: 12px;
    margin-left: 4px;
}

/* Main content area */
.wwp-reports-teaser__main {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Heading card */
.wwp-reports-teaser__heading {
    background: linear-gradient( 135deg, #ffffff 0%, #ffffff 60%, rgba( 249, 250, 251, 0.5 ) 100% );
    border: 1px solid rgba( 229, 231, 235, 0.5 );
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba( 0, 0, 0, 0.04 ), 0 10px 10px -5px rgba( 0, 0, 0, 0.02 );
    padding: 32px;
    margin-bottom: 24px;
}

.wwp-reports-teaser__heading-title {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient( 90deg, #111827 0%, #1f2937 50%, #374151 100% );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.wwp-reports-teaser__heading-desc {
    margin: 0;
    font-size: 16px;
    color: #4b5563;
    max-width: 720px;
}

/* Tabs */
.wwp-reports-teaser__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.wwp-reports-teaser__tab {
    flex: 1 1 220px;
    padding: 18px 20px;
    border: 0;
    border-radius: 16px;
    background: #ffffff;
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: default;
    box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.04 );
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.wwp-reports-teaser__tab.is-active {
    background: linear-gradient( 90deg, #46BF93 0%, #059669 100% );
    color: #ffffff;
    box-shadow: 0 12px 20px -10px rgba( 70, 191, 147, 0.45 );
    transform: scale( 1.02 );
}

.wwp-reports-teaser__tab-icon {
    display: inline-flex;
}

/* Filters */
.wwp-reports-teaser__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    background: rgba( 255, 255, 255, 0.85 );
    backdrop-filter: blur( 8px );
    -webkit-backdrop-filter: blur( 8px );
    border: 1px solid rgba( 229, 231, 235, 0.5 );
    border-radius: 16px;
    box-shadow: 0 4px 12px -4px rgba( 0, 0, 0, 0.05 );
    padding: 18px 20px;
    margin-bottom: 24px;
}

.wwp-reports-teaser__filters-left,
.wwp-reports-teaser__filters-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.wwp-reports-teaser__filters-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.wwp-reports-teaser__filters-label-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient( 135deg, #f3f4f6 0%, #f9fafb 100% );
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wwp-reports-teaser__filter-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    color: #374151;
}

.wwp-reports-teaser__toggle {
    display: inline-block;
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #d1d5db;
    position: relative;
}

.wwp-reports-teaser__toggle::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.2 );
}

.wwp-reports-teaser__filters-right {
    color: #374151;
    font-size: 14px;
    font-weight: 500;
}

/* Hero metric card */
.wwp-reports-teaser__hero {
    position: relative;
    background: linear-gradient( 135deg, #ffffff 0%, #ffffff 60%, rgba( 70, 191, 147, 0.05 ) 100% );
    border: 1px solid rgba( 229, 231, 235, 0.5 );
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba( 0, 0, 0, 0.04 ), 0 10px 10px -5px rgba( 0, 0, 0, 0.02 );
    padding: 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
}

.wwp-reports-teaser__hero-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 256px;
    height: 256px;
    background: radial-gradient( circle, rgba( 70, 191, 147, 0.12 ) 0%, transparent 70% );
    border-radius: 50%;
    filter: blur( 40px );
    pointer-events: none;
}

.wwp-reports-teaser__hero-content {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
}

.wwp-reports-teaser__hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 16px;
}

.wwp-reports-teaser__hero-eyebrow-line {
    display: inline-block;
    width: 32px;
    height: 2px;
    background: linear-gradient( 90deg, #46BF93 0%, transparent 100% );
}

.wwp-reports-teaser__hero-value {
    margin: 0 0 16px;
    font-size: 56px;
    font-weight: 700;
    background: linear-gradient( 90deg, #111827 0%, #1f2937 50%, #374151 100% );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

.wwp-reports-teaser__hero-delta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba( 70, 191, 147, 0.12 );
    color: #047857;
    font-size: 14px;
    font-weight: 600;
}

.wwp-reports-teaser__hero-icon {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient( 135deg, #46BF93 0%, #10b981 50%, #46BF93 100% );
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 30px -10px rgba( 70, 191, 147, 0.5 );
    position: relative;
    z-index: 1;
}

/* Stat cards (3 across) */
.wwp-reports-teaser__stats {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: 20px;
    margin-bottom: 24px;
}

.wwp-reports-teaser__stat {
    position: relative;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px -4px rgba( 0, 0, 0, 0.05 );
    overflow: hidden;
}

.wwp-reports-teaser__stat--blue {
    background: linear-gradient( 135deg, #ffffff 0%, rgba( 219, 234, 254, 0.3 ) 100% );
    border: 1px solid rgba( 191, 219, 254, 0.5 );
}

.wwp-reports-teaser__stat--amber {
    background: linear-gradient( 135deg, #ffffff 0%, rgba( 254, 243, 199, 0.3 ) 100% );
    border: 1px solid rgba( 252, 211, 77, 0.5 );
}

.wwp-reports-teaser__stat--green {
    background: linear-gradient( 135deg, #ffffff 0%, rgba( 209, 250, 229, 0.3 ) 100% );
    border: 1px solid rgba( 110, 231, 183, 0.5 );
}

.wwp-reports-teaser__stat-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.wwp-reports-teaser__stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.wwp-reports-teaser__stat--blue .wwp-reports-teaser__stat-icon {
    background: linear-gradient( 135deg, #3b82f6 0%, #2563eb 100% );
    box-shadow: 0 12px 20px -8px rgba( 59, 130, 246, 0.4 );
}

.wwp-reports-teaser__stat--amber .wwp-reports-teaser__stat-icon {
    background: linear-gradient( 135deg, #f59e0b 0%, #ea580c 100% );
    box-shadow: 0 12px 20px -8px rgba( 245, 158, 11, 0.4 );
}

.wwp-reports-teaser__stat--green .wwp-reports-teaser__stat-icon {
    background: linear-gradient( 135deg, #46BF93 0%, #059669 100% );
    box-shadow: 0 12px 20px -8px rgba( 70, 191, 147, 0.4 );
}

.wwp-reports-teaser__stat-label {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: #4b5563;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wwp-reports-teaser__stat-value {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient( 90deg, #111827 0%, #374151 100% );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Secondary section heading (when stacking multiple dashboard tabs) */
.wwp-reports-teaser__heading--secondary {
    margin-top: 24px;
}

/* Top Products table (Product Sales Overview section) */
.wwp-reports-teaser__products-table {
    background: #ffffff;
    border: 1px solid rgba( 229, 231, 235, 0.5 );
    border-radius: 24px;
    box-shadow: 0 12px 24px -8px rgba( 0, 0, 0, 0.05 );
    padding: 8px 16px;
    overflow-x: auto;
    margin-bottom: 24px;
}

.wwp-reports-teaser__products-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wwp-reports-teaser__products-table th {
    padding: 16px 24px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #f3f4f6;
}

.wwp-reports-teaser__products-table th.is-center,
.wwp-reports-teaser__products-table td.is-center {
    text-align: center;
}

.wwp-reports-teaser__products-table td {
    padding: 18px 24px;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
}

.wwp-reports-teaser__products-table tbody tr:last-child td {
    border-bottom: 0;
}

.wwp-reports-teaser__products-table tbody tr:hover {
    background: rgba( 70, 191, 147, 0.04 );
}

.wwp-reports-teaser__rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient( 135deg, #46BF93 0%, #059669 100% );
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 6px 12px -4px rgba( 70, 191, 147, 0.4 );
}

/* Responsive */
@media ( max-width: 960px ) {
    .wwp-reports-teaser__stats {
        grid-template-columns: 1fr;
    }
    .wwp-reports-teaser__hero {
        flex-direction: column;
    }
    .wwp-reports-teaser__hero-icon {
        align-self: flex-start;
    }
    .wwp-reports-teaser__main {
        padding: 24px 20px;
    }
    .wwp-reports-teaser__header {
        padding: 16px 20px;
    }
}

/* Modal overlay (unchanged) */
.wwp-reports-teaser__modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.wwp-reports-teaser__modal.is-hidden {
    display: none;
}

.wwp-reports-teaser__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba( 15, 23, 42, 0.55 );
    backdrop-filter: blur( 2px );
    -webkit-backdrop-filter: blur( 2px );
}

.wwp-reports-teaser__modal-card {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 100%;
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba( 0, 0, 0, 0.25 );
    text-align: center;
}

.wwp-reports-teaser__modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 24px;
    line-height: 1;
    border-radius: 8px;
    cursor: pointer;
}

.wwp-reports-teaser__modal-close:hover,
.wwp-reports-teaser__modal-close:focus {
    background: #f3f4f6;
    color: #111827;
    outline: 2px solid rgba( 70, 191, 147, 0.4 );
    outline-offset: 1px;
}

.wwp-reports-teaser__modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba( 70, 191, 147, 0.12 );
    color: #46BF93;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wwp-reports-teaser__modal-title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.wwp-reports-teaser__modal-desc {
    margin: 0 0 24px;
    color: #4b5563;
    font-size: 14px;
}

.wwp-reports-teaser__modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.wwp-reports-teaser__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.wwp-reports-teaser__btn:focus {
    outline: 2px solid rgba( 70, 191, 147, 0.5 );
    outline-offset: 2px;
}

.wwp-reports-teaser__btn--secondary {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}

.wwp-reports-teaser__btn--secondary:hover {
    background: #f9fafb;
    color: #111827;
}

.wwp-reports-teaser__btn--primary {
    background: #46BF93;
    color: #ffffff;
    border-color: #46BF93;
}

.wwp-reports-teaser__btn--primary:hover,
.wwp-reports-teaser__btn--primary:focus {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

@media ( prefers-reduced-motion: reduce ) {
    .wwp-reports-teaser__btn {
        transition: none;
    }
}
