/* ===========================================================
   ILAW Core Theme System
   Scope: any ILAW screen wraps itself in .ilaw-shell
   This prevents Elementor / theme styles from leaking in.
   =========================================================== */

.ilaw-shell {
    --ilaw-bg-page: #f7faff;
    --ilaw-bg-surface: #ffffff;
    --ilaw-surface-border: rgba(15, 23, 42, 0.06);
    --ilaw-card-shadow: 0 32px 80px -8px rgba(15, 23, 42, 0.08);

    --ilaw-brand-start: #2563eb;
    --ilaw-brand-end:   #7c3aed;
    --ilaw-brand-solid: #2563eb;
    --ilaw-brand-solid-hover: #1e4ed8;
    --ilaw-brand-text-on: #fff;

    --ilaw-text-main: #0f172a;
    --ilaw-text-dim: #475569;

    --ilaw-radius-lg: 16px;
    --ilaw-radius-md: 10px;

    /* readable law font sizes */
    --ilaw-heading-lg: clamp(1.125rem, 0.3vw + 1rem, 1.3rem); /* ~18-20px */
    --ilaw-heading-md: 1rem;  /* 16px */
    --ilaw-text-body: 1rem;   /* 16px */
    --ilaw-text-small: .875rem; /* 14px */

    font-family: var(--ilaw-font-family, "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif);
    background-color: var(--ilaw-bg-page);
    color: var(--ilaw-text-main);
    line-height: 1.55;
}

/* RTL font override – plugin sets --ilaw-font-family via inline style */
[dir="rtl"].ilaw-shell {
    text-align: right;
}

body {
	background: var(--ilaw-bg-page, #f7faff) !important;
}

/* Utility layout blocks */
.ilaw-shell .ilaw-header-bar, .ilaw-header-bar {
    background: linear-gradient(90deg,var(--ilaw-brand-start) 0%,var(--ilaw-brand-end) 100%);
    color: var(--ilaw-brand-text-on);
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    row-gap: 8px;
    column-gap: 12px;
    box-shadow: 0 30px 60px -10px rgba(37, 99, 235, 0.3);
}

.ilaw-shell .ilaw-header-left, .ilaw-header-left {
    min-width: 200px;
}

.ilaw-shell .ilaw-header-title, .ilaw-header-title {
    font-size: var(--ilaw-heading-lg);
    font-weight: 600;
    color: var(--ilaw-brand-text-on);
    display: block;
    margin-bottom: 4px;
    line-height: 1.4;
    word-break: break-word;
}

.ilaw-shell .ilaw-header-meta, .ilaw-header-meta {
    font-size: var(--ilaw-text-small);
    opacity: .9;
    color: var(--ilaw-brand-text-on);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    line-height: 1.4;
}

.ilaw-shell .ilaw-header-actions, .ilaw-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

/* Smooth hover transition */
.ilaw-pill-btn {
    appearance: none;
    border: 1px solid rgba(255,255,255,.4);
    background-color: rgba(255,255,255,.12);
    color: #fff;
    border-radius: var(--ilaw-radius-md);
    font-size: var(--ilaw-text-small);
    line-height: 1.3;
    font-weight: 400;
    padding: 7px 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
	margin:0 1px;
	border-radius:3px;
	
    /* Make transitions slower and smoother */
    transition:
        background-color 1s ease,
        transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.5s ease,
        color 0.3s ease;
    
    /* Fix potential transform conflict */
    will-change: transform, background-color;
    position: relative;
    z-index: 1;
}

.ilaw-pill-btn:hover {
    color: #000b2e !important;

    /* Animate button upward on hover */
    transform: translateY(-6px);

    /* Smoother background color transition */
    background-color: rgba(255,255,255,60%);

    /* Soft hover shadow */
    box-shadow: 0 5px 5px rgba(255, 255, 255, 0.12);
}

.ilaw-pill-btn:active {
    transform: translateY(-2px); /* Push down slightly when clicked */
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.08);
}

.ilaw-header-actions {
    overflow: visible !important; /* Allow movement outside container */
    position: relative; /* Required for transform context */
}

/* Animation keyframes for entrance from top */
@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animation */
.animate-btn {
    opacity: 0;
    animation: slideInFromTop 0.6s ease forwards;
}

/* Stagger animation using nth-child */
.animate-btn:nth-child(1) { animation-delay: 0.1s; }
.animate-btn:nth-child(2) { animation-delay: 0.2s; }
.animate-btn:nth-child(3) { animation-delay: 0.3s; }
.animate-btn:nth-child(4) { animation-delay: 0.4s; }
.animate-btn:nth-child(5) { animation-delay: 0.5s; }
.animate-btn:nth-child(6) { animation-delay: 0.6s; }

/* =======================================================================================
   Cards / sections
   ======================================================================================= */

.ilaw-shell .ilaw-section-card {
    background-color: var(--ilaw-bg-surface);
    border: 1px solid var(--ilaw-surface-border);
    box-shadow: -2px 1px 20px -8px rgba(15, 23, 42, 0.08);
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 20px;
    position: relative;
}

.ilaw-shell .ilaw-section-heading {
    display: flex;
    align-items: flex-start;
    gap:6px;
    margin-bottom: 12px;
    line-height:1.4;
    font-weight:600;
    color: var(--ilaw-text-main);
    font-size: var(--ilaw-heading-md);
}
.ilaw-shell .ilaw-section-heading i {
    font-style: normal;
    color: var(--ilaw-brand-start);
    font-size: 1.3em;
	line-height: 20px;
}
.ilaw-shell .ilaw-section-heading .ilaw-dot {
    width:8px;
    height:8px;
    border-radius:999px;
    background: radial-gradient(circle at 30% 30%, var(--ilaw-brand-start) 0%, var(--ilaw-brand-end) 70%);
    box-shadow:0 0 12px var(--ilaw-brand-end);
    flex-shrink:0;
    margin-top:6px;
}

/* horizontal flex row inside a section, responsive wrap */
.ilaw-shell .ilaw-flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.ilaw-shell .ilaw-col {
    flex:1 1 220px;
    min-width:220px;
}

/* small list widget */
.ilaw-shell .ilaw-mini-widget {
    background-color: #f8fafc;
    border:1px solid rgba(15,23,42,.06);
    border-radius: var(--ilaw-radius-md);
    padding:12px 14px;
    position: relative;
    font-size: var(--ilaw-text-small);
}
.ilaw-shell .ilaw-mini-widget-title {
    font-weight:600;
    color:var(--ilaw-text-main);
    font-size: var(--ilaw-text-small);
    display:flex;
    align-items:center;
    gap:6px;
    line-height:1.4;
    margin-bottom:8px;
}
.ilaw-shell .ilaw-mini-widget-title i {
    font-style: normal;
    font-size: .8em;
    line-height:1;
    color: var(--ilaw-brand-start);
}
.ilaw-shell .ilaw-mini-widget ul {
    margin:0;
    padding-inline-start: 1.2em;
    color: var(--ilaw-text-main);
}
[dir="rtl"].ilaw-shell .ilaw-mini-widget ul {
    padding-inline-start: 0;
    padding-inline-end:1.2em;
}

/* Instructor block (top of course page) */
.ilaw-shell .ilaw-instructor-wrap {
    display:flex;
    flex-wrap:wrap;
    gap:16px;
    /*background-color: var(--ilaw-bg-surface);
    border:1px solid var(--ilaw-surface-border);
    box-shadow: var(--ilaw-card-shadow);
    border-radius: var(--ilaw-radius-lg);*/
    padding:16px 20px 0 20px;
    margin-top:16px;
}
.ilaw-shell .ilaw-instructor-avatar {
    width:88px;
    height:88px;
    border-radius:999px;
    background:#f1f5f9;
    border:1px solid rgba(0,0,0,.05);
    overflow:hidden;
    flex:0 0 88px;
    display:flex;
    align-items:center;
    justify-content:center;
}
.ilaw-shell .ilaw-instructor-avatar img {
    width:100%;
    height:100%;
    object-fit:cover;
}
.ilaw-shell .ilaw-instructor-meta {
    flex:1;
    min-width:220px;
	font-family:system-ui;
}
.ilaw-shell .ilaw-instructor-meta .ilaw-instructor-label {
    font-size: var(--ilaw-text-small);
    font-weight:600;
    color: var(--ilaw-text-dim);
    margin-bottom:4px;
}
.ilaw-shell .ilaw-instructor-name {
    font-size: var(--ilaw-heading-md);
    font-weight:600;
    color:var(--ilaw-text-main);
    margin-bottom:2px;
    line-height:1.4;
	font-family:system-ui;
}
.ilaw-shell .ilaw-instructor-role {
    color:var(--ilaw-text-dim);
    font-size: var(--ilaw-text-small);
    line-height:1.4;
    margin-bottom:8px;
	font-family:system-ui;
}
.ilaw-shell .ilaw-instructor-bio {
    color:var(--ilaw-text-main);
    font-size: var(--ilaw-text-small);
    line-height:1.6;
	font-family:system-ui;
}

/* Overview / about course body text */
.ilaw-shell .ilaw-overview-body {
    font-size: var(--ilaw-text-small);
    line-height:1.6;
    color: var(--ilaw-text-main);
    /*background:#fff;
    border:1px solid var(--ilaw-surface-border);
	box-shadow: var(--ilaw-card-shadow);*/
    border-radius: var(--ilaw-radius-md);
    padding:12px 14px;
	font-family:system-ui;
}

.ilaw-shell .ilaw-overview-body h3 {
	font-size: 1.3rem;
	padding:10px 0;
}

.ilaw-shell .ilaw-overview-body h3 strong {
    font-weight: 400;
}

/* PDFs row */
.ilaw-shell .ilaw-pdf-row {
    display:flex;
    flex-wrap:wrap;
    align-items:flex-start;
    gap:12px;
    width:100%;
}

.ilaw-shell .ilaw-pdf-info {
    flex:1 1 auto;
    min-width:180px;
    font-size: var(--ilaw-text-small);
    line-height:1.4;
	font-family:system-ui;
}
.ilaw-shell .ilaw-pdf-title {
    color: var(--ilaw-brand-start);
    font-weight:600;
    margin-bottom:4px;
    display:flex;
    flex-wrap:wrap;
    gap:6px;
	font-family:system-ui;
}
.ilaw-shell .ilaw-pdf-desc {
    color: var(--ilaw-text-dim);
    line-height:1.5;
	font-family:system-ui;
}
.ilaw-shell .ilaw-pdf-openbtn {
    flex:0 0 auto;
}
.ilaw-shell .ilaw-solid-btn {
    background: var(--ilaw-brand-solid);
    color: var(--ilaw-brand-text-on);
    border:none;
    border-radius: var(--ilaw-radius-md);
    padding:8px 12px;
    font-size: var(--ilaw-text-small);
    font-weight:500;
    line-height:1.3;
    box-shadow:0 20px 40px -8px rgba(37,99,235,.4);
    cursor:pointer;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    gap:6px;
}
.ilaw-shell .ilaw-solid-btn:hover {
    background: var(--ilaw-brand-solid-hover);
}

/* Video grid */
.ilaw-shell .ilaw-video-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}
@media (max-width:900px){
    .ilaw-shell .ilaw-video-grid {
        grid-template-columns:1fr;
    }
}

.ilaw-shell .ilaw-video-card {
    background:#fff;
    border:1px solid var(--ilaw-surface-border);
    border-radius: var(--ilaw-radius-md);
    box-shadow: var(--ilaw-card-shadow);
    padding:14px;
    font-size: var(--ilaw-text-small);
    line-height:1.45;
    color:var(--ilaw-text-main);
    display:flex;
    flex-direction:column;
    gap:10px;
}
.ilaw-shell .ilaw-video-head {
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    gap:8px;
    font-weight:600;
}
.ilaw-shell .ilaw-video-length {
    font-size: .75rem;
    line-height:1.3;
    font-weight:500;
    color: var(--ilaw-text-dim);
    background:#f1f5f9;
    border:1px solid rgba(0,0,0,.05);
    border-radius: var(--ilaw-radius-md);
    padding:3px 6px;
}
.ilaw-shell .ilaw-video-frame {
    background:#000;
    border-radius: var(--ilaw-radius-md);
    border:1px solid rgba(0,0,0,.6);
    overflow:hidden;
    min-height:180px;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
}
.ilaw-shell .ilaw-video-frame video,
.ilaw-shell .ilaw-video-frame iframe {
    width:100%;
    height:100%;
    max-height:360px;
    border:0;
    object-fit:cover;
}
.ilaw-shell .ilaw-video-desc {
    color: var(--ilaw-text-dim);
    font-size: var(--ilaw-text-small);
    line-height:1.5;
    border-top:1px solid rgba(0,0,0,.07);
    padding-top:8px;
}

/* footer nav row in reader page */
.ilaw-shell .ilaw-footer-nav {
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px 16px;
    margin-top:16px;
    font-size: var(--ilaw-text-small);
    line-height:1.4;
    color: var(--ilaw-text-main);
}

.ilaw-shell .ilaw-footer-left,
.ilaw-shell .ilaw-footer-mid,
.ilaw-shell .ilaw-footer-right {
    display:flex;
    flex-wrap:wrap;
    align-items:flex-start;
    gap:8px 12px;
}

.sub .lni {
    position: relative;
    top: 3px;
}

/* generic subtle border box (reader main content, etc.) */
.ilaw-shell .ilaw-pane {
    background:#fff;
    border:1px solid var(--ilaw-surface-border);
    border-radius: var(--ilaw-radius-lg);
    box-shadow: var(--ilaw-card-shadow);
}

/* main content body in the Reader */
.ilaw-shell .ilaw-reader-main-pane-body {
    padding:16px 20px;
    font-size: var(--ilaw-text-body);
    line-height:1.7;
    color:var(--ilaw-text-main);
}
.ilaw-shell .ilaw-reader-main-pane-body p {
    margin:0 0 1em;
    line-height:1.7;
    font-size: var(--ilaw-text-body);
    color:var(--ilaw-text-main);
}

/* watermark overlay text */
.ilaw-shell .ilaw-watermark {
    position:fixed;
    right:12px;
    bottom:12px;
    background:rgba(0,0,0,.6);
    color:#fff;
    font-size:.7rem;
    line-height:1.4;
    padding:4px 6px;
    border-radius:4px;
    z-index:99999;
    pointer-events:none;
    opacity:.8;
    font-family:monospace;
}

/* Reader layout columns */
.ilaw-shell .ilaw-reader-layout {
    display:flex;
    flex-wrap:nowrap;
    align-items:flex-start;
    gap:16px;
}

/* left sidebar (TOC) */
.ilaw-shell .ilaw-reader-left {
    flex:0 0 260px;
    max-width:260px;
    min-width:220px;
}

@media (max-width:900px){
    .ilaw-shell .ilaw-reader-layout {
        flex-wrap:wrap;
    }
    .ilaw-shell .ilaw-reader-left {
        flex:0 0 100%;
        max-width:100%;
        order:2;
    }
    .ilaw-shell .ilaw-reader-main {
        order:1;
        flex:1 1 100%;
        max-width:100%;
    }
}

/* TOC card */
.ilaw-shell .ilaw-toc-card {
    background:#fff;
    border:1px solid var(--ilaw-surface-border);
    border-radius: var(--ilaw-radius-lg);
    box-shadow: var(--ilaw-card-shadow);
    padding:16px;
    font-size: var(--ilaw-text-small);
    color: var(--ilaw-text-main);
    line-height:1.5;
}

.ilaw-shell .ilaw-toc-headrow {
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    align-items:flex-start;
    gap:8px;
    margin-bottom:12px;
}
.ilaw-shell .ilaw-toc-left {
    display:flex;
    flex-direction:column;
    gap:4px;
}
.ilaw-shell .ilaw-toc-title {
    font-size: var(--ilaw-heading-md);
    font-weight:600;
    color: var(--ilaw-text-main);
    line-height:1.4;
    display:flex;
    gap:6px;
    align-items:center;
}
.ilaw-shell .ilaw-toc-meta {
    font-size: var(--ilaw-text-small);
    line-height:1.4;
    color:var(--ilaw-text-dim);
}

.ilaw-shell .ilaw-toc-actions {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
.ilaw-shell .ilaw-md-btn {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .15);
    margin: 3px 0;
    padding: 10px 10px;
    font-size: 0.8rem;
    line-height: 1.8;
    cursor: pointer;
    display: inline-flex
;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--ilaw-text-main);
    font-weight: 400;
}
.ilaw-shell .ilaw-md-btn i {
	font-size:1.3em;
}
.ilaw-shell .ilaw-md-btn:hover {
    background:#f8fafc;
}
.ilaw-shell .ilaw-small-btn {
    background:#fff;
    border:1px solid rgba(15,23,42,.15);
    border-radius: var(--ilaw-radius-md);
    padding:6px 8px;
    font-size:.75rem;
    line-height:1.3;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap:6px;
    text-decoration:none;
    color:var(--ilaw-text-main);
    font-weight:500;
}
.ilaw-shell .ilaw-small-btn:hover {
    background:#f8fafc;
}

/* Category group in TOC */
.ilaw-shell .ilaw-toc-group {
    margin-bottom:16px;
}
.ilaw-shell .ilaw-toc-group-title {
    font-weight:600;
    color:var(--ilaw-text-main);
    font-size: var(--ilaw-text-small);
    line-height:1.4;
    margin-bottom:6px;
}
.ilaw-shell .ilaw-toc-pages {
    display:flex;
    flex-direction:column;
    gap:10px;
}
.ilaw-shell .ilaw-toc-page-link {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: var(--ilaw-radius-md);
    padding: 10px 15px;
    font-size: var(--ilaw-text-small);
    line-height: 1.6;
    text-decoration: none;
    color: var(--ilaw-text-main);
}
.ilaw-shell .ilaw-toc-page-link.is-active,
.ilaw-shell .ilaw-toc-page-link:hover {
    background:#eef2ff;
    border-color:#6366f1;
    color:#312e81;
}

/* Reader main column */
.ilaw-shell .ilaw-reader-main {
    flex:1 1 auto;
    min-width:280px;
    display:flex;
    flex-direction:column;
    gap:16px;
}

/* top util row inside reader main */
.ilaw-shell .ilaw-reader-toolbar {
    display:flex;
    flex-wrap:wrap;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px 16px;
    font-size: var(--ilaw-text-small);
    line-height:1.4;
    color: var(--ilaw-text-main);
}

.ilaw-shell .ilaw-reader-toolbar-left {
    font-weight:600;
    line-height:1.4;
}
.ilaw-shell .ilaw-reader-toolbar-right {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
}

/* Progress bar */
.ilaw-shell .ilaw-progress-wrap {
    width:100%;
    background:#fff;
    border:1px solid var(--ilaw-surface-border);
    border-radius: var(--ilaw-radius-md);
    box-shadow: var(--ilaw-card-shadow);
    padding:8px 10px;
    font-size: var(--ilaw-text-small);
    line-height:1.4;
    color:var(--ilaw-text-main);
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:12px;
}
.ilaw-shell .ilaw-progress-bar-outer {
    flex:1 1 140px;
    background:#e2e8f0;
    height:4px;
    border-radius:999px;
    overflow:hidden;
}
.ilaw-shell .ilaw-progress-bar-inner {
    height:100%;
    width:0%;
    background: linear-gradient(90deg,var(--ilaw-brand-start) 0%,var(--ilaw-brand-end) 100%);
    box-shadow:0 0 8px var(--ilaw-brand-end);
}

/* hidden helper class */
.ilaw-shell .is-hidden {
    display:none !important;
}
