/* ============================================================================
   CONTACT USAGE INDICATOR STYLES - COMPACT VERSION
   Beautiful, responsive usage display with progress bars and warnings
   ============================================================================ */

.contact-usage-indicator {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 8px 12px;
    margin-bottom: 10px;
    border: 2px solid #e2e8f0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Usage Indicator Content */
.usage-indicator-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Header Section */
.usage-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.usage-icon {
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.usage-text {
    flex: 1;
}

.usage-title {
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.usage-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

/* Plan Badges */
.usage-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.usage-badge.basic {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.usage-badge.premium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.badge-icon {
    font-size: 0.75rem;
}

/* Progress Bar Container */
.usage-bar-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.usage-bar {
    width: 100%;
    height: 14px;
    background: #f1f5f9;
    border-radius: 7px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.usage-bar-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease, background 0.3s ease;
    position: relative;
    border-radius: 7px;
}

.usage-bar-text {
    color: white;
    font-weight: 700;
    font-size: 0.6rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.unlimited-bar .usage-bar-fill {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

/* Stats Row - Compact inline */
.usage-stats {
    display: flex;
    justify-content: space-between;
    padding: 0;
    margin: 0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
}

.stat-label {
    color: #64748b;
    font-weight: 500;
}

.stat-value {
    color: #1e293b;
    font-weight: 700;
}

/* Warning Section - Compact */
.usage-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.usage-warning.warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.usage-warning.critical {
    background: #fef2f2;
    border-color: #fecaca;
}

.warning-icon {
    font-size: 1rem;
}

.warning-text {
    flex: 1;
    font-weight: 600;
    color: #991b1b;
    font-size: 0.75rem;
}

.usage-warning.warning .warning-text {
    color: #92400e;
}

/* Upgrade Buttons */
.upgrade-button {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.upgrade-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.upgrade-button:active {
    transform: translateY(0);
}

/* Upgrade Hint - Compact inline style */
.usage-upgrade-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.hint-text {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 500;
}

.upgrade-button-small {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.65rem;
    cursor: pointer;
    transition: transform 0.2s;
    white-space: nowrap;
}

.upgrade-button-small:hover {
    transform: scale(1.05);
}

/* Color States */
.usage-indicator-content.critical {
    border-color: #fecaca;
}

.usage-indicator-content.warning {
    border-color: #fde68a;
}

.usage-indicator-content.normal {
    border-color: #e2e8f0;
}

/* Unlimited Premium Styling */
.usage-indicator-content.unlimited {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border-color: #fde047;
}

/* Dark Theme Support */
body.theme-dark .contact-usage-indicator {
    background: #1e293b;
    border-color: #334155;
}

body.theme-dark .usage-subtitle,
body.theme-dark .stat-value {
    color: #f1f5f9;
}

body.theme-dark .usage-title,
body.theme-dark .stat-label,
body.theme-dark .hint-text {
    color: #94a3b8;
}

body.theme-dark .usage-bar {
    background: #0f172a;
}

body.theme-dark .usage-upgrade-hint {
    background: #334155;
    border-color: #475569;
}

body.theme-dark .usage-warning {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

body.theme-dark .usage-warning.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-usage-indicator {
        padding: 10px 12px;
        margin-bottom: 12px;
    }

    .usage-header {
        gap: 8px;
    }

    .usage-icon {
        font-size: 1.25rem;
    }

    .usage-subtitle {
        font-size: 0.9rem;
    }

    .usage-bar {
        height: 18px;
    }

    .usage-stats {
        flex-direction: row;
        gap: 8px;
    }

    .usage-warning {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .upgrade-button {
        width: 100%;
        text-align: center;
    }

    .usage-upgrade-hint {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .usage-badge {
        padding: 3px 8px;
        font-size: 0.6rem;
    }

    .usage-title {
        font-size: 0.65rem;
    }

    .usage-subtitle {
        font-size: 0.85rem;
    }

    .stat-item {
        font-size: 0.7rem;
    }
    
    .usage-upgrade-hint {
        flex-direction: column;
        align-items: stretch;
    }
    
    .upgrade-button-small {
        width: 100%;
        text-align: center;
    }
}

/* Animation for value changes */
@keyframes valueChange {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        color: #10b981;
    }
    100% {
        transform: scale(1);
    }
}

.usage-subtitle.updated {
    animation: valueChange 0.5s ease;
}
