/* $Id$ */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: var(--app-body-padding, 40px 20px);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root{
    --card-gap: 22px;   /* normal spacing between blocks */
}
html.is-compact,
html.is-compact-preview{
    --card-gap: 12px;   /* compact spacing */
}

.card-container {
    max-width: 1600px;   /* or even 1800px – try it */
    margin: 0 auto;
    padding: 0 1rem;
}

.header-card {
    /* background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%); */
    background: #87143D;
    color: white;
    border-radius: 16px 16px 0 0;
    /* padding: 2.5rem 2rem; */
    padding: 0.75rem 1rem !important;   /* was likely ~1.5–2rem */
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.header-card h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.content-card {
    background: white;
    border-radius: 0 0 16px 16px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: var(--card-gap) 0 calc(var(--card-gap) * 1.4);
}

.calendar-btn, .home-btn, .initial-btn {
    padding: 0.9rem 1.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}


.calendar-btn {
    background: linear-gradient(135deg, #28a745, #198754);
    border: none;
    color: #dddddd;
}

.calendar-btn:hover {
    background: linear-gradient(135deg, #218838, #157347);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(40,167,69,0.4);
    color: white;
}

.home-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    border: none;
    color: #dddddd;
}

.home-btn:hover {
    background: linear-gradient(135deg, #5c636a, #495057);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(108,117,125,0.4);
    color: white;
}

/* Force initials toggle to look like the other pill buttons, but primary */
.action-buttons a.initial-btn.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0.9rem 1.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;

    background: linear-gradient(135deg, var(--bs-primary), #0b5ed7);
    border: none;

    color: #dddddd !important;
    text-decoration: none;

    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.action-buttons a.initial-btn.btn:hover,
.action-buttons a.initial-btn.btn:focus {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(13,110,253,0.40);
    color: white !important;
    text-decoration: none;
}

.jp-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.jp-card h5 {
    margin-bottom: 1rem;
    color: #343a40;
}

#jpSelect {
    font-size: 1.1rem;
    padding: 0.75rem;
}

#jpScheduleList {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

#jpSchedule {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

#jpSchedule li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    font-size: 1.05rem;
}

#jpSchedule li span {
    padding-left: 1.5rem; /* padding before the date/session text */
}

#jpSchedule li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    font-size: 1.05rem;
}

#jpSchedule li i {
    margin-left: auto; /* push icon to the right */
    padding-right: 1rem; /* padding after the tick icon */
	    /* margin-left: 10px; */
}

#jpSchedule li:last-child {
	    /* border-bottom: none; */
    border-bottom: 1px solid #eee;
}

.generate-for-jp {
    margin-top: 1.5rem;
    text-align: center;
}

.generate-for-jp .btn {
    font-size: 1rem;
    padding: 0.6rem 1.5rem;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.table {
    width: max-content;
    min-width: 100%;
    margin-bottom: 0;
}

.table th, .table td {
    padding: 12px 14px;
    border: 1px solid #dee2e6;
    text-align: center !important;
    vertical-align: middle;
    font-weight: 600;
    font-size: 0.98rem;
    white-space: nowrap;
}

.row-header {
    background-color: #f1f3f5 !important;
    font-weight: 700 !important;
    text-align: left !important;
    white-space: nowrap;
    min-width: 160px;
    position: sticky;
    left: 0;
    z-index: 3;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.title-row {
    position: sticky;
    top: 0;
    z-index: 4;
    background: linear-gradient(135deg, #343a40, #212529) !important;
    color: white !important;
    font-size: 1.8rem !important;
    font-weight: bold !important;
    padding: 1.5rem !important;
    text-align: center !important;
    width: 100%;
    min-width: 100%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.day-header {
    background-color: #e9ecef !important;
    font-size: 1.15rem !important;
    text-align: center !important;
}

.day-tue { background-color: #538235 !important; color: white; }
.day-wed { background-color: #FFAC24 !important; color: #212529; }
.day-thu { background-color: #305496 !important; color: white; }

.date-tue { background-color: #538235 !important; color: white; }
.date-wed { background-color: #FFAC24 !important; color: #212529; }
.date-thu { background-color: #305496 !important; color: white; }

.am-tue { background-color: #E2EFDA !important; color: black; }
.am-wed { background-color: #FFF2CC !important; color: black; }
.am-thu { background-color: #D7DFEF !important; color: black; }

.pm-tue { background-color: #A9D08E !important; color: black !important; }
.pm-wed { background-color: #FFD966 !important; color: black !important; }
.pm-thu { background-color: #859ECD !important; color: black !important; }

.notes-row td.has-content {
    background-color: #000 !important;
    color: #ffffff !important;
    font-style: italic;
}

.notes-row td:not(.has-content) {
    background-color: transparent !important;
    color: inherit !important;
}

.holiday-column {
    background-color: #FF2C14 !important;
    color: #ffffff !important;
}

.table tbody tr:hover {
    background-color: rgba(13,110,253,0.1) !important;
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.site-footer-rcs {
    font-size: 0.75rem;          /* small */
    color: #6c757d;
    text-align: center;
    line-height: 1.4;
    padding: 0.25rem 0;
    user-select: none;           /* optional: feels more "footer-like" */
}

.admin-fab{
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 1100;

  border: 1px solid rgba(127,127,127,.35);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  box-shadow: 0 8px 20px rgba(0,0,0,.22);
  opacity: .55;
  transition: opacity .12s ease, transform .12s ease;
}

.admin-fab:hover{
  opacity: .95;
  transform: translateY(-1px);
  color: rgba(255,255,255,.95);
}

.admin-fab:focus{
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(108,117,125,.25), 0 8px 20px rgba(0,0,0,.22);
}

.admin-fab i{
  font-size: 18px;
  line-height: 1;
}

[data-bs-theme="dark"] .site-footer-rcs {
    color: #6c757d;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

[data-bs-theme="dark"] body {
    background: linear-gradient(135deg, #1e1e2f 0%, #2a2a4a 100%);
    color: #e0e0ff;
}

[data-bs-theme="dark"] .content-card {
    background: #2a2a4a;
    color: #e0e0ff;
}

[data-bs-theme="dark"] .jp-card {
    background: #343a5a;
}

[data-bs-theme="dark"] .jp-card h5 {
    color: #e0e0ff;
}

[data-bs-theme="dark"] #jpScheduleList {
    background: #2c2c4e;
    border-color: #444;
}

[data-bs-theme="dark"] .row-header {
    background-color: #3a3a5a !important;
}

[data-bs-theme="dark"] .day-header {
    background-color: #444 !important;
}

[data-bs-theme="dark"] .holiday-column {
    background-color: #a71d2a !important;
}

[data-bs-theme="dark"] .table th,
[data-bs-theme="dark"] .table td {
    border-color: #555;
}

/**
 * compact mode CSS
 */

/* Floating compact toggle */
.compact-fab{
  position: fixed;
  left: 14px;
  bottom: 64px; /* sits above the admin shield */
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;

  border: 1px solid rgba(127,127,127,.35);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(0,0,0,.22);
  opacity: .55;
  transition: opacity .12s ease, transform .12s ease;
}

.compact-fab:hover{ opacity: .95; transform: translateY(-1px); }

.compact-fab:active{
  transform: translateY(-1px) scale(0.98);
  opacity: .95;
}

/* Compact mode overrides (force win over inline <style> in header) */
html.is-compact body,
html.is-compact-preview body{
  padding: 14px 10px !important;
}

.is-compact .header-card,
.is-compact-preview .header-card{
  padding: 1.25rem 1.25rem;  /* reduce header space */
}

.is-compact .content-card,
.is-compact-preview .content-card{
  padding: 1rem; /* reduce card padding */
}

.is-compact .table td,
.is-compact .table th,
.is-compact-preview .table td,
.is-compact-preview .table th{
  padding: .35rem .5rem;
}

.is-compact .btn,
.is-compact-preview .btn{
  padding: .25rem .5rem;
  font-size: .9rem;
}

.tile {
    border-radius: 12px;
}

html.is-compact .card-container,
html.is-compact-preview .card-container{
  max-width: 1600px !important; /* optional: allow wider on desktop */
}

html.is-compact .header-card,
html.is-compact-preview .header-card{
  padding: 1.25rem 1.25rem !important;
}

html.is-compact .header-card h1,
html.is-compact-preview .header-card h1{
  font-size: 1.5rem !important;   /* obvious change */
  margin-bottom: .25rem !important;
}

.header-card .lead {
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

html.is-compact .content-card,
html.is-compact-preview .content-card{
  padding: 1rem !important;
}

html.is-compact .table td,
html.is-compact .table th,
html.is-compact-preview .table td,
html.is-compact-preview .table th{
  padding: .30rem .45rem !important;
}

html.is-compact .btn,
html.is-compact-preview .btn{
  padding: .22rem .5rem !important;
  font-size: .9rem !important;
}

/* Compact mode override for title row */
html.is-compact .title-row,
html.is-compact-preview .title-row {
    font-size: 1.25rem !important;   /* adjust to taste */
    padding: 0.75rem 1rem !important;
}

body { margin: 0; }

.card-container {
    margin-top: 0 !important;
    padding-top: 0.3rem;
}

.header-card {
    padding: 0.5rem 1rem !important;
}
/**
 * END of compact mode CSS
 */


/* JP Library grouped separators */
.library-separator {
    --separator-line: rgba(135, 20, 61, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.25rem 0 0.75rem;
    text-align: center;
}

.library-separator::before,
.library-separator::after {
    content: "";
    flex: 1 1 auto;
    border-top: 1px solid var(--separator-line);
    margin: 0 0.75rem;
}

.library-separator span {
    display: inline-block;
    padding: 0.2rem 0.85rem;
    border-radius: 999px;
    background: #87143D;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    letter-spacing: 0.04em;
}

/* JP Library layout tuning */
.card-container {
    max-width: 1400px;
    margin: 0.5rem auto 1rem;
    padding: 0;
}

.header-card {
    margin-bottom: 0;
}

.content-card {
    background: #ffffff;
    border-radius: 0 0 16px 16px;
    padding: 1.25rem 1.5rem 1.5rem;
    box-shadow: 0 10px 24px rgba(0,0,0,0.10);
}

/* Existing styles remain... keep your header, dark mode, compact mode, etc. */

/* Enhanced card styling */
.card {
    border-radius: 1.25rem;          /* softer corners */
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.28s ease;
    background: white;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.12) !important;
}

/* Larger, bolder titles */
.card-title {
    font-size: 1.32rem;
    font-weight: 700;
    margin-bottom: 1.125rem;
    line-height: 1.3;
}

/* Doc type badge - more modern pill look */
.doc-type-inline {
    font-size: 0.95rem;
    background: #f1f5f9;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

/* Action buttons row */
.d-flex.gap-2.flex-wrap {
    margin-top: 1.25rem;
    justify-content: flex-start;
}

/* === New: Staggered card entrance animation === */
.fade-in-card {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeInUp 0.65s forwards ease-out;
}

/* Stagger delays - adjust number based on how many cards you typically have */
.row.g-4 > div:nth-child(1)  { animation-delay: 0.08s; }
.row.g-4 > div:nth-child(2)  { animation-delay: 0.16s; }
.row.g-4 > div:nth-child(3)  { animation-delay: 0.24s; }
.row.g-4 > div:nth-child(4)  { animation-delay: 0.32s; }
.row.g-4 > div:nth-child(5)  { animation-delay: 0.40s; }
.row.g-4 > div:nth-child(6)  { animation-delay: 0.48s; }
.row.g-4 > div:nth-child(7)  { animation-delay: 0.56s; }
.row.g-4 > div:nth-child(8)  { animation-delay: 0.64s; }
.row.g-4 > div:nth-child(9)  { animation-delay: 0.72s; }
.row.g-4 > div:nth-child(10) { animation-delay: 0.80s; }
.row.g-4 > div:nth-child(11) { animation-delay: 0.88s; }
.row.g-4 > div:nth-child(12) { animation-delay: 0.96s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Optional: make separators more elegant */
.library-separator {
    margin: 2.5rem 0 1.75rem;
}

.library-separator span {
    padding: 0.35rem 1.25rem;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}
