.fetch-open-courses-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
}

.fetch-open-courses-th,
.fetch-open-courses-td {
    padding: 20px 12px;
    text-align: left;
    vertical-align: middle;
    border: none;
}

.fetch-open-courses-td.course-name {
    font-weight: bold;
}

.fetch-open-courses-td:last-child {
    text-align: center;
}

/* Shared styles for both the orange and greyed-out buttons */
.fetch-open-courses-link,
.greyed-out-btn {
    display: inline-block;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 5px;
    text-align: center;
    box-sizing: border-box;
    /* Ensures padding is included in width/height */
    min-width: 150px;
    /* Optional: Ensure buttons have a minimum width */
}

/* Specific styles for the orange button */
.fetch-open-courses-link {
    text-decoration: none;
    color: #fff;
    background-color: #ff9900;
}

.fetch-open-courses-link:hover {
    background-color: #e68a00;
}

/* Specific styles for the greyed-out button */
.greyed-out-btn {
    background-color: #d3d3d3;
    color: #a9a9a9;
    cursor: not-allowed;
    border: none;
    pointer-events: none;
    /* Prevent any interaction */
}

.fetch-open-courses-td .availability-text {
    text-align: center;
    font-size: 0.9em;
    margin-top: 5px;
    display: block;
}

@media screen and (max-width: 768px) {
    .fetch-open-courses-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .fetch-open-courses-tbody {
        display: block;
        width: 100%;
        overflow-x: auto;
    }

    .fetch-open-courses-th,
    .fetch-open-courses-td {
        display: block;
        padding: 16px 8px;
        text-align: right;
        border: none;
        position: relative;
    }

    .fetch-open-courses-th::before,
    .fetch-open-courses-td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 50%;
        padding-left: 10px;
        text-align: left;
        font-weight: bold;
    }

    .fetch-open-courses-td {
        border-bottom: 1px solid #ddd;
    }

    .fetch-open-courses-link {
        margin-top: 16px;
    }
}