/* LMS Advisor WordPress Connector — Team Licenses (My Account tab) */

.lmsa-lic-intro { font-size: 15px; color: #5c6478; line-height: 1.55; margin-bottom: 24px; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.lmsa-lic-empty {
    text-align: center; padding: 40px 20px; background: #fff;
    border: 1px solid #e2e8f0; border-radius: 14px;
}
.lmsa-lic-empty__icon { font-size: 48px; margin-bottom: 12px; }
.lmsa-lic-empty h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: #1e293b; }
.lmsa-lic-empty p { color: #6b7280; margin-bottom: 20px; }

/* ── License card ────────────────────────────────────────────────────────── */
.lmsa-lic-card {
    background: #fff; border: 1px solid #e7eaf2; border-radius: 16px;
    padding: 26px 28px; margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}
.lmsa-lic-card__head {
    display: flex; align-items: center; gap: 16px;
    flex-wrap: wrap; margin-bottom: 20px;
}
.lmsa-lic-card__icon {
    flex-shrink: 0; width: 58px; height: 58px; border-radius: 50%;
    background: #eef0ff; color: #5b5ef6;
    display: inline-flex; align-items: center; justify-content: center;
}
.lmsa-lic-card__icon svg { width: 28px; height: 28px; }
.lmsa-lic-card__titles { flex: 1; min-width: 200px; }
.lmsa-lic-card__title { margin: 0 0 5px; font-size: 19px; font-weight: 800; color: #16213e; line-height: 1.25; }
.lmsa-lic-card__meta {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 14px; color: #6b7280;
}
.lmsa-lic-card__meta svg { width: 16px; height: 16px; color: #8a90a3; flex-shrink: 0; }
.lmsa-lic-card__order { color: #9ca3af; }

.lmsa-assign-btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 13px 22px; border-radius: 11px;
    background: #5b5ef6; border: 1px solid #5b5ef6; color: #fff;
    font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer;
    transition: background .15s;
}
.lmsa-assign-btn svg { width: 16px; height: 16px; }
.lmsa-assign-btn:hover { background: #4b4ee0; color: #fff; }
.lmsa-assign-btn:disabled { opacity: .45; cursor: not-allowed; }

/* Seat usage bar */
.lmsa-lic-card__seats {
    display: flex; align-items: center; gap: 16px;
    padding-bottom: 20px; margin-bottom: 6px; border-bottom: 1px solid #eef0f6;
}
.lmsa-lic-seatbar {
    flex: 1; height: 10px; background: #e8edf8; border-radius: 20px; overflow: hidden;
}
.lmsa-lic-seatbar__fill { height: 100%; background: #5b5ef6; border-radius: 20px; transition: width .3s; }
.lmsa-lic-seatcount { font-size: 14.5px; white-space: nowrap; color: #46506b; }
.lmsa-lic-seatcount strong { color: #5b5ef6; font-weight: 700; }
.lmsa-lic-seatcount__left { color: #6b7280; }
.lmsa-lic-seatcount.is-full strong { color: #d97706; }

/* Seats table — bordered rounded rows */
.lmsa-lic-table {
    width: 100%; font-size: 14.5px;
    border-collapse: separate; border-spacing: 0 10px;
}
.lmsa-lic-table th {
    text-align: left; padding: 4px 14px; font-size: 12px; text-transform: uppercase;
    letter-spacing: .07em; color: #8a90a3; font-weight: 700; border: none;
}
.lmsa-lic-table td {
    padding: 13px 14px; color: #374151; background: #fff;
    border-top: 1px solid #e8ebf3; border-bottom: 1px solid #e8ebf3;
}
.lmsa-lic-table td:first-child { border-left: 1px solid #e8ebf3; border-radius: 12px 0 0 12px; }
.lmsa-lic-table td:last-child  { border-right: 1px solid #e8ebf3; border-radius: 0 12px 12px 0; }
.lmsa-lic-table__actions { text-align: right; }
.lmsa-lic-noseats td { color: #9ca3af; text-align: center; padding: 20px 14px; }

.lmsa-lic-person { display: inline-flex; align-items: center; gap: 12px; }
.lmsa-lic-person strong { color: #16213e; font-weight: 700; }
.lmsa-lic-avatar {
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
    background: #eef0ff; color: #5b5ef6;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13.5px; font-weight: 700; letter-spacing: .02em;
}

.lmsa-revoke-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 16px; border-radius: 9px;
    background: #fff; border: 1px solid #f3b4b4; color: #dc2626;
    font-size: 13.5px; font-weight: 700; line-height: 1; cursor: pointer;
    transition: background .15s;
}
.lmsa-revoke-btn svg { width: 15px; height: 15px; }
.lmsa-revoke-btn:hover { background: #fef2f2; color: #dc2626; }
.lmsa-revoke-btn:disabled { opacity: .6; cursor: wait; }

@media (max-width: 560px) {
    .lmsa-lic-card { padding: 18px; }
    .lmsa-assign-btn { width: 100%; justify-content: center; }
    .lmsa-lic-card__seats { flex-wrap: wrap; }
    .lmsa-lic-table thead { display: none; }
    .lmsa-lic-table, .lmsa-lic-table tbody, .lmsa-lic-table tr, .lmsa-lic-table td { display: block; width: 100%; }
    .lmsa-lic-table tr { border: 1px solid #e8ebf3; border-radius: 12px; margin-bottom: 10px; padding: 6px 0; }
    .lmsa-lic-table td, .lmsa-lic-table td:first-child, .lmsa-lic-table td:last-child {
        border: none; border-radius: 0; padding: 7px 14px;
    }
    .lmsa-lic-table__actions { text-align: left; }
}

/* ── Assign modal ────────────────────────────────────────────────────────── */
.lmsa-modal-backdrop {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(15, 23, 42, .55);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
/* CRITICAL: display:flex above overrides the UA's [hidden]{display:none},
   which left the backdrop permanently covering the page (blocked all clicks,
   Close appeared dead). Re-assert hidden explicitly. */
.lmsa-modal-backdrop[hidden] { display: none !important; }

.lmsa-modal {
    background: #fff; border-radius: 20px; width: 100%; max-width: 620px;
    padding: 0; overflow: hidden;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .3);
    animation: lmsa-modal-in .18s ease-out;
    box-sizing: border-box;
}
@keyframes lmsa-modal-in {
    from { opacity: 0; transform: translateY(10px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
.lmsa-modal *, .lmsa-modal *::before, .lmsa-modal *::after { box-sizing: border-box; }
body.lmsa-modal-open { overflow: hidden; }

/* Header — icon badge, title, course, close */
.lmsa-modal__head {
    display: flex; align-items: center; gap: 18px;
    padding: 24px 28px; border-bottom: 1px solid #eceef4; background: #fdfdfe;
}
.lmsa-modal__badge {
    flex-shrink: 0; width: 62px; height: 62px; border-radius: 50%;
    background: #eef0ff; color: #5b5ef6;
    display: inline-flex; align-items: center; justify-content: center;
}
.lmsa-modal__badge svg { width: 30px; height: 30px; }
.lmsa-modal__titles { flex: 1; min-width: 0; }
.lmsa-modal__titles h3 { margin: 0 0 3px; font-size: 22px; font-weight: 800; color: #16213e; line-height: 1.2; }
.lmsa-modal__course {
    display: block; font-size: 15px; color: #5b5ef6; font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lmsa-modal__close {
    flex-shrink: 0; width: 42px; height: 42px; border-radius: 11px;
    background: #fff; border: 1px solid #e3e6ee; color: #46506b;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0; transition: background .15s, border-color .15s;
}
.lmsa-modal__close svg { width: 17px; height: 17px; }
.lmsa-modal__close:hover { background: #f5f6fa; border-color: #cfd4e0; }

/* Body — fields with icons + helper text */
.lmsa-modal__body { padding: 26px 28px 8px; }
.lmsa-field { display: block; margin-bottom: 22px; }
.lmsa-field__label { display: block; font-size: 15px; font-weight: 700; color: #202a44; margin-bottom: 8px; }
.lmsa-field__label em { color: #e23553; font-style: normal; }
.lmsa-field__control { position: relative; display: block; }
.lmsa-field__icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 19px; height: 19px; color: #5b5ef6; pointer-events: none;
}
.lmsa-field__control input[type="text"],
.lmsa-field__control input[type="email"] {
    display: block; width: 100%; margin: 0; padding: 13px 14px 13px 44px;
    border: 1px solid #d6d9e3; border-radius: 11px;
    font-size: 15px; color: #202a44; background: #fff;
    box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.lmsa-field__control input:focus {
    border-color: #5b5ef6; outline: none;
    box-shadow: 0 0 0 3px rgba(91, 94, 246, .14);
}
.lmsa-field__help { display: block; font-size: 13.5px; color: #8a90a3; margin-top: 7px; }
.lmsa-modal__error {
    background: #fef2f2; color: #dc2626; border: 1px solid #fecaca;
    border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px;
}

/* Footer — note + actions */
.lmsa-modal__foot {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 18px 28px; border-top: 1px solid #eceef4; background: #fafbfd;
    flex-wrap: wrap;
}
.lmsa-modal__note {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 11px 14px; border: 1px solid #e5e8f2; border-radius: 11px;
    background: #fff; font-size: 13.5px; color: #46506b; max-width: 300px; line-height: 1.35;
}
.lmsa-modal__note svg { flex-shrink: 0; width: 17px; height: 17px; color: #5b5ef6; }
.lmsa-modal__actions { display: inline-flex; gap: 10px; margin-left: auto; }
.lmsa-modal__cancel,
.lmsa-modal__submit {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: 11px; font-size: 15px; font-weight: 700;
    cursor: pointer; line-height: 1; transition: background .15s, border-color .15s;
}
.lmsa-modal__cancel { background: #fff; border: 1px solid #dde0ea; color: #2b3452; }
.lmsa-modal__cancel:hover { background: #f5f6fa; }
.lmsa-modal__submit { background: #5b5ef6; border: 1px solid #5b5ef6; color: #fff; }
.lmsa-modal__submit:hover { background: #4b4ee0; }
.lmsa-modal__submit:disabled { opacity: .6; cursor: wait; }
.lmsa-modal__submit svg { width: 18px; height: 18px; }

@media (max-width: 560px) {
    .lmsa-modal__head { padding: 18px 20px; gap: 14px; }
    .lmsa-modal__badge { width: 50px; height: 50px; }
    .lmsa-modal__titles h3 { font-size: 18px; }
    .lmsa-modal__body { padding: 20px 20px 4px; }
    .lmsa-modal__foot { padding: 16px 20px; }
    .lmsa-modal__note { max-width: 100%; }
    .lmsa-modal__actions { width: 100%; }
    .lmsa-modal__actions button { flex: 1; justify-content: center; }
}
