
.hr-border {
    height: 4px;
    margin-top: 40px;
    width: 100%;
    background-color: #D9D9D9;
}

.lrn-assess {
    margin: 0 !important;
}

.learnosity-item {
    margin-top: 24px;
}

.learnosity-item .col-xs-12 {
    margin-left: -15px !important;
    margin-right: -15px !important;
}

#manual-grading {
    margin-top: 24px;
}

.mg-grading-next-btn {
    box-shadow: none;
    margin-right: 0;
    margin-left: 5px;
    display: inline-block;
    vertical-align: top;
    max-width: 100%;
    background-color: #1877b1;
    color: #ffffff;
    border: 1px solid #1877b1;
    font-size: 1.25em;
    padding: 0.4em 0.9em;
    line-height: 1.5em;
    border-radius: 2px;
    transition: 0.2s linear background-color, color;
}

.mg-grading-next-btn:disabled {
    color: #696969;
    background-color: #eaeaea;
    border: 1px solid #d9d9d9;
    cursor: not-allowed !important;
    box-shadow: none;
    opacity: 0.8;
}

.mg-grading-next-btn:not(:disabled):hover  {
    background-color: #0b5684;
    color: #fff;
    border: 1px solid #1877b1;
}

.section-alert {
    margin-top: 24px;
    margin-bottom: 42px;
}

.lrn-item-row + .hr-border:last-child,
.wrapper > .hr-border:last-child {
    display: none;
}

/* ── LDS base styles (normally injected by the Grading API bundle) ────────── */
.mg-score-panel .lds-card {
    border: 1px solid rgba(0, 0, 0, 0.176);
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
}

.mg-score-panel .lds-card-body {
    padding: 16px 24px;
}

.mg-score-panel .lds-form-label,
.mg-score-panel .col-form-label {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 400;
    color: #333;
    line-height: 24px;
}

.mg-score-panel .col-form-label-sm {
    font-size: 16px;
    padding-top: 0;
    padding-bottom: 0;
}

.mg-score-panel .lds-form-control {
    display: block;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #939393;
    border-radius: 0;
    padding: 6px 12px;
    height: 38px;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    outline: none;
    box-sizing: border-box;
    width: auto;
}

.mg-score-panel .lds-form-control:invalid {
    /* Prevent browser default invalid styling */
    box-shadow: none;
}

.mg-score-panel .lds-form-control:hover {
    border-color: #333;
}

.mg-score-panel .lds-form-control:focus {
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(24,119,177,.2);
}

.mg-score-panel .lds-form-control.is-invalid {
    border-color: #dd002f;
}

.mg-score-panel .lds-form-text {
    display: inline-block;
    font-size: 14px;
    color: rgb(20,55,70);
}

/* Buttons */
.mg-score-panel .lds-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 4px;
    border: 1px solid transparent;
    padding: 2px 8px;
    cursor: pointer;
    text-decoration: none;
    transition: color .15s, background-color .15s, border-color .15s;
    white-space: nowrap;
}

.mg-score-panel .lds-btn-sm {
    font-size: 16px;
    padding: 2px 8px;
}

.mg-score-panel .lds-btn-outline-secondary {
    color: #333;
    background: transparent;
    border-color: #939393;
}

.mg-score-panel .lds-btn-outline-secondary:hover {
    background: #f0f0f0;
    border-color: #666;
}

.mg-score-panel .lds-btn-ghost-secondary {
    color: #333;
    background: transparent;
    border-color: transparent;
}

.mg-score-panel .lds-btn-ghost-secondary:hover {
    background: #f0f0f0;
}

/* Icons */
.mg-score-panel .lds-icon {
    fill: currentColor;
    flex-shrink: 0;
}

.mg-score-panel .lds-icon--small {
    width: 14px;
    height: 14px;
}

/* ── Score / feedback panel layout ─────────────────────────────────────────── */
.mg-score-panel {
    padding-top: 24px;
}

/* Score input row: score · / · N pts [edit] */
.lrn-mg-score-input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin-bottom: 0;
}

.lrn-mg-score-control {
    display: block;
    position: relative; /* anchor for absolutely-positioned max-score error message */
}

.lrn-mg-score-control:first-child {
    width: 120px;
}

.lrn-mg-score-control:nth-child(3) {
    min-width: 120px;
}

.lrn-mg-score-required {
    color: #dd002f;
    margin-left: 0;
}

.lrn-mg-no-label {
    min-height: 21px;
}

.lrn-mg-score-input {
    width: 120px !important;
    max-width: 120px;
    height: 38px;
    box-sizing: border-box;
}

.invalid-feedback {
    flex-basis: 100%;
    color: #dd002f;
    font-size: 14px;
    margin-top: 4px;
    display: none;
}

.lrn-mg-score-input-group.has-error .invalid-feedback {
    display: block;
}

.lrn-mg-score-input.is-invalid {
    border-color: #dd002f !important;
}

.lrn-mg-max-score-sep {
    padding: 8px;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #333 !important;
}

.lrn-mg-max-score-form {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-bottom: 0;
}

.lrn-mg-max-score-label {
    white-space: nowrap;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #333 !important;
}

.lrn-mg-max-score-button {
    width: 42px;
    height: 42px;
}

/* Pencil button custom tooltip (matches Grading API style) */
.lrn-mg-max-score-button-wrapper {
    position: relative;
}

.lrn-mg-max-score-button-wrapper .mg-tooltip {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    font-size: 14px;
    line-height: 21px;
    padding: 10px 12px;
    border-radius: 2px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 1000;
}

.lrn-mg-max-score-button-wrapper .mg-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #333;
}

.lrn-mg-max-score-button:hover + .mg-tooltip,
.lrn-mg-max-score-button:focus + .mg-tooltip {
    opacity: 1;
}

.lrn-mg-max-score-input {
    width: 120px;
    max-width: 120px;
    height: 38px;
    box-sizing: border-box;
    display: block;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #939393;
    border-radius: 0;
    padding: 6px 12px;
    outline: none;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.lrn-mg-max-score-input:focus {
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(24,119,177,.2);
}

.lrn-mg-max-score-input:invalid {
    box-shadow: none;
}

/* Feedback toggle */
.lrn-mg-feedback-toggle {
    margin-top: 12px;
}

.lrn-mg-feedback-toggle-btn {
    margin-bottom: 8px;
    height: 30px;
    line-height: 24px;
}

.lrn-mg-feedback-input {
    width: 100% !important;
    min-height: 62px;
    height: auto !important;
    resize: vertical;
    box-sizing: border-box;
}

.lrn-mg-character-count-container {
    text-align: right;
    margin-top: 3px;
}

.lrn-mg-character-count {
    font-size: 14px;
    color: #696969;
}

input[readonly].lrn-mg-score-input,
textarea[readonly].lrn-mg-feedback-input {
    background: #f5f5f5;
    color: #333;
    cursor: default;
}

/* ── Grading API score panel alignment (item 2) ───────────────────────────── */
/* The Grading API renders its own scoring panel inside a nested row.
   Align it with the custom panels on items 1 & 3 by removing the extra
   col-xs-12 wrapper padding and matching the outer grid. */
.lrn-mg-item-hook .lrn-mg {
    padding-top: 24px;
}

.lrn-mg-item-hook .lrn-mg .col-xs-12 {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.lrn-mg-item-hook > .mg-panel-footnote {
    text-align: right;
    margin-left: auto;
    width: 41.66667%; /* col-md-5 width — aligns with the Grading API scoring panel */
    padding-right: 4px;
    margin-right: 15px;
}

/* ── Feedback Aide panel ──────────────────────────────────────────────────── */
.lrn-fa {
    padding-top: 24px;
}

/* Panel footnote — full-width row appended to .lrn-item-row, outside sessionContainer */
.mg-panel-footnote {
    width: 100%;
    text-align: right;
    font-size: 12px;
    color: #696969;
    margin-top: 8px;
    padding-right: 4px;
}

.mg-fa-footnote {
    margin-top: -16px;
    padding-right: 15px;
}

/* Align "Your score" badge to the right */
.lrn-fa [data-component="score"] > div {
    display: flex;
    justify-content: flex-end;
}

/* Hide FA's built-in "Submit/Submitted scores" button and "How did we do?" prompt */
.lrn-fa [data-component="submit"],
.lrn-fa [data-component="satisfaction"] {
    display: none !important;
}

.underline {
    text-decoration: underline;
}

.submit-btn-group {
    float: right;
    margin: 40px 30px 30px 30px ;
}

.btn-spinner {
    border: 4px solid rgba(0, 0, 0, 0.2);
    border-left-color: #000;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
}

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