.user-greeting-card {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: var(--subheader-height);
    background-color: var(--theme-clr-1);
    color: var(--theme-clr-5);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom-left-radius: 1.5rem;
    border-bottom-right-radius: 1.5rem;
    padding-inline: 20px;
    overflow: hidden;
    transition: border-bottom-left-radius, border-bottom-right-radius 0.3s ease-in-out;
}

.user-greeting-card span {
    color: #FFD700;
    font-weight: var(--font-weight-6);
}

.user-greeting-card p {
    margin: 0;
    font-size: var(--font-size-3xl);
    font-weight: bold;
    white-space: wrap;
    padding-inline-start: .4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.sidebar-toggle-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-toggle-btn img {
    width: 28px;
    height: 28px;
    filter: brightness(0) saturate(100%) invert(1);
    /* for white icon */
}

.sidebar-toggle-btn.active img {
    filter: var(--icon-clr-2)
}

@media (min-width: 1024px) {
    .user-greeting-card {
        justify-content: flex-start;
        padding-left: 4rem;
        font-size: var(--font-size-6xl);
        margin-left: 240px;
    }
}

/* Remove border-radius when sidebar is open */
body.sidebar-open section.user-greeting-card {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    background-color: #000 !important;
    overflow: hidden;
    transition: border-bottom-left-radius, border-bottom-right-radius 0.3s ease-in-out;
}


/* Moved items into container for fitting the progress bar */
.subheader-inner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    gap: 0.75rem;
}

.subheader-main-content {
    display: flex;
    align-items: center;
}

/* === progress bar === */
.subheader-course-progress {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    flex-wrap: nowrap;
    min-width: 250px;
    /* ensures enough room */
}

/* Update progress bar if needed */
.subheader-progress-bar {
    flex: 1;
    min-width: 150px;
    /* forces it not to collapse */
    height: 6px;
    background: #ffd0003e;
    border-radius: var(--border-radius-1);
    overflow: hidden;
}

.subheader-progress-fill {
    height: 100%;
    background: #FFD000;
    transition: width 0.4s ease;

    width: 0%;
    transition: width 1s ease-in-out;
}

.subheader-progress-text {
    font-size: var(--font-size-sm);
    color: var(--font-clr-5);
    font-weight: var(--font-weight-6);
    text-align: right;
    width: auto;
}