/* Grid */
.rl-reports-grid{ display:grid; grid-template-columns: repeat(var(--rl-columns, 2), 1fr); gap:24px; }
@media (min-width: 1200px){ .rl-reports-grid{ grid-template-columns: repeat(var(--rl-columns-lg, 3), 1fr); } }
@media (max-width: 900px){ .rl-reports-grid{ grid-template-columns: 1fr; } }

/* Card */
.rl-card{ display:flex; gap:0; flex-direction: row; overflow:hidden; background: var(--rl-card-bg,#fff); border-radius: var(--rl-radius,15px); border: var(--rl-card-border-w,1px) solid var(--rl-card-border,#e8e8ef); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.rl-card-left{ width:38%; min-width:240px; position:relative; background:#f6f7fb; display:flex; align-items:stretch; justify-content:center; }
.rl-card-left .rl-cover-wrap{ position:relative; width:100%; height:100%; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.rl-card-left img{ width:100%; height:100%; object-fit:contain; display:block; }
.rl-category-badge{ position:absolute; top:12px; left:12px; background: var(--rl-primary,#2d387e); color:#fff; padding:6px 10px; border-radius:999px; font-size:12px; line-height:1; }
.rl-card-right{ width:62%; padding:18px 20px; display:flex; flex-direction:column; gap:8px; }
.rl-title{ margin:0 0 6px 0; color: var(--rl-title-color,#111); font-size: var(--rl-title-size,20px); font-weight: var(--rl-title-weight,700); line-height:1.3; }
.rl-year{ font-weight:600; color: var(--rl-year-color,#2d387e); margin-bottom:8px; }
.rl-excerpt{ color:#333; font-size: var(--rl-excerpt-size,14px); font-weight: var(--rl-excerpt-weight,400); line-height:1.7; margin-bottom:10px; }
.clamp-3{ display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient: vertical; overflow:hidden; }
.sticky-actions{ margin-top:auto; padding-top:10px; }
.rl-actions .rl-btn{ display:inline-block; margin-inline-end:8px; }

/* Buttons */
.rl-btn{ display:inline-block; padding:10px 16px; background: var(--rl-primary,#2d387e); color: var(--rl-btn-text,#fff) !important; border-radius:10px; text-decoration:none; transition: transform .08s ease, background .15s ease, color .15s ease; }
.rl-btn:hover{ transform: translateY(-1px); background: var(--rl-btn-hover-bg,#243067); color: var(--rl-btn-hover-text,#fff) !important; }
.rl-btn.rl-secondary{ background: var(--rl-btn2-bg,#444); color: var(--rl-btn2-text,#fff) !important; }
.rl-btn.rl-secondary:hover{ background: var(--rl-btn2-hover-bg,#2b2b2b); color: var(--rl-btn2-hover-text,#fff) !important; }

/* Filters */
.rl-filters{ display:flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap:12px; margin:10px 0 20px; padding:12px; background:#fafafa; border-radius:12px; border:1px solid var(--rl-filter-divider,#e6e6ee); }
.rl-filter-group{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.rl-filter-label{ font-size:12px; color:#444; margin-inline-end:6px; }
.rl-search-input{ min-width:200px; padding:8px 10px; border:1px solid #ddd; border-radius:8px; }

/* Chips */
.rl-filters.rl-chips .rl-chip{ background:#f0f2fa; border:1px solid #e6e6ee; color:#333; padding:6px 14px; border-radius:10px; cursor:pointer; }
.rl-filters.rl-chips .rl-chip.active{ background: var(--rl-primary,#2d387e); color:#fff; border-color: var(--rl-primary,#2d387e); }

/* Badges */
.rl-filters.rl-badges .rl-chip{ background:#e0e0e0; color:#333; padding:6px 12px; border-radius:999px; cursor:pointer; border:1px solid transparent; }
.rl-filters.rl-badges .rl-chip.active{ background: var(--rl-primary,#2d387e); color:#fff; }

/* Dropdowns */
.rl-filters.rl-dropdowns .rl-filter-group select{ min-width:180px; padding:6px 10px; border:1px solid #ddd; border-radius:8px; background:#fff; }
.rl-filters.rl-dropdowns .rl-filter-group select[multiple]{ min-width:220px; }

/* Load more */
.rl-loadmore-wrap{ text-align:center; margin-top:16px; }

/* Modal */
.rl-modal{ position:fixed; inset:0; display:none; z-index:9999; }
.rl-modal[aria-hidden="false"]{ display:block; }
.rl-modal-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,.6); }
.rl-modal-dialog{ position:relative; margin:40px auto; background:#fff; width:min(95vw, 1000px); height:85vh; border-radius:12px; overflow:hidden; display:flex; flex-direction:column; }
.rl-modal-bar{ padding:10px; display:flex; gap:8px; border-bottom:1px solid #eee; background:#fafafa; }
.rl-modal-frame{ width:100%; height:100%; border:0; }

/* Single improved */
.rl-single{ display:grid; grid-template-columns: 32% 1fr; gap:24px; align-items:start; margin:30px 0; background: var(--rl-card-bg,#fff); border-radius: var(--rl-radius,15px); border: var(--rl-card-border-w,1px) solid var(--rl-card-border,#e8e8ef); box-shadow: 0 4px 14px rgba(0,0,0,.06); padding: 22px; }
.rl-single-left .rl-cover-wrap{ position:relative; }
.rl-single-left img{ width:100%; height:auto; object-fit:contain; }
.rl-single-right .rl-title{ font-size: calc(var(--rl-title-size,20px) + 6px); margin-bottom:8px; }
.rl-meta{ list-style:none; padding:0; margin:8px 0 14px; display:flex; flex-wrap:wrap; gap:12px 20px; }
.rl-meta li{ background:#f6f7fb; border:1px solid #eee; border-radius:8px; padding:6px 10px; }
.rl-single-right .rl-excerpt{ margin-top:6px; }
@media (max-width: 900px){ .rl-single{ grid-template-columns: 1fr; } }

/* v1.5.1 — RTL layout fixes: keep image left, info right */
html[dir="rtl"] .rl-card,
html[dir="rtl"] .rl-single{ direction:ltr; }
html[dir="rtl"] .rl-card-right,
html[dir="rtl"] .rl-single-right{ direction:rtl; text-align:right; }
html[dir="rtl"] .rl-meta{ direction:rtl; }

/* v1.5.1 — Horizontal filters polish */
.rl-filters{ gap:12px 16px; }
.rl-filters .rl-filter-group{ align-items:center; }
@media (max-width: 700px){
  .rl-filters{ gap:10px; }
}

/* v1.5.1 — Breadcrumbs */
.rl-breadcrumbs{ margin:10px 0 16px; font-size:13px; color:#666; }
.rl-breadcrumbs a{ color: var(--rl-primary,#2d387e); text-decoration:none; }
.rl-breadcrumbs .sep{ opacity:.6; margin:0 6px; }
.rl-breadcrumbs #breadcrumbs{ margin:0; }

/* v1.5.2 — Dropdown filters (beautified & responsive) */
.rl-filters.rl-dropdowns { padding:12px 14px; background:#fff; border:1px solid var(--rl-filter-divider,#e6e6ee); border-radius:12px; }
.rl-filters.rl-dropdowns .rl-filter-group { flex: 1 1 220px; min-width: 220px; display:flex; gap:8px; align-items:center; }
.rl-filters.rl-dropdowns .rl-filter-label { flex: 0 0 auto; font-weight:600; color:#333; }
.rl-filters.rl-dropdowns .rl-filter-group select,
.rl-filters.rl-dropdowns .rl-search-input { flex: 1 1 auto; width:100%; padding:8px 10px; border:1px solid #d9dbe7; border-radius:10px; background:#fafbff; }
.rl-filters.rl-dropdowns .rl-actions-inline { flex: 1 1 160px; display:flex; justify-content:flex-start; }
@media (max-width: 900px){
  .rl-filters.rl-dropdowns .rl-filter-group { min-width: 100%; }
}

/* v1.5.2 — Card actions pinned to bottom */
.rl-card-right { display:flex; flex-direction:column; }
.rl-card-right .rl-actions { margin-top:auto; display:flex; gap:8px; flex-wrap:wrap; }
.rl-card-right .rl-actions .rl-btn { white-space:nowrap; }

/* v1.5.3 — Tertiary button style */

.rl-btn.rl-tertiary:hover{ background: var(--rl-primary,#2d387e); color:#fff; }


/* v1.5.4 — Align single page actions to bottom */
.rl-single-right{ display:flex; flex-direction:column; }
.rl-single-right .rl-actions{ margin-top:auto; display:flex; gap:8px; flex-wrap:wrap; }


/* v1.5.4 — Dropdown filters improved */
.rl-filters{ display:flex; flex-direction: row; flex-wrap: wrap; align-items:center; gap:12px 16px; }
.rl-filters.rl-dropdowns{ padding:12px 14px; background:#fff; border:1px solid var(--rl-filter-divider,#e6e6ee); border-radius:12px; }
.rl-filters.rl-dropdowns .rl-filter-group{ flex:1 1 240px; min-width:240px; display:flex; gap:8px; align-items:center; }
.rl-filters.rl-dropdowns .rl-filter-label{ flex:0 0 auto; font-weight:600; color:#333; }
.rl-filters.rl-dropdowns .rl-filter-group select,
.rl-filters.rl-dropdowns .rl-search-input{ flex:1 1 auto; width:100%; padding:8px 10px; border:1px solid #d9dbe7; border-radius:10px; background:#fafbff; }
@media (max-width: 900px){
  .rl-filters.rl-dropdowns .rl-filter-group{ min-width:100%; }
}

/* v1.5.5 — More button colors */
.rl-btn.rl-tertiary{ 
  background: var(--rl-more-bg, #e9edf8);
  color: var(--rl-more-text, #2d387e);
  border: 1px solid transparent;
}
.rl-btn.rl-tertiary:hover{
  background: var(--rl-more-hover-bg, #2d387e);
  color: var(--rl-more-hover-text, #ffffff);
}
/* Hide labels toggle */
.rl-filters.hide-labels .rl-filter-label{ display:none; }


/* v1.5.9 — Dropdown filters: single row with compact widths */
.rl-filters.rl-dropdowns{
  display:flex; flex-wrap:nowrap; align-items:center; gap:10px 12px;
  overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:6px;
}
.rl-filters.rl-dropdowns .rl-filter-group{
  flex:0 0 auto; min-width:160px; max-width:220px;
}
.rl-filters.rl-dropdowns .rl-filter-group.rl-search{ min-width:220px; max-width:280px; }
.rl-filters.rl-dropdowns .rl-filter-group select,
.rl-filters.rl-dropdowns .rl-search-input{
  width:100%; padding:8px 10px; border:1px solid #d9dbe7; border-radius:10px; background:#fafbff;
}
/* Hide labels if disabled from settings */
.rl-filters.hide-labels .rl-filter-label{ display:none; }


/* v1.5.10 — Dropdown topics unify + search label above input */
.rl-filters.rl-dropdowns .rl-filter-group.rl-search{
  display:flex;
  flex-direction:column;
  align-items:stretch;
}
.rl-filters.rl-dropdowns .rl-filter-group.rl-search .rl-filter-label{
  margin-bottom:6px;
  font-weight:600;
}
