@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Sora:wght@600;700&display=swap");

/* =====================================================================
   "Enroll to unlock" card for the Calendar and Recordings tabs on
   /learner/course/view/{id}. Markup: Views/Learner/_EnrollToUnlockPartial.
   Same language as the instructor side: violet on a soft wash, ink text,
   Inter. Sits in a narrow side panel, so it is built to
   ~280px and simply gets roomier when wider.
   ===================================================================== */
.cml {
    --ink: #14121f; --muted: #5d5a70; --violet: #6d4aff; --violet-ink: #4f30e0;
    --wash: #f3f2f8; --line: #e4e2ee; --gold: #f6c453;
    position: relative; overflow: hidden; isolation: isolate;
    margin: 6px 2px 10px; padding: 22px 20px 20px; border-radius: 18px;
    background: linear-gradient(160deg, #f7f5ff 0%, #fff 60%);
    border: 1px solid var(--line);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif !important;
    color: var(--ink); text-align: left;
}
.cml::before {
    /* faint dotted grid in the corner, like the dashboard header */
    content: ""; position: absolute; z-index: -1; right: -20px; top: -20px; width: 160px; height: 160px;
    background-image: radial-gradient(rgba(109,74,255,.18) 1.2px, transparent 1.4px);
    background-size: 12px 12px;
    -webkit-mask-image: radial-gradient(circle at 70% 30%, #000 30%, transparent 70%);
    mask-image: radial-gradient(circle at 70% 30%, #000 30%, transparent 70%);
}
.cml * { font-family: inherit !important; }

/* ---------- the little drawing ---------- */
.cml-art { position: relative; width: 84px; height: 70px; margin-bottom: 16px; }
.cml-cal {
    width: 78px; height: 64px; border-radius: 12px; background: #fff;
    border: 1px solid var(--line); box-shadow: 0 10px 22px -14px rgba(79,48,224,.55);
    overflow: hidden;
}
.cml-cal-top { display: block; height: 14px; background: var(--violet); }
.cml-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 8px 8px 0; }
.cml-cal-grid i { display: block; height: 7px; border-radius: 2px; background: #e9e6f6; }
.cml-cal-grid i.is-on { background: var(--gold); }

.cml-rec {
    position: relative; width: 78px; height: 58px; border-radius: 12px;
    background: linear-gradient(135deg, #5b3fc4, #9370db);
    box-shadow: 0 10px 22px -12px rgba(79,48,224,.7);
}
.cml-rec-play {
    position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
    width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.95);
    display: grid; place-items: center; color: var(--violet-ink); font-size: 15px;
}
.cml-rec-bar { position: absolute; left: 8px; right: 8px; bottom: 7px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); }
.cml-rec-bar b { display: block; width: 38%; height: 100%; border-radius: 3px; background: #fff; }

.cml-lock {
    position: absolute; right: 0; bottom: 0;
    width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center; font-size: 13px;
    background: var(--ink); color: #fff; border: 3px solid #fff;
}

/* empty state (enrolled, nothing yet): _TabEmptyStatePartial. Hourglass instead of the lock,
   a quieter card, a grey recording tile, and no button, so the list has no trailing gap. */
.cml-wait { background: var(--violet); }
.cml.is-empty { background: linear-gradient(160deg, #f8f7fc 0%, #fff 60%); }
.cml.is-empty .cml-rec { background: linear-gradient(135deg, #b9b1d8, #d6d0ec); box-shadow: 0 10px 22px -14px rgba(79,48,224,.45); }
.cml.is-empty .cml-rec-bar b { width: 0; }
.cml.is-empty .cml-points { margin-bottom: 2px !important; }

/* ---------- words ---------- */
.cml-title {
    margin: 0 0 6px !important; font-size: 17px !important; line-height: 1.3 !important;
    font-weight: 700 !important; letter-spacing: -0.01em; color: var(--ink) !important;
}
.cml-body { margin: 0 0 14px !important; font-size: 14px !important; line-height: 1.5 !important; color: var(--muted) !important; font-style: normal !important; }

.cml-points { list-style: none; margin: 0 0 18px !important; padding: 0 !important; display: grid; gap: 8px; }
.cml-points li {
    display: flex; align-items: center; gap: 10px;
    font-size: 13.5px; color: var(--ink); line-height: 1.3;
}
.cml-points i {
    flex: none; width: 26px; height: 26px; border-radius: 8px;
    display: grid; place-items: center; font-size: 13px;
    background: #ece8ff; color: var(--violet-ink);
}

/* ---------- action ---------- */
.cml-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 42px; padding: 0 18px; border: 0; border-radius: 12px;
    background: var(--violet); color: #fff !important;
    font-size: 14.5px; font-weight: 600; cursor: pointer;
    box-shadow: 0 10px 20px -12px rgba(109,74,255,.9);
    transition: background-color .15s ease, transform .15s ease;
}
.cml-btn:hover { background: var(--violet-ink); transform: translateY(-1px); }
.cml-btn:focus-visible { outline: 3px solid rgba(109,74,255,.35); outline-offset: 2px; }
.cml-btn i { transition: transform .15s ease; }
.cml-btn:hover i { transform: translateX(3px); }

/* the details panel's enroll button, briefly, after "See how to enroll" */
.cml-pulse { animation: cml-pulse 1.6s ease-out 1; }
@keyframes cml-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(109,74,255,.55); }
    70%  { box-shadow: 0 0 0 14px rgba(109,74,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(109,74,255,0); }
}

@media (prefers-reduced-motion: reduce) {
    .cml-btn, .cml-btn i { transition: none; }
    .cml-pulse { animation: none; outline: 3px solid rgba(109,74,255,.5); }
}
