/* ===========================
   Cards & Metric Components
=========================== */

/* Base Card Styles */
.card,
.metric-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    box-shadow: 0px 4px 6px var(--shadow-light);
    padding: 10px;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Metric Card Specific Styles */
.metric-card {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.auto-expand-card {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

.metric-card .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.metric-card .chart {
    flex: 1;
    min-height: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Chart Card Title */
.chart .card-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

/* Stacked Financial Projection Cards */
.stacked-projection-card {
    background-color: var(--bg-primary, white);
    border: 1px solid var(--border-primary, #D3D3D3);
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}

.stacked-projection-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Stacked Card Header */
.stacked-card-header {
    background-color: var(--brand-purple, #b464ff);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
}

/* Stacked Card Content */
.stacked-card-content {
    padding: 16px 20px;
}

/* Net Worth Section */
.net-worth-section {
    text-align: center;
    margin-bottom: 12px;
}

/* Transaction Cards */
.transaction-card {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    margin-bottom: 12px !important;
}

.transaction-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.transaction-card:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.transaction-card .card-content {
    min-height: 60px !important;
    padding: 16px 20px !important;
    align-items: center !important;
}

/* Transaction Cards Container */
#top-transactions-cards {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    max-height: 400px !important;
    overflow-y: auto !important;
}

#top-transactions-cards::-webkit-scrollbar {
    width: 4px;
}

#top-transactions-cards::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 2px;
}

/* Affordability States */
.affordability-section.can-afford {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: var(--success-green, #22C55E);
}

.afford-icon.can-afford {
    color: var(--success-green, #22C55E);
}

.affordability-section.cannot-afford {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--error-red, #EF4444);
}

.afford-icon.cannot-afford {
    color: var(--error-red, #EF4444);
} 