/* Dashboard Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.card {
    background-color: white;
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card h3 {
    margin-top: 0;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.8rem;
}

.card p {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
}

.balance {
    color: var(--dark-color);
}

.income {
    color: var(--secondary-color);
}

.expense {
    color: var(--primary-color);
}

.subscription {
    color: var(--tertiary-color);
}

/* Pockets Container */
.pockets-container {
    margin-bottom: 2rem;
}

.pockets-container h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.pockets-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.pocket-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border-left: 4px solid;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pocket-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pocket-card-header {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    color: white;
}

.pocket-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 0.8rem;
    font-size: 18px;
}

.pocket-icon svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.pocket-name {
    font-weight: 500;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pocket-balance {
    padding: 0.8rem;
    font-size: 1.2rem;
    font-weight: 500;
}

/* Pockets List in Settings */
.pockets-list {
    margin-bottom: 1rem;
}

.pocket-item {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
}

.pocket-info {
    flex: 1;
    margin-left: 1rem;
    min-width: 0; /* Allows text to wrap properly */
}

.pocket-actions {
    display: flex;
    gap: 0.5rem;
}

.pocket-actions button {
    min-width: 60px;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.2s;
}

.pocket-actions .edit-btn {
    background-color: #e0e0e0;
    color: #333;
}

.pocket-actions .edit-btn:hover {
    background-color: #d0d0d0;
    transform: translateY(-2px);
}

.pocket-actions .delete-btn {
    /* Base styles are now in the consolidated forms.css */
}

.pocket-actions .delete-btn:hover {
    /* Hover styles are now in the consolidated forms.css */
}

.pockets-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background-color: white;
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chart-card h3 {
    margin-top: 0;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #333;
}

.chart-wrapper {
    position: relative;
    height: 250px;
}

/* Time Period Filters */
.time-filters {
    display: flex;
    margin-bottom: 2rem;
    background-color: white;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.time-filters::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.time-filter {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #555;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.time-filter:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.time-filter.active {
    background-color: var(--primary-color);
    color: white;
}

/* Transactions */
.transaction-list {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.transaction-item {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    position: relative;
    gap: 0.75rem;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-category {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #555;
}

.transaction-details {
    flex: 1;
    min-width: 0; /* Allow text to truncate properly */
}

.transaction-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    align-items: center;
}

.transaction-name span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.transaction-amount {
    font-weight: 500;
}

.transaction-amount.income {
    color: var(--success-color);
}

.transaction-amount.expense {
    color: var(--danger-color);
}

/* Transaction metadata styling */
.transaction-meta {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.transaction-meta span {
    background-color: #f5f5f5;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}

.delete-transaction {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.delete-transaction:hover {
    background-color: var(--danger-color);
    color: white;
}

/* Recent transactions section */
.recent-transactions {
    background-color: white;
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.recent-transactions h3 {
    margin-top: 0;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #333;
}

.view-all {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.view-all:hover {
    text-decoration: underline;
}

/* Category Items */
.category-section {
    margin-bottom: 1.5rem;
}

.category-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-item span {
    margin-right: 0.5rem;
}

/* Use the consistent delete button style from above */
.delete-btn {
    color: white;
    background-color: var(--danger-color);
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 2px 2px 0px var(--border-color);
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background-color: var(--danger-dark);
    transform: translateY(-2px);
    box-shadow: 3px 3px 0px var(--border-color);
}

/* Empty States */
.empty-state {
    padding: 2rem;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

/* No Data Messages */
.no-data-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #999;
    font-size: 0.9rem;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .chart-wrapper {
        height: 200px;
    }
    
    .transaction-item {
        padding: 0.75rem;
    }
    
    .transaction-details {
        flex: 1 0 60%;
    }
    
    .transaction-amount {
        flex: 0 0 auto;
        margin-left: auto;
    }
    
    .transaction-meta {
        flex-basis: 100%;
        margin-top: 0.5rem;
        justify-content: flex-start;
    }
    
    .pocket-card-header {
        padding: 0.6rem;
    }
    
    .pocket-balance {
        padding: 0.6rem;
        font-size: 1rem;
    }
    
    .time-filters {
        padding: 0.4rem;
    }
    
    .time-filter {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .pockets-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .pockets-actions button {
        width: 100%;
        margin-bottom: 0.25rem;
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .pockets-cards {
        grid-template-columns: 1fr;
    }
    
    .transaction-name {
        font-size: 0.9rem;
    }
    
    .transaction-amount {
        font-size: 0.9rem;
    }
    
    .transaction-meta span {
        font-size: 0.75rem;
    }
    
    .chart-card {
        padding: 0.8rem;
    }
    
    .chart-wrapper {
        height: 180px;
    }
    
    .pockets-actions button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Delete buttons styling for transaction and subscription items */
.delete-transaction,
.delete-subscription,
.delete-item {
    color: white;
    background-color: var(--danger-color);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
    box-shadow: 2px 2px 0px var(--border-color);
    transition: all 0.2s ease;
}

.delete-transaction:hover,
.delete-subscription:hover,
.delete-item:hover {
    background-color: var(--danger-dark);
    transform: translateY(-2px);
    box-shadow: 3px 3px 0px var(--border-color);
}

/* Make sure action buttons are always visible */
.transaction-actions,
.subscription-actions,
.item-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 1;
}

@media (max-width: 768px) {
    .delete-transaction,
    .delete-subscription,
    .delete-item {
        width: 36px;
        height: 36px;
    }
}

/* Subscription items */
.subscription-item {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    position: relative;
    gap: 0.75rem;
}

.subscription-category {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #555;
}

.subscription-details {
    flex: 1;
    min-width: 0; /* Allow text to truncate properly */
}

.subscription-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    align-items: center;
}

.subscription-amount {
    color: var(--primary-color);
    font-weight: 500;
}

.subscription-meta {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.subscription-meta span {
    background-color: #f5f5f5;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
} 