/* css/recent-transactions.css - Simple working version */

.recent-transactions-container {
    background: white;
    border-radius: 4px;
    padding: 32px;
    margin: 0;
    box-shadow: none;
    border: 1px solid #e1e1e1;
    text-align: left;
    font-size: 1rem;
    box-sizing: border-box;
    overflow-x: hidden;
    width: 100%;
}

/* Section Header */
.section-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}

.section-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d2d2d;
}

/* Transactions List */
.transactions-list {
    display: flex;
    flex-direction: column;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Basic expense items */
.expense-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    background: white;
    margin: 0;
    border-radius: 0;
    min-width: 0;
    box-sizing: border-box;
    /* Prevent browser interference with long-press */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none; /* Prevent iOS callout menu */
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
}

.expense-item:hover { background-color: #fafafa; }

/* Long-press feedback */
.expense-item.long-pressing {
    background-color: rgba(159, 122, 234, 0.1);
    transform: scale(0.98);
    transition: all 0.1s ease;
}

.expense-icon {
    width: 40px;
    height: 40px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-right: 16px;
    flex-shrink: 0;
}

.expense-icon.default { background-color: #f5f5f5; color: #666; }
.expense-icon.grocery { background-color: #f5f5f5; color: #666; }
.expense-icon.transport { background-color: #f5f5f5; color: #666; }
.expense-icon.food { background-color: #f5f5f5; color: #666; }
.expense-icon.books { background-color: #f5f5f5; color: #666; }

.expense-details {
    flex: 1;
    min-width: 0;
}

.expense-category {
    font-size: 1rem;
    font-weight: 500;
    color: #2d2d2d;
    margin-bottom: 4px;
}

.expense-info {
    display: flex;
    gap: 8px;
    align-items: center;
}

.expense-vendor {
    font-size: 0.85rem;
    color: #666;
}

.expense-date {
    font-size: 0.8rem;
    color: #999;
    padding-left: 8px;
    border-left: 1px solid #e0e0e0;
}

.expense-amount {
    font-size: 1rem;
    font-weight: 600;
    color: #d32f2f;
    margin-right: 8px;
}

.expense-amount.income { color: #000000; }

/* Empty state */
.empty-state { 
    text-align: center; 
    padding: 40px 20px; 
    color: #666; 
}

.empty-state-hidden { 
    display: none; 
}

.empty-icon {
    font-size: 4.5rem;
    margin-bottom: 24px;
}

.empty-state p {
    margin: 0 0 12px 0;
    font-size: 1.4rem;
    font-weight: 500;
    color: #333;
}

.empty-state span {
    font-size: 1.1rem;
    color: #999;
}


/* Mobile Context Menu - Safari Style */
.mobile-context-menu {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12), 
                0 2px 6px rgba(0, 0, 0, 0.08);
    z-index: 10000;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 3px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: scale(0.8);
    opacity: 0;
    animation: contextMenuAppear 0.2s ease-out forwards;
}

@keyframes contextMenuAppear {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.context-menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    border-radius: 8px;
    min-width: 24px;
    flex-shrink: 0;
    position: relative;
}

.context-menu-item:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.05);
}

.context-menu-item[data-action="edit"] {
    color: #007AFF; /* iOS blue */
}

.context-menu-item[data-action="edit"]:hover {
    background: rgba(0, 122, 255, 0.08);
}

.context-menu-item[data-action="delete"] {
    color: #FF3B30; /* iOS red */
}

.context-menu-item[data-action="delete"]:hover {
    background: rgba(255, 59, 48, 0.08);
}

.context-menu-divider {
    width: 1px;
    height: 24px;
    background: rgba(0, 0, 0, 0.08);
    margin: 0 2px;
    flex-shrink: 0;
}

.context-icon {
    font-size: 0.9rem;
    width: 14px;
    text-align: center;
}

.context-text {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .mobile-context-menu {
        padding: 8px;
        border-radius: 28px;
    }
    
    .context-menu-item {
        padding: 6px 12px;
        min-height: 32px;
        min-width: 50px;
        border-radius: 12px;
    }
    
    .context-menu-divider {
        height: 32px;
        margin: 0 4px;
    }
    
    .context-icon {
        font-size: 1rem;
        width: 16px;
    }
    
    .context-text {
        font-size: 0.9rem;
    }
}
