body {
    font-family: Arial, sans-serif;
    /* margin: 1.25rem; */
}

.hidden {
    visibility: hidden;
}

.electives-container {
    width: 100%;
    max-width: 62.5rem; /* 1000px converted to rem */
    display: flex;
    flex-wrap: wrap;
    gap: 0.3125rem;
    background-color: #f0f0f0;
    padding: 0.3125rem;
    margin: 0.625rem 0;
    min-height: 3.125rem;
}
.electives-container.highlight {
    outline: 0.125rem dashed #007bff;
}

.semester {
    margin-bottom: 0.3125rem;
    display: flex;
    width: 100%;
}
.semester p {
    margin-right: 0.625rem;
    user-select: none;
}

.button-spacing {
    margin-right: 0.625rem;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3125rem;
    background-color: #f0f0f0;
    padding: 0.3125rem;
    border-radius: 0.3125rem;
    width: max-content;
    min-width: 34.0625rem; /* 545px converted */
    max-width: 100%; 
    min-height: 3.125rem;
    margin-bottom: 0.3125rem;
    align-content: flex-start;
}
.grid.highlight {
    outline: 0.125rem dashed #007bff;
}

.course {
    width: 3.125rem;
    height: 3.125rem;
    background-color: #e0e0e0;
    border: 0.0625rem solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: black;
    cursor: grab;
    width: calc(3.125rem * var(--credits) + 0.3125rem * (var(--credits) / 3 - 0.166));
}

.course:hover {
    transform: scale(1.025);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
}

.course:active {
    cursor: grabbing;
}











.isMarkedAsFreieWahl {
    background-color: #ffcc82 !important;
}





.split-container {
    display: flex; /* Use flexbox for the split */
    width: 100%; /* Full width of the parent container */
}

.left-column {
    flex: 60%; /* Takes 60% of the available space */
    padding-left: 1rem; /* Optional: adds spacing inside the column */
    max-width: 60%;
}

.right-column {
    flex: 40%; 
    padding-right: 1rem; 
}

.help-p {
    margin-bottom: 0.5rem;
    padding: 0;
}

h2 {
    margin: 0;
    margin-bottom: 0.5rem;
    padding: 0;
}


header {
    display: flex;
    align-items: center;
    justify-content:left;
    gap: 1rem;
    padding-top: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}


header h1 {
    margin: 0;
}

#titel {
    align-self: flex-start;
    margin: 0;

}

#info-msg-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

#error-msg-container {
align-self: flex-start;
}


.istFertig, .istNichtFertig {
    font-size: 1rem;
    border-radius: 0.3125rem;
    padding: 0.3125rem;
    border: 0.125rem solid;
    width: auto;
}

.istFertig p, .istNichtFertig p {
    margin: 0;
}

.istFertig {
    background-color: #d4edda;
    color: #155724;
    border-color: green;
}

.istNichtFertig {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #721c24;
}

#error-message {
    border-radius: 0.3125rem;
    padding: 0.3125rem; 
    border: 0.125rem solid;
    width: auto;
    background-color: #f8d7da;
    color: #721c24;
    border-color: #721c24;
    box-shadow: 0 0 10px rgba(114, 28, 36, 0.5); /* Added shadow for emphasis */
    animation: pulse 1.5s 4 forwards; /* Optional: Add a subtle animation */
}

/* Optional: Add a pulsing animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
    100% {
        transform: scale(1);
    }
}




/* Overlay Container */
.overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent black */
    z-index: 1000; /* Ensure it's on top */
    justify-content: center;
    align-items: center;
}

/* Overlay Content Box */
.overlay-content {
    background: white;
    padding: 2rem; /* Increased padding */
    border-radius: 0.75rem; /* Slightly larger radius */
    width: min(90%, 900px); /* Increased width */
    max-height: 90vh; /* Prevent overflow */
    overflow-y: auto; /* Scroll if content is too long */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

/* Overlay Header */
.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.overlay-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333; /* Dark text for contrast */
}

.close-btn {
    background: #f0f0f0; /* Light gray background */
    border: none;
    width: 2.5rem; /* Fixed size */
    height: 2.5rem; /* Fixed size */
    border-radius: 50%; /* Circular shape */
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666; /* Neutral gray */
    transition: background-color 0.2s ease, color 0.2s ease;
}

.close-btn:hover {
    background: #e0e0e0; /* Slightly darker gray on hover */
    color: #333; /* Darker text on hover */
}

/* Details Section */
.overlay-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee; /* Light separator */
}

.detail-row:last-child {
    border-bottom: none; /* No border for last row */
}

.detail-label {
    font-weight: bold;
    color: #555; /* Slightly muted text */
}

.detail-value {
    color: #333; /* Darker text for values */
}

/* Grade Selector */
.grade-section {
    margin: 1.5rem 0;
}

.grade-section label {
    margin-right: 0.5rem;
    font-weight: bold;
    color: #555;
}

.grade-section select {
    padding: 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #ddd;
    font-size: 1rem;
    background-color: #f9f9f9;
    transition: border-color 0.2s ease;
}

.grade-section select:hover {
    border-color: #007bff; /* Highlight on hover */
}

/* Action Buttons */
.overlay-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.action-btn.primary {
    background-color: #007bff; /* Blue for primary actions */
    color: white;
}

.action-btn.primary:hover {
    background-color: #0056b3; /* Darker blue on hover */
}

.action-btn.delete-btn {
    background-color: #dc3545; /* Red for delete actions */
    color: white;
}

.action-btn.delete-btn:hover {
    background-color: #a71d2a; /* Darker red on hover */
}

.edit-form {
    width: 100%;
    max-width: 400px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-row label {
    font-weight: 500;
    margin-bottom: 4px;
}

.form-row input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

#grades-view {
    padding: 20px;
    background: white;
    border-radius: 10px;
    margin-top: 20px;
}

.grade-semester-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ccc;
}

.grade-course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: #f5f5f5;
    border-radius: 5px;
}

.hidden {
    display: none;
}


.grades-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.grade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: #f5f5f5;
    border-radius: 4px;
}

.course-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.course-short {
    font-weight: bold;
    min-width: 60px;
}

.grade-select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.semester-divider {
    height: 2px;
    background: #ccc;
    margin: 20px 0;
}

.overlay-content h2 {
    margin-bottom: 20px;
}

.overlay-content h3 {
    color: #666;
    margin: 15px 0;
}

.option-group {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
}

.option-group h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 0.95em;
    font-weight: 600;
    text-transform: uppercase;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

