visual-spending/styles.css
2025-03-20 22:23:39 +03:00

190 lines
3.1 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
color: #333;
}
.container {
width: 100%;
margin: 0 auto;
padding: 20px;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.month-selector {
display: flex;
align-items: center;
gap: 10px;
}
#month-select {
padding: 8px;
border-radius: 4px;
border: 1px solid #ddd;
}
.content-wrapper {
display: flex;
position: relative;
}
#chart-container {
width: 70%;
height: 80vh;
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
#details-box {
position: absolute;
top: 10px;
right: 10px;
width: 35vw;
min-width: 300px;
max-width: 650px;
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
padding: 20px;
z-index: 10;
min-height: auto;
max-height: 80vh;
overflow-y: auto;
opacity: 0.98;
border: 1px solid #eee;
margin-left: 0;
}
#details-box h3 {
margin-bottom: 15px;
color: #333;
font-size: 18px;
border-bottom: 1px solid #eee;
padding-bottom: 8px;
}
#details-box h4 {
margin: 10px 0 5px;
color: #555;
font-size: 14px;
}
.details-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding: 10px 0;
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
}
.hover-name {
font-weight: bold;
color: #333;
word-break: break-word;
flex: 1;
display: flex;
align-items: center;
font-size: 16px;
}
.hover-amount {
font-size: 18px;
color: #0066cc;
font-weight: bold;
margin-left: 10px;
white-space: nowrap;
text-align: right;
min-width: 120px;
}
.color-circle {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
margin-right: 8px;
flex-shrink: 0;
}
#top-items {
font-size: 14px;
}
.top-item {
display: flex;
justify-content: space-between;
padding: 8px 0;
border-bottom: 1px dashed #eee;
}
.top-item:last-child {
border-bottom: none;
}
.top-item-name {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: flex;
align-items: center;
min-width: 0;
}
.top-item-amount {
margin-left: 15px;
font-weight: bold;
min-width: 120px;
text-align: right;
flex-shrink: 0;
}
/* Add responsive design for smaller screens */
@media (max-width: 1200px) {
#details-box {
max-width: 300px;
}
}
@media (max-width: 700px) {
.content-wrapper {
flex-direction: column;
}
#chart-container {
width: 100%;
height: 100lvw
}
#details-box {
position: relative;
top: 0;
right: 0;
width: 100%;
margin-top: 20px;
max-height: 300px;
min-width: 100%;
}
.top-item-amount {
min-width: 80px;
}
}