/* Chạy XFaculty trong iframe Moodle — spec 2026-11-15-moodle-integration §6.
   Mọi rule nằm dưới body.xf-lti-embed (do layout gắn) hoặc class xf-lti-* riêng. */

/* Ẩn khung điều hướng của site — Moodle đã có khung riêng */
body.xf-lti-embed .hp-nav,
body.xf-lti-embed .hp-footer,
body.xf-lti-embed .hp-bg-blobs,
body.xf-lti-embed .hp-trial-banner,
body.xf-lti-embed .page-main-header,
body.xf-lti-embed .main-nav,
body.xf-lti-embed .footer {
    display: none !important;
}

body.xf-lti-embed .page-wrapper .page-body-wrapper .page-body {
    margin-left: 0 !important;
    margin-top: 0 !important;
}

/* Thanh "Đang mở từ Moodle" */
.xf-lti-bar {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.xf-lti-bar-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.xf-lti-bar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.xf-lti-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border: 2px solid white;
    border-radius: 99px;
    background: transparent;
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.xf-lti-bar-btn:hover {
    background: white;
    color: var(--primary);
}

/* Trang thông báo độc lập (LtiMessage.cshtml, Layout = null) */
.xf-lti-msg-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: whitesmoke;
    color: midnightblue;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.xf-lti-msg {
    max-width: 520px;
    margin: 16px;
    padding: 28px 24px;
    background: white;
    border: 2px solid midnightblue;
    border-radius: 20px;
    text-align: center;
}

.xf-lti-msg-title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
}

.xf-lti-msg-text {
    margin: 0 0 18px;
    line-height: 1.5;
    color: dimgray;
}

.xf-lti-msg-steps {
    margin: 0 0 18px;
    padding-left: 22px;
    text-align: left;
    line-height: 1.5;
    color: midnightblue;
}

.xf-lti-msg-steps li + li {
    margin-top: 8px;
}

.xf-lti-msg-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid midnightblue;
    border-radius: 99px;
    background: gold;
    color: midnightblue;
    font-weight: 700;
    text-decoration: none;
}
