/* Add these styles to your existing CSS (replace the course-related styles) */

/* Course Rows Styling */
#course-rows-container {
    margin-bottom: 15px;
}

.course-row {
    margin-bottom: 12px;
    animation: slideIn 0.3s ease-out;
}

.course-row-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: #fafbfc;
}

.course-select-group {
    flex: 2;
    min-width: 200px;
}

.course-select-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.timing-group {
    flex: 3;
    display: flex;
    gap: 15px;
    align-items: center;
}

.recurrence-group,
.notification-group {
    flex: 1;
    display: flex;
    gap: 8px;
    align-items: center;
}

.recurrence-group::before {
    content: "Due:";
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    min-width: 35px;
}

.notification-group::before {
    content: "Notify:";
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    min-width: 40px;
}

.recurrence-number,
.notification-number {
    width: 60px !important;
    padding: 6px 8px !important;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.recurrence-unit,
.notification-unit {
    min-width: 80px;
    padding: 6px 8px !important;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
}

.remove-course-row {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-course-row:hover {
    background: #dc2626;
    transform: scale(1.1);
}

#add-course-row {
    background: #10b981;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s ease;
}

#add-course-row:hover {
    background: #059669;
}

/* Responsive Design for Course Rows */
@media (max-width: 768px) {
    .course-row-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .timing-group {
        flex-direction: column;
        gap: 12px;
    }

    .recurrence-group,
    .notification-group {
        justify-content: space-between;
        padding: 8px;
        background: white;
        border-radius: 4px;
        border: 1px solid #e5e7eb;
    }

    .recurrence-group::before,
    .notification-group::before {
        font-size: 13px;
        min-width: auto;
    }
}

/* Enhanced Form Styling */
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
    font-size: 14px;
}

.form-group label::after {
    content: " *";
    color: #ef4444;
}

.form-group label[for="notification_timing"]::after,
.form-group label[for="recurrence_rule"]::after,
.form-group:not([id]) label::after {
    content: "";
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Update button styling */
.btn-primary {
    background: #3b82f6;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
    min-width: 120px;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Loading state for course rows */
.course-row.loading {
    opacity: 0.5;
}

/* Empty state */
.no-courses-message {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-style: italic;
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* Add these styles to your existing CSS (replace the course-related styles) */

/* Course Rows Styling - Single Row Layout */
#course-rows-container {
    margin-bottom: 15px;
}

.course-row {
    margin-bottom: 12px;
    animation: slideIn 0.3s ease-out;
}

.course-form-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    padding: 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: #fafbfc;
    margin-bottom: 0;
}

.course-form-row .form-group {
    margin-bottom: 0;
}

.course-select-group {
    flex: 3;
    min-width: 200px;
}

.recurrence-group,
.notification-group {
    flex: 2;
    min-width: 150px;
}

.remove-group {
    flex: 0 0 auto;
    width: 40px;
}

.course-select-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.recurrence-inputs,
.notification-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.recurrence-number,
.notification-number {
    flex: 1;
    min-width: 60px;
    padding: 8px 10px !important;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.recurrence-unit,
.notification-unit {
    flex: 2;
    min-width: 80px;
    padding: 8px 10px !important;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

.remove-course-row {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-course-row:hover {
    background: #dc2626;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

#add-course-row {
    background: #10b981;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
    margin-top: 10px;
}

#add-course-row:hover {
    background: #059669;
}

#add-course-row:before {
    content: "+ ";
    font-weight: bold;
}

/* Responsive Design for Course Rows */
@media (max-width: 1024px) {
    .course-form-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .course-select-group {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .recurrence-group,
    .notification-group {
        flex: 1 1 calc(50% - 6px);
        min-width: 140px;
    }

    .remove-group {
        flex: 0 0 auto;
        width: 40px;
        align-self: flex-start;
        margin-top: 25px;
    }
}

@media (max-width: 600px) {
    .course-form-row {
        flex-direction: column;
        gap: 15px;
    }

    .course-select-group,
    .recurrence-group,
    .notification-group {
        flex: 1;
        min-width: 100%;
    }

    .remove-group {
        align-self: center;
        margin-top: 0;
    }

    .recurrence-inputs,
    .notification-inputs {
        justify-content: space-between;
    }
}

/* Enhanced Form Styling */
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
    font-size: 14px;
}

.form-group label::after {
    content: " *";
    color: #ef4444;
}

.form-group label[for="notification_timing"]::after,
.form-group label[for="recurrence_rule"]::after,
.form-group:not([id]) label::after {
    content: "";
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Update button styling */
.btn-primary {
    background: #3b82f6;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
    min-width: 120px;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Loading state for course rows */
.course-row.loading {
    opacity: 0.5;
}

/* Empty state */
.no-courses-message {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-style: italic;
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    margin-bottom: 15px;
}

.course-row.loading {
    opacity: 0.5;
    pointer-events: none;
}

.course-row.loading::after {
    content: "Loading courses...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 4px;
}

.assignments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.assignment-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.assignment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.assignment-card__header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f0f0f0;
}

.assignment-card__title {
    margin: 0;
    font-size: 1.2em;
    color: #2d3748;
    font-weight: 600;
    line-height: 1.4;
    padding-right: 15px;
}

.assignment-card__status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.woo-assign-header .assignment-card__status.status-compliant {
    margin-left: auto;
    display: block;
    width: fit-content;
    background: #fff;
    border-radius: 6px;
}
.status-compliant {
    background-color: white;
    color: #10b981;
}

.status-due-soon {
    background-color: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.status-overdue {
    background-color: #fff;
    color: #ef4444;
}

.assignment-card__content {
    padding: 20px;
}

.assignment-card__meta-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.95em;
}

.assignment-card__meta-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    color: #718096;
    flex-shrink: 0;
}

.assignment-card__meta-text {
    color: #4a5568;
    line-height: 1.5;
}

.assignment-card__meta-text strong {
    color: #2d3748;
    font-weight: 600;
}

.assignment-card__courses-list {
    margin: 0;
    padding-left: 20px;
    color: #4a5568;
}

.assignment-card__course-item {
    margin-bottom: 6px;
    line-height: 1.4;
}

.assignment-card__footer {
    padding: 16px 20px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.assignment-card__date {
    font-size: 0.85em;
    color: #718096;
    font-weight: 500;
}

.button--primary {
    padding: 8px 16px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.button--primary:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
    color: white;
    text-decoration: none;
}

/* Progress bar for due soon items */
.assignment-card__progress {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
}

.assignment-card__progress-bar {
    height: 100%;
    border-radius: 3px;
}

.progress-due-soon {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    width: 70%;
}

.progress-overdue {
    background: linear-gradient(90deg, #ef4444, #f87171);
    width: 100%;
}

/* Badge for rule type */
.assignment-card__badge {
    padding: 11px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 800;
    text-transform: uppercase;
    background: #edf2f7;
    color: #4a5568;
    text-align: center;
}

/* Loading animation */
.loading-spinner {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
    font-style: italic;
}

.loading-spinner:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Empty state */
.assignments-empty {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.assignments-empty__icon {
    font-size: 3em;
    margin-bottom: 16px;
    color: #cbd5e0;
}

.assignments-empty__text {
    font-size: 1.1em;
    margin-bottom: 8px;
}

.assignments-empty__subtext {
    font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .assignments-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .assignment-card__header {
        padding: 16px;
        flex-direction: column;
    }

    .assignment-card__status {
        margin-top: 10px;
        align-self: flex-start;
    }

    .assignment-card__content {
        padding: 16px;
    }

    .assignment-card__footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .assignment-card__badge {
        position: static;
        margin-bottom: 10px;
        align-self: flex-start;
    }
}

/* Hide the select options before audit report export */
#audit-modal-export-audit-content .tgbl-audit-group-report__filters__export {
    display: none !important;
}
/* Bulk edit user roles pop up button */
#group-management-bulk-role-edit-frm .submit-group-management-form:hover {
    color: #167cb7;
    background-color: inherit;
    border-color: #0077b6;
}
/* Target the form - user role management (todo: deployment change the data-id) */
#ws-form-1[data-id="8"] [data-id="392"] {
    display: none !important;
}
/* Hide unwanted filters */
/* .tgbl-audit-input-dropdown-checkmarks #auditCourseCategoryTrigger {
    display: none !important;
} */
.tgbl-audit-input-dropdown-checkmarks:nth-of-type(2) {
    display: none !important;
}
.tgbl-audit-filterset__item.tgbl-audit-filterset__item--is-grouped {
    display: block !important;
    width: 60%;
}

#group-management-enrolled-users-datatable th.roles-column {
    min-width: 120px;
}
.group-management-modal .uo-row .select2-container {
    border: 1px solid #000;
    border-radius: 3px;
}
.group-management-modal .uo-row .select2-container span.select2-selection {
    border: none !important;
}
.group-management-modal .uo-row .select2-container span.select2-selection ul.select2-selection__rendered {
    min-height: 0;
    padding: 0;
}
.group-management-modal .uo-row .select2-container span.select2-selection ul.select2-selection__rendered li {
    margin: 7px 0 0 7px;
}

/* Group Notification Setting */

.baysideceu-frontend-settings {
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.settings-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.header-icon {
    font-size: 2rem;
    margin-top: 0.25rem;
}

.header-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.header-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.5;
}

.card-body {
    padding: 2rem;
}

.setting-toggle {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.toggle-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    margin: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #10b981;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.toggle-content {
    flex: 1;
}

.toggle-title {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.toggle-description {
    display: block;
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.4;
}

.frequency-container {
    transition: all 0.3s ease;
}

.frequency-container.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.frequency-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 4px solid #0ea5e9;
}

.frequency-icon {
    font-size: 1.25rem;
}

.frequency-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0369a1;
}

.frequency-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.frequency-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 1.5rem;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.frequency-label {
    min-width: 120px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.frequency-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.control-prefix {
    color: #6b7280;
    font-weight: 500;
}

.control-select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.95rem;
    min-width: 120px;
}

.time-input-container {
    position: relative;
}

.time-input {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.95rem;
    min-width: 120px;
}

.schedule-options {
    transition: all 0.3s ease;
}

.schedule-options.hidden {
    display: none !important;
}

.schedule-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.preview-icon {
    font-size: 1.25rem;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.preview-label {
    font-size: 0.9rem;
    color: #065f46;
    font-weight: 500;
}

.preview-value {
    font-size: 1rem;
    color: #047857;
    font-weight: 600;
}

.form-actions {
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
    text-align: center;
}

.save-settings-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.save-settings-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.save-settings-btn:disabled {
    background: #9ca3af;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.1rem;
}

.form-message {
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    display: none;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.baysideceu-access-message {
    text-align: center;
    padding: 2rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
}

@media (max-width: 768px) {
    .baysideceu-frontend-settings {
        margin: 1rem;
    }

    .card-header {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
    }

    .card-body {
        padding: 1.5rem;
    }

    .frequency-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .frequency-controls {
        width: 100%;
    }
}

/* shell course code start */
.shell-courses-add-completion-container,
.shell-courses-add-course-container {
    margin-top: 20px;
}
.remove-shell-courses-completion-row,
.remove-shell-courses-course-row {
    background: #dc3232;
    color: white;
    border: none;
    border-radius: 50%;
    width: 150px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.remove-shell-courses-completion-row {
    width: 150px;
    height: 30px;
}
.remove-shell-courses-course-row {
    width: 36px;
    height: 30px;
}
.shell-courses-member,
.shell-courses-course,
.shell-courses-completion-date,
.remove-shell-courses-completion-row,
.shell-courses-course-title,
.remove-shell-courses-course-row {
    align-self: center;
}
#add-shell-courses-completion-row,
#add-shell-courses-course-row {
    background: #10b981;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
}
#shell-courses-course-rows .shell-course-row .field-label,
#shell-courses-course-rows .shell-courses-course-row .field-label {
    flex-basis: 15%;
}
