.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px;
}


.top-nav {
    display: flex;
    justify-content: right;
}

.login-container {
        width: 90%;
    text-align: center;
}


/* Section headers */
.section-header-title span {
    background-image: linear-gradient(180deg,rgba(240,238,249,.8) 0%,#E2E8FF 100%);
    background-image: linear-gradient(180deg,color(display-p3 .9411764706 .9333333333 .9764705882/.8) 0%,color(display-p3 .8862745098 .9098039216 1/1) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    display: block;
}



label {
    margin-bottom: 15px;
    font-size: 18px;
    position: relative;
}


.input-wrapper {
    margin-bottom: 20px;
}

.section-header-title {
    margin-bottom: 30px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 10px;

}

.card-item {
display: flex;
    flex-direction: column;
    position: relative;
    margin-top: -27px;
    padding-bottom: 50px;
    border-radius: 10px;
    transition: margin-top 0.3s ease, max-height 0.3s ease;
    max-height: 100px;
    cursor: pointer;
    z-index: 1;
        background-color: #012A4A;
}

.card-item:hover {
    max-height: 750px; /* Adjust this to the maximum height your expanded card might have */
}


.card-item:last-of-type {
    max-height: 750px; /* Set max height to the full content height */
}
.card-quantity-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: #4196e0;
    color: #fff;
    padding: 5px 10px;
    border-radius: 50%;
    font-weight: bold;
    z-index: 10;
        font-size: 10px;
}
.card-category {
    position: relative;
    overflow: visible;
    color: #fff;
    text-align: center;
    border-radius: 10px;
    padding: 10px;
    text-align: left;
}

.card-category h2 {
    margin-bottom: 30px;
}
.card-item.expanded {
    height: auto; /* Keep the card expanded */
}

.card-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    border: 3px solid #4196e0;
    margin-bottom: 10px;
}

.card-item h3 {
    color: #0a2133;
    margin: 0px;
    margin-bottom: 10px;
    font-size: 18px;
}

.card-item p {
    flex-grow: 1;
    color: #fff;
}

.delete-btn {
    padding: 5px 10px;
    background-color: #ff4d4d; /* Red background for delete action */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.delete-btn:hover {
    background-color: #cc0000; /* Darker red on hover */
}

#suggestedDeck p {
    margin: 5px 0;
    line-height: 1.5;
    color: #fff;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Container for the chart */
.card-category-bar-graph {
  width: 100%;
  max-width: 600px; /* You can adjust this to fit your layout */
  margin: 0 auto; /* Center the chart container */
}

/* Style for the Chart.js canvas */
#cardChart {
  display: block;
  max-width: 100%;
  height: auto; /* Adjust height as necessary */
}

.card-category-bar {
    background-color: #3498db;
    color: white;
    cursor: pointer;
    width: 100%; /* Full width of its container */
    text-align: center;
    transition: background-color 0.3s ease;
    /* Height will be set dynamically based on the count */
}

.card-category-bar:hover {
    background-color: #2980b9;
}

/* Add a label for the bar */
.bar-label {
    writing-mode: vertical-lr; /* Make the text vertical */
    transform: rotate(180deg); /* Flip the text to be readable bottom to top */
    text-align: left; /* Align the text to the bottom of the bar */
    height: 100%;
    display: flex;
    align-items: flex-end;
}


.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.welcome-section, .chart-section, .update-section {
    flex: 1;
    min-width: 250px; /* Adjust minimum width as needed */
    margin: 10px; /* Provide some space between the sections */
}

.card-category-bar {
    color: #fff; /* Set text color to white */
}

.profile-dashboard {
        width: 85%;
    margin: auto;
}

/* Mobile view adjustments */
@media screen and (max-width: 767px) {
    .card-item {
        width: 100%; /* Full width on smaller screens */
        margin-right: 0; /* Remove right margin */
    }
 .dashboard-header {
        flex-direction: column;
    }
    
    .welcome-section, .chart-section, .update-section {
        min-width: 100%;
        max-width: 100%;
    }

    #cardChart {
        width: 100% !important; /* Override any inline width to make the chart responsive */
        height: auto !important; /* Override any inline height for a responsive aspect ratio */
    }
    .bar-label {
        writing-mode: horizontal-tb;
        transform: rotate(0deg);
        text-align: center;
        height: auto;
    }
    
    .card-grid {
    display: inline-block;
}
.profile-dashboard {
        width: 95%;
    margin: auto;
}

}

