@charset "utf-8";

#assignmentDrawer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    background: #f5f5f5;
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
    z-index: 9999;
    font-family: sans-serif;
}

@media (max-width: 1200px) {
    #assignmentDrawer {
        width: 80%;
    }
}

#drawerToggle {
    padding: 10px;
    background: #e0e0e0;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    transition: transform 0.2s ease-in-out;
    z-index: 10000;
}

#assignmentDrawer.collapsed #drawerToggle:hover {
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px 8px 0 0;
}

#assignmentList {
    flex: 1;
    overflow-y: auto;
}

.assignment-item {
    border-bottom: 1px solid #ddd;
    margin-bottom: 6px;
    margin-top: 6px;
    padding: 4px 8px 12px;
}

.assignment-header {
    display: grid;
    grid-template-columns: 40px 1fr 24px 40px 1fr auto;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    margin-bottom: 4px;
}

.avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.assignment-name {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assignment-time {
    text-align: right;
    font-size: 11px;
    color: #888;
    align-self: start;
}

.done-at {
    text-align: center;
    font-weight: bolder;
    font-size: 11px;
    color: #000;
    margin-top: -8px;
}
.arrow {
    font-size: 16px;
    color: #aaa;
}

.assignment-text {
    display: inline-block;
    max-width: 75%;
    margin-left: 40px;
    font-size: 14px;
    color: #333;
}

.assignment-form {
    display: flex;
    flex-direction: column;
    padding-top: 10px;
    border-top: 1px solid #ccc;
}

#assignmentDrawer .done-column {
    float: right;
}

@keyframes highlightSeamless {
    0%, 100% {
        background-color: rgba(255, 96, 15, 0);
    }
    50% {
        background-color: rgba(255, 96, 15, 0.2);
    }
}

.assignment-item.highlighted {
    animation: highlightSeamless 1.4s ease-in-out 3;
}

.assignment-form label {
    color: #333;
}

.assignment-form textarea {
    resize: vertical;
    min-height: 50px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: border 0.2s ease-in-out;
}

.assignment-form textarea:focus {
    border-color: #ff600f;
    outline: none;
}

.assignment-form button {
    align-self: flex-end;
}

#drawerContent {
    position: relative;
    height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease, opacity 0.3s ease, height 0.3s ease;
    pointer-events: none;
    padding: 0 10px;
}

#drawerContent.open {
    height: 56vh;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    padding: 10px;
}

@media (max-width: 600px) {
    #drawerContent.open {
        height: 66vh;
    }
}

@media (max-width: 400px) {
    #drawerContent.open {
        height: 77vh;
    }
}

.drawer-heading {
    font-size: 16px;
    font-weight: bold;
    padding: 8px 10px;
    margin: 0;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ccc;
}

.assignment-meta {
    margin-left: 40px;
    margin-bottom: 5px;
    font-size: 13px;
    color: #666;
}

.assignment-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.type-label {
    font-weight: 500;
}
.assignment-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    margin-top: 10px;
}

.assignment-form-col {
    flex: 1 1 32%;
    display: flex;
    flex-direction: column;
}
.assignment-form label {
    margin-bottom: 6px;
}

.assignment-form-items{
    margin-top: 1rem;
}

.assignment-form-items > .form-floating{
    flex: 1 1 0;
    min-width: 0;        /* wichtig: erlaubt shrink */
}

@media (max-width: 992px) {
    .assignment-form-items .form-floating {
        flex: 1 1 150px;
    }
}


/*.assignment-form-col select {
    padding: 8px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}*/

.assignment-form-col button.btn.white {
    height: 100%!important;
    width: 100%;
}

.assignment-form-col button.btn.white:hover,
#assignmentDrawer .mark-done-btn:hover {
    background-color: #000;
    color: #fff;
    cursor: pointer;
}

#assignmentForm {
    all: unset; /* Optional: resets everything if safe */
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
    margin-top: 5px;
}

#assignmentDropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-left: 40px;
    width: 340px;
    max-height: 300px; /* Max visible height */
    overflow-y: auto;   /* Scroll if too tall */
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 6px;
}

#assignmentDropdown.show-dropdown {
    display: block;
}