/* ============================================================
   Product Haven — Frontend CSS (Elementor widgets)
   ============================================================ */

/* ---- Stats widget ---- */
.ph-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.ph-stat-card {
    background: #ffffff;
    border: 1.5px solid #E2E8F0;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}

.ph-stat-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.09); }

.ph-stat-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    background: #D1FAE5;
    color: #10B981;
}

.ph-stat-body { flex: 1; }

.ph-stat-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #64748B;
    margin-bottom: 5px;
}

.ph-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #10B981;
    margin-bottom: 4px;
}

.ph-stat-period { font-size: 11px; color: #94A3B8; }

.ph-sparkline { margin-top: 10px; opacity: .7; }

/* ---- Timeline widget ---- */
.ph-timeline-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
}

.ph-guest-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 40px 24px;
    color: #64748B;
    background: #F8FAFC;
    border-radius: 16px;
    border: 1.5px solid #E2E8F0;
}

.ph-login-btn {
    display: inline-block;
    background: #10B981;
    color: #fff;
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s;
}

.ph-login-btn:hover { background: #059669; }

/* Timeline list */
.ph-tl-list { position: relative; padding-left: 32px; }

.ph-tl-item {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.ph-tl-dot-wrap {
    position: absolute;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.ph-tl-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #10B981;
    flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #10B981;
    margin-top: 4px;
}

.ph-tl-line {
    width: 2px;
    flex: 1;
    background: #E2E8F0;
    margin-top: 4px;
    min-height: 30px;
}

.ph-tl-card {
    flex: 1;
    background: #ffffff;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    transition: box-shadow .15s;
}

.ph-tl-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.ph-tl-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ph-tl-order-number {
    font-size: 14px;
    font-weight: 700;
    color: #10B981;
    text-decoration: none;
}

.ph-tl-order-number:hover { text-decoration: underline; }

.ph-tl-status {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 2px 8px;
    border-radius: 99px;
}

.ph-status-completed  { background: #DCFCE7; color: #15803D; }
.ph-status-processing { background: #DBEAFE; color: #1D4ED8; }
.ph-status-on-hold    { background: #FEF9C3; color: #92400E; }
.ph-status-pending    { background: #F3F4F6; color: #6B7280; }
.ph-status-cancelled  { background: #FEE2E2; color: #DC2626; }
.ph-status-refunded   { background: #EDE9FE; color: #7C3AED; }
.ph-status-failed     { background: #FEE2E2; color: #DC2626; }

.ph-tl-date  { margin-left: auto; font-size: 12px; color: #94A3B8; white-space: nowrap; }
.ph-tl-total { font-size: 15px; font-weight: 800; color: #0F172A; margin-bottom: 6px; }

.ph-tl-items-list { margin: 0; padding: 0 0 0 14px; font-size: 12px; color: #64748B; }
.ph-tl-items-list li { margin-bottom: 2px; }

/* Pagination front-end */
.ph-tl-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.ph-tl-page-btn {
    border: 1.5px solid #E2E8F0;
    background: #fff;
    border-radius: 8px;
    padding: 6px 13px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    color: #64748B;
    transition: all .15s;
}

.ph-tl-page-btn:hover   { border-color: #10B981; color: #10B981; }
.ph-tl-page-btn.is-active { background: #10B981; border-color: #10B981; color: #fff; }
.ph-tl-page-btn:disabled  { opacity: .4; cursor: not-allowed; }

/* Skeleton */
.ph-skeleton {
    display: block;
    border-radius: 7px;
    background: #E2E8F0;
    animation: ph-shimmer 1.2s ease-in-out infinite alternate;
}

@keyframes ph-shimmer { from { opacity: 1; } to { opacity: .45; } }

/* Empty state */
.ph-tl-empty {
    text-align: center;
    padding: 32px;
    color: #64748B;
    background: #F8FAFC;
    border-radius: 14px;
    border: 1.5px solid #E2E8F0;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .ph-stats-grid { grid-template-columns: 1fr; }
    .ph-tl-date    { display: none; }
}
