/**
 * ENNU Practice Manager - Revenue Feature
 *
 * Styles for revenue analytics shortcode
 * Extracted from inline styles in class-pm-revenue-shortcode.php
 *
 * @version 1.0.0
 */

/* === REVENUE LAYOUT === */

.ennu-pm-revenue {
    max-width: var(--pm-max-width-2xl);
    margin: 0 auto;
    padding: var(--pm-spacing-lg);
}

/* === REVENUE HIGHLIGHTS === */

.revenue-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--pm-spacing-lg);
    margin-bottom: var(--pm-spacing-2xl);
}

.revenue-card {
    background: linear-gradient(135deg, var(--pm-primary) 0%, var(--pm-primary-dark) 100%);
    color: var(--pm-white);
    border-radius: var(--pm-border-radius-base);
    padding: var(--pm-spacing-xl);
    position: relative;
    overflow: hidden;
}

.revenue-card--success {
    background: linear-gradient(135deg, var(--pm-success) 0%, #1e7e34 100%);
}

.revenue-card--warning {
    background: linear-gradient(135deg, var(--pm-warning) 0%, #d39e00 100%);
}

.revenue-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.revenue-card__label {
    font-size: var(--pm-font-size-sm);
    text-transform: uppercase;
    letter-spacing: var(--pm-letter-spacing-wide);
    opacity: 0.9;
    margin-bottom: var(--pm-spacing-sm);
}

.revenue-card__value {
    font-size: var(--pm-font-size-3xl);
    font-weight: var(--pm-font-weight-bold);
    margin-bottom: var(--pm-spacing-xs);
}

.revenue-card__change {
    font-size: var(--pm-font-size-sm);
    opacity: 0.9;
}

.revenue-card__icon {
    position: absolute;
    bottom: var(--pm-spacing-lg);
    right: var(--pm-spacing-lg);
    font-size: 48px;
    opacity: 0.3;
}

/* === REVENUE BREAKDOWN === */

.revenue-breakdown {
    background: var(--pm-white);
    border: var(--pm-border-width) solid var(--pm-border-color);
    border-radius: var(--pm-border-radius-base);
    padding: var(--pm-spacing-xl);
    margin-bottom: var(--pm-spacing-xl);
}

.revenue-breakdown__chart {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--pm-spacing-xl);
}

.revenue-breakdown__legend {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--pm-spacing-md);
}

.revenue-legend-item {
    display: flex;
    align-items: center;
    gap: var(--pm-spacing-md);
    padding: var(--pm-spacing-sm);
}

.revenue-legend-item__color {
    width: 16px;
    height: 16px;
    border-radius: var(--pm-border-radius-sm);
    flex-shrink: 0;
}

.revenue-legend-item__label {
    flex: 1;
    font-size: var(--pm-font-size-sm);
    color: var(--pm-text-secondary);
}

.revenue-legend-item__value {
    font-weight: var(--pm-font-weight-semibold);
    color: var(--pm-text-primary);
}

.revenue-legend-item__percentage {
    font-size: var(--pm-font-size-xs);
    color: var(--pm-text-muted);
    margin-left: var(--pm-spacing-xs);
}

/* === PAYMENT METHODS === */

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--pm-spacing-md);
    margin: var(--pm-spacing-lg) 0;
}

.payment-method-card {
    background: var(--pm-gray-50);
    padding: var(--pm-spacing-md);
    border-radius: var(--pm-border-radius-sm);
    text-align: center;
}

.payment-method-card__icon {
    font-size: 32px;
    color: var(--pm-primary);
    margin-bottom: var(--pm-spacing-sm);
}

.payment-method-card__name {
    font-size: var(--pm-font-size-sm);
    color: var(--pm-text-secondary);
    margin-bottom: var(--pm-spacing-xs);
}

.payment-method-card__amount {
    font-size: var(--pm-font-size-xl);
    font-weight: var(--pm-font-weight-bold);
    color: var(--pm-text-primary);
    margin-bottom: var(--pm-spacing-xs);
}

.payment-method-card__count {
    font-size: var(--pm-font-size-xs);
    color: var(--pm-text-muted);
}

/* === TOP SERVICES === */

.top-services {
    background: var(--pm-white);
    border: var(--pm-border-width) solid var(--pm-border-color);
    border-radius: var(--pm-border-radius-base);
    overflow: hidden;
}

.top-services__item {
    display: flex;
    align-items: center;
    gap: var(--pm-spacing-md);
    padding: var(--pm-spacing-md);
    border-bottom: var(--pm-border-width) solid var(--pm-border-light);
}

.top-services__item:last-child {
    border-bottom: none;
}

.top-services__rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pm-primary-bg);
    color: var(--pm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--pm-font-weight-bold);
    font-size: var(--pm-font-size-sm);
    flex-shrink: 0;
}

.top-services__info {
    flex: 1;
}

.top-services__name {
    font-weight: var(--pm-font-weight-medium);
    color: var(--pm-text-primary);
    margin-bottom: var(--pm-spacing-xs);
}

.top-services__count {
    font-size: var(--pm-font-size-sm);
    color: var(--pm-text-secondary);
}

.top-services__revenue {
    font-size: var(--pm-font-size-lg);
    font-weight: var(--pm-font-weight-bold);
    color: var(--pm-primary);
}

.top-services__bar {
    width: 100%;
    height: 4px;
    background: var(--pm-gray-200);
    border-radius: var(--pm-border-radius-full);
    overflow: hidden;
    margin-top: var(--pm-spacing-xs);
}

.top-services__bar-fill {
    height: 100%;
    background: var(--pm-primary);
    transition: width var(--pm-transition-slow);
}

/* === FINANCIAL SUMMARY === */

.financial-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--pm-spacing-lg);
    margin-bottom: var(--pm-spacing-xl);
}

.financial-summary__card {
    background: var(--pm-white);
    border: var(--pm-border-width) solid var(--pm-border-color);
    border-radius: var(--pm-border-radius-base);
    padding: var(--pm-spacing-lg);
    text-align: center;
}

.financial-summary__label {
    font-size: var(--pm-font-size-sm);
    color: var(--pm-text-secondary);
    margin-bottom: var(--pm-spacing-sm);
    text-transform: uppercase;
    letter-spacing: var(--pm-letter-spacing-wide);
}

.financial-summary__value {
    font-size: var(--pm-font-size-2xl);
    font-weight: var(--pm-font-weight-bold);
    color: var(--pm-text-primary);
}

.financial-summary__value--positive {
    color: var(--pm-success);
}

.financial-summary__value--negative {
    color: var(--pm-error);
}

/* === RESPONSIVE === */

@media (max-width: 992px) {
    .revenue-breakdown__chart {
        grid-template-columns: 1fr;
    }

    .financial-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ennu-pm-revenue {
        padding: var(--pm-spacing-md);
    }

    .revenue-highlights {
        grid-template-columns: 1fr;
    }

    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
    }
}
