/* Debug stylesheets */
td.debugheader
{
	background-color : #eeeeee;
	border-top : 1px solid #444488;
	border-bottom : 1px solid #444488;
	font-size : 0.9em;
	font-family: Arial, Helvetica, sans-serif;
}

pre.debugtransaction
{
	background-color : #f8f6d8;
}

p.comment /* Class to be used during development for quick comments that someone should notice easily */
{
    background-color: #ffff00;
    font-weight: bold;
    padding: 4px;
    margin: 4px;
    border: 2px dashed;
    display: block; /* Set this attribute to "none" to hide the comments */
}

/* eZSetup stuff */
td.ezsetup_header
{
	background-color : #eeeeee;
	border-top : 1px solid #444488;
	border-bottom : 1px solid #444488;
	font-size : 120%;
	font-family: Arial, Helvetica, sans-serif;
}

td.ezsetup_req
{
	font-size : 80%;
	font-family: Arial, Helvetica, sans-serif;
}

.ezsetup_critical
{
	background-color : #eeeeee;
	border-top : 1px solid #444488;
	border-bottom : 1px solid #444488;
	font-size : 120%;
	font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
	color: #FF0000;
}

.ezsetup_uncritical
{
	background-color : #eeeeee;
	border-top : 1px solid #444488;
	border-bottom : 1px solid #444488;
	font-size : 120%;
	font-family: Arial, Helvetica, sans-serif;
	color: #E2A31D;
}

.ezsetup_pass
{
	background-color : #eeeeee;
	border-top : 1px solid #444488;
	border-bottom : 1px solid #444488;
	font-size : 120%;
	font-family: Arial, Helvetica, sans-serif;
	color: #00B500;
}

div.debug-toolbar label
{
    font-weight: normal;
}

/* used templates statistics */
#debug
{
    text-align: left;
    border-top: 1px dashed black;
    padding: 0.3em;
    background-color: #fff;
}

#debug table
{
    border-collapse: collapse;
	/* width:100; */
}
/* @media screen and (max-width: 1119px) {


} */


#timingpoints, #timeaccumulators, #debug_resources, #debug_includes, #debug table.debug_resource_usage
{
    border: 1px dashed black;
}

#debug table tr.group td
{
    padding-top: 0.7em;
    font-size: 0.95em;
}

#debug table tr.group td:first-child
{
    padding-left: 0.2em;
    font-size: 1em;
}

#debug table tr.data td
{
    background-color: #ffffff;
    border-top: 1px solid #444488;
    border-bottom: 1px solid #444488;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95em;
}

#debug table tr.data:nth-child(odd) td {  background-color: #eeeeee; }

#debug table + h2, #debug table + h3
{
    margin-top: 1em;
}

#debug table.debug_resource_usage th + th, #debug table.debug_resource_usage td + td, table#timeaccumulators th + th, table#timeaccumulators td + td, table#timingpoints th + th, table#timingpoints td + td, table#debug_resources td, table#debug_includes td
{
	padding: 0.25em 0.5em 0.25em 0.5em;
}

#debug th
{
    text-align: left;
}

/* style info tags (that have more info when hovering) */
#debug span.debuginfo:after
{
	border: 2px solid #23a4f5;
	border-radius: 10px;
	color: #23a4f5;
	height: 10px;
	width: 10px;
	line-height: 10px;
	font-size: 10px;
	content: "i";
	margin-left: 5px;
	padding: 0 5px 0 5px;
	opacity: 0.6;
}

#debug span.debuginfo:hover:after { opacity: 1; }

/* center 1st and two last columns of template usage output */
#templateusage tr.data td:first-child, #templateusage tr.data td:nth-child(n+5) { 
	text-align: center; 
	/* width:100px; */
}

/* heading colors for misc notices/warnings... */
#debug tr.notice  td.debugheader span { color: green; }
#debug tr.warning td.debugheader span { color: orange; }
#debug tr.error   td.debugheader span { color: red; }
#debug tr.debug   td.debugheader span { color: brown; }
#debug tr.timing  td.debugheader span { color: blue; }
#debug tr.strict  td.debugheader span { color: purple; }

/* ============ DEBUG CONTENT ============ */
#debug {
  overflow: auto;
}

#debug * {
  word-break: break-all;
  /* white-space: pre-wrap; */
}

/* ========================= July 02, 2025 ========================= */

/* eZ Debug Accordion container */
  #debug {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: Arial, sans-serif;
  }

  /* Accordion header */
  #debug h2 a {
    background-color: #f2f2f2;
    cursor: pointer;
    padding: 15px;
    font-size: 16px;
    border-bottom: 1px solid #ccc;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* Icon for open/close */
  #debug h2 a::after {
    content: '\25BC'; /* Down arrow */
    font-size: 12px;
    transition: transform 0.3s ease;
  }

  /* Rotate arrow when active */
  #debug h2 a.active::after {
    transform: rotate(180deg);
  }

  /* Accordion content */
  #debug-details {
    max-height: 0;
    overflow: hidden;
    padding: 0 15px;
    transition: max-height 0.3s ease;
    background-color: #fff;
  }

  /* When active, set max-height to something large enough */
  #debug-details.active {
    padding: 15px;
    max-height: 100%;
    /* Adjust if content is larger */
  }

  #debug #templateusage > tbody > tr > th {
    font-size: smaller;
  }

/*
  #debug div#debug-details.active div#time-accumulators {
    display: none;
  }

  #debug div#debug-details.active div#timing-points {
    display: none;
  }

  #debug div#debug-details.active div.table-responsive table#main-debug-table tbody tr td div.block.debug-toolbar {
    display: none;
  }
*/

/* ========================= July 02, 2025 ========================= */


/* ============ DEBUG CONTENT ============ */

/* ============ The classic report's pinned bar ============
   The classic HTML report (eZDebug::printReportInternal(), used when the Exp Debug bar is not there) prints no
   inline CSS; these rules were a <style> block after the report until #450. The bar stays at the bottom of the
   window and the details open as a panel above it that scrolls on its own. Scoped to the classic markup
   (#debug without data-exp-debug-bar): the Exp Debug bar has its own stylesheet, expdebugbar.css, and its own
   copy of these tokens. The bar follows the colour scheme; the panel keeps its light rows (the classic table
   rules above) in both schemes, so its two tokens have the same value in dark mode. */
#debug:not([data-exp-debug-bar]) {
  --xd-bg-bar: #f2f2f2;
  --xd-fg-bar: #1d1f23;
  --xd-bg: #ffffff;
  --xd-fg: #1d1f23;
  --xd-line-strong: #8f95a3;
  --xd-shadow: rgba(0, 0, 0, .15);
  --xd-shadow-strong: rgba(0, 0, 0, .2);
  margin-bottom: 0;
}
@media (prefers-color-scheme: dark) {
  #debug:not([data-exp-debug-bar]) {
    --xd-bg-bar: #2a2a2a; --xd-fg-bar: #e8eaed; --xd-bg: #ffffff; --xd-fg: #1d1f23; --xd-line-strong: #6b717c;
    --xd-shadow: rgba(0, 0, 0, .5); --xd-shadow-strong: rgba(0, 0, 0, .6);
  }
}
html[data-a4-theme="dark"] #debug:not([data-exp-debug-bar]) {
  --xd-bg-bar: #2a2a2a; --xd-fg-bar: #e8eaed; --xd-bg: #ffffff; --xd-fg: #1d1f23; --xd-line-strong: #6b717c;
  --xd-shadow: rgba(0, 0, 0, .5); --xd-shadow-strong: rgba(0, 0, 0, .6);
}
#debug:not([data-exp-debug-bar]) > h2 {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483000; margin: 0;
  display: flex; align-items: center; background: var(--xd-bg-bar); border-top: 1px solid var(--xd-line-strong);
  box-shadow: 0 -2px 6px var(--xd-shadow); font-size: 14px;
}
#debug:not([data-exp-debug-bar]) > h2 > a { flex: 1; padding: 8px 12px; color: var(--xd-fg-bar); background: transparent; text-decoration: none; }
#debug:not([data-exp-debug-bar]) > h2 > label.debug-keep-open {
  margin-left: 1em; margin-right: 12px; color: var(--xd-fg-bar); font-size: 12px; font-weight: normal; cursor: pointer; white-space: nowrap;
}
#debug:not([data-exp-debug-bar]) > #debug-details.active {
  position: fixed; left: 0; right: 0; bottom: 38px; z-index: 2147482999;
  height: 60vh; overflow: auto; background: var(--xd-bg); color: var(--xd-fg); border-top: 2px solid var(--xd-line-strong);
  box-shadow: 0 -4px 12px var(--xd-shadow-strong); box-sizing: border-box;
}
body.exp-debug-bar { padding-bottom: 46px; }

/* the report's tables: figures right aligned in equal digits; group rows and summaries by class, not <b>/<i> */
#debug td.num, #debug td.debugtime { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#debug td.debuglabel, #debug tr.group td.groupname, #debug tr.summary td, #debug p.debugreporttime { font-weight: bold; }
#debug tr.group td.num { font-style: italic; }
