@media print {
	#view-issue-page .bugnote .btn { display: none; }
	#view-issue-page .bugnote .btn-sm { display: none; }
	.noprint { display: none; }
}

span.print { font-size: 8pt; }
span.required 		{ font-size: 8pt; color: #bb0000; }

td.category, th.category,
td.category label, th.category label
{
    background-color: #edf3f4 !important;
    color: #000000;
    font-weight: bold;
    vertical-align : top;
}
td.category .small, th.category .small	{ font-weight: normal;  }

.small-caption	{
    border: 1px solid #fff;
    font-size: 8pt;
    padding: 0 5px;
}
tr.spacer			{ background-color: #ffffff !important; color: #000000; height: 5px; }

/* Issue Summary at bug_report_page.php, bug_update_page.php */
input[type="text"]#summary { width: 100%; }

/**
 * view_all_bug_page.php
 */
#buglist td, #buglist th	{ text-align: center; }
#buglist .column-summary,
#buglist .column-description,
#buglist .column-notes,
#buglist .column-steps-to-reproduce,
#buglist .column-additional-information,
#buglist .cftype-string,
#buglist .cftype-textarea
	{ text-align: left; }

.sticky-separator,
.test-langs th
	{ background-color: lightgrey; }

/* manage_plugin_page.php */
span.dependency_dated		{ color: maroon; }
span.dependency_met			{ color: green; }
span.dependency_unmet		{ color: red; }
span.dependency_upgrade		{ color: orange; }

tr.bugnote, div.widget-box, a#attachments, .test-langs tr {
	scroll-margin-top: 50px;
}
tr.bugnote .bugnote-note { background-color: #e8e8e8; color: #000000; width: 75%; vertical-align: top; }

.bugnote-private { background-color: #fcf8e3 !important;}

.nowrap
{
	white-space: nowrap;
}

.issue-status
{
	border-bottom: 1px dotted black;
}

.bug-attachments {
	margin: 0;
	padding: 0;
}

.bug-attachments > ul {
	list-style: none;
	margin: 0.5em;
	padding: 0;
}

.bug-attachments > ul > li {
	margin: 0.5em 0;
	padding: 0;
}

.bug-attachments > ul > li > div {
	margin: 0;
	padding: 0;
}

.bug-attachment-preview-text, .bug-attachment-preview-image {
	margin: 1em;
	padding: 1em;
}

.bug-attachment-preview-image img {
	max-width: 100%;
}

.bug-attachment-preview-text {
	white-space: pre-wrap;
}

#dates label[for=start_date], #dates > label[for=end_date] {
	float: left;
	width: 3em;
}

/* manage_config_* colors */
.color-global		{ background-color: LightBlue; }
.color-project		{ background-color: LightGreen; }

td.due-0, td.overdue { background-color: red; color: #ffffff; font-weight: bold; }
td.due-1             { background-color: darkorange; color: #ffffff; font-weight: bold; }
td.due-2             { background-color: green; color: #ffffff; font-weight: bold; }
td.print-overdue     { font-weight: bold; }

.collapse-link { cursor: pointer; }

.table-nonfluid {
   width: auto !important;
}

.login-logo {
	text-align: center;
}

/* strike-through resolved issues: #22492 */
.resolved  {
    text-decoration: line-through;
}

.error-details .code {
	font-family: monospace;
}

table.filters td.category {
	color: #337ab7;
}

.listjs-table .sort:after {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid transparent;
  content: "";
  position: relative;
  top: -10px;
  right: -5px;
}

.listjs-table .sort.desc:after {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #707070;
  content: "";
  position: relative;
  top: 4px;
  right: -5px;
}

.listjs-table .sort.asc:after {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #707070;
  content: "";
  position: relative;
  top: -4px;
  right: -5px;
}

.listjs-table .sort:hover {
	text-decoration: underline;
}

.test-langs ol.plugins-toc {
    column-count: auto;
    column-width: 130px;
    column-gap: 60px;
    margin: 10px 15px 10px 30px;
}

.editable_access_level {
    display: inline-grid;
    grid-template-columns: 1fr 20px 1fr;
}

#log-event-list .duplicate-query {
    color: #E2755F;
}

div.announcement {
    background-color: #5E4B19 !important;
    border: 1px solid #7a5900 !important;
    color: #e0e0e0 !important;
}


/* 1. Tabela komentarzy przestaje rozpychać się zawartością.
      Istniejące .bugnote-note { width: 75% } zacznie działać. */
#bugnotes table {
  table-layout: fixed;
  width: 100%;
}

@media (max-width: 767px) {
  #bugnotes .table-responsive { overflow-x: visible !important; }

  #bugnotes > .widget-body table,
  #bugnotes > .widget-body tbody,
  #bugnotes > .widget-body tr,
  #bugnotes > .widget-body td {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    table-layout: auto !important;
  }

  #bugnotes td.category > div.pull-left {
    float: none !important;
    display: inline-block;
    vertical-align: top;
    margin-right: 12px;
  }

  #bugnotes .bugnote-note,
  #bugnotes .bugnote-note * {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

#bugnotes .bugnote-note {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 2. Bloki kodu: własny scroll zamiast rozpychania tabeli */
.bugnote-note pre.bbcodeplus,
.bugnote-note pre {
  max-width: 100%;
  overflow-x: auto;
}

/* 3. Wąskie ekrany — kod się zawija.
      Musi łapać też <code>, bo Prism ustawia tam white-space: pre */
@media (max-width: 900px) {
  .bugnote-note pre,
  .bugnote-note pre.bbcodeplus,
  .bugnote-note pre code,
  .bugnote-note code.bbcodeplus,
  .bugnote-note code[class*="language-"] {
    white-space: pre-wrap !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    tab-size: 2;
  }
}

/* 4. Długie URL-e */
.bugnote-note a { overflow-wrap: anywhere; }


@media (max-width: 767px) {

  /* C. Tabela szczegółów zgłoszenia — źródło 985px */
  #view-issue-page .widget-main > .table-responsive > table.table-bordered,
  #view-issue-page .widget-main > .table-responsive > table.table-bordered tbody,
  #view-issue-page .widget-main > .table-responsive > table.table-bordered tr,
  #view-issue-page .widget-main > .table-responsive > table.table-bordered th,
  #view-issue-page .widget-main > .table-responsive > table.table-bordered td {
    display: block !important;
    width: auto !important;
  }

  #view-issue-page tr.bug-header { display: none !important; }

  #view-issue-page [class*="width-1"],
  #view-issue-page [class*="width-2"],
  #view-issue-page [class*="width-8"] { width: auto !important; }

  /* D. Pasek przycisków w tfoot (916px) */
  #view-issue-page tfoot .btn-group { display: block; }
  #view-issue-page tfoot .btn-group > div.pull-left {
    float: none !important;
    display: inline-block;
    margin-bottom: 6px;
  }
  #view-issue-page tfoot form,
  #view-issue-page tfoot select.input-sm { max-width: 100%; }

  /* E. 7px z ujemnych marginesów .row */
  .page-content > .row { margin-left: 0; margin-right: 0; }
}


@media (max-width: 767px) {
  #bugnotes .bugnote-note {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    max-width: 100% !important;
    overflow-x: hidden;
  }
}


@media (max-width: 767px) {
  /* my_view_page — widgety „Przypisane do mnie", „Nieprzypisane" itd. */
  .table-responsive:has(tr.my-buglist-bug) { overflow-x: visible; }

  table:has(tr.my-buglist-bug) {
    table-layout: fixed;
    width: 100% !important;
  }

  tr.my-buglist-bug td {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* kolumna z numerem — wąska i bez łamania */
  tr.my-buglist-bug td.my-buglist-id {
    width: 92px;
    white-space: nowrap !important;
  }
}


@media (max-width: 767px) {

  /* Nagłówek 6-kolumnowy: chowamy, etykiety wracają przy wartościach */
  #view-issue-page .widget-main > .table-responsive > table.table-bordered tr.bug-header {
    display: none !important;
  }

  #view-issue-page tr.bug-header-data td:empty { display: none !important; }

  #view-issue-page tr.bug-header-data td::before {
    font-weight: bold;
    margin-right: .4em;
  }
  #view-issue-page tr.bug-header-data td.bug-id::before            { content: "Identyfikator:"; }
  #view-issue-page tr.bug-header-data td.bug-project::before       { content: "Projekt:"; }
  #view-issue-page tr.bug-header-data td.bug-category::before      { content: "Kategoria:"; }
  #view-issue-page tr.bug-header-data td.bug-view-status::before   { content: "Widoczność:"; }
  #view-issue-page tr.bug-header-data td.bug-date-submitted::before{ content: "Zgłoszono:"; }
  #view-issue-page tr.bug-header-data td.bug-last-modified::before { content: "Zmodyfikowano:"; }

  /* Zawijanie w tabeli szczegółów (opis, temat, tagi) */
  #view-issue-page .widget-main > .table-responsive > table.table-bordered td,
  #view-issue-page .widget-main > .table-responsive > table.table-bordered th {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}


@media (max-width: 767px) {
  #account-prefs-update-div .table-responsive,
  #account-prefs-update-div .table-responsive > table {
    overflow: visible !important;
    width: 100% !important;
  }

  #account-prefs-update-div table.table td {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #account-prefs-update-div select.input-sm,
  #account-prefs-update-div input.input-sm {
    max-width: 100%;
  }
}



#view-issue-page .bug-attachment-preview-image img {
  max-width: 100% !important;
  max-height: none !important;
  height: auto !important;
}

@media (max-width: 767px) {
  #view-issue-page .bug-attachment-preview-image {
    margin: .5em 0 !important;
    padding: 0 !important;
  }
}



@media (max-width: 767px) {
  #history thead { display: none !important; }

  #history table,
  #history tbody,
  #history tr,
  #history td {
    display: block !important;
    width: auto !important;
  }

  #history .table-responsive { overflow-x: visible !important; }

  /* wiersz historii jako jedna karta */
  #history tbody tr {
    border-bottom: 2px solid rgba(128,128,128,.35);
    padding: 4px 0;
  }

  #history tbody td { border: 0 !important; }
  #history tbody td:empty { display: none !important; }

  #history tbody td::before {
    font-weight: bold;
    margin-right: .4em;
  }
  #history tbody td:nth-child(1)::before { content: "Data:"; }
  #history tbody td:nth-child(2)::before { content: "Kto:"; }
  #history tbody td:nth-child(3)::before { content: "Pole:"; }
  #history tbody td:nth-child(4)::before { content: "Zmiana:"; }
}

@media (max-width: 767px) {
  #buglist,
  #buglist tbody,
  #buglist tr,
  #buglist td {
    display: block !important;
    width: auto !important;
  }

  .checkbox-range-selection { overflow-x: visible !important; }

  /* każdy wiersz jako karta */
  #buglist tbody tr {
    border: 1px solid rgba(128,128,128,.35);
    border-radius: 4px;
    margin-bottom: 10px;
    padding: 6px 8px;
    position: relative;
  }

  #buglist tbody td {
    border: 0 !important;
    text-align: left !important;
    padding: 2px 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  #buglist tbody td:empty { display: none !important; }

  /* temat na wierzchu, wyraźniejszy */
  #buglist td.column-summary {
    font-weight: bold;
    font-size: 1.05em;
    padding-bottom: 6px !important;
  }
  #buglist td.column-summary::before { content: none !important; }

  /* checkbox w prawym górnym rogu karty */
  #buglist td.column-selection {
    position: absolute;
    top: 6px;
    right: 8px;
    padding: 0 !important;
  }

  /* etykiety */
  #buglist tbody td::before {
    font-weight: bold;
    margin-right: .4em;
    opacity: .75;
  }
  #buglist td.column-id::before             { content: "Nr:"; }
  #buglist td.column-status::before          { content: "Status:"; }
  #buglist td.column-reporter::before        { content: "Zgłaszający:"; }
  #buglist td.column-assigned-to::before     { content: "Przypisany:"; }
  #buglist td.column-last-modified::before   { content: "Aktualizacja:"; }
  #buglist td.column-project-id::before      { content: "Projekt:"; }
  #buglist td.column-tags::before            { content: "Tagi:"; }
  #buglist td.column-bugnotes-count::before  { content: "Komentarzy:"; }
  #buglist td.column-category-id::before     { content: "Kategoria:"; }
  #buglist td.column-priority::before        { content: "Priorytet:"; }
  #buglist td.column-severity::before        { content: "Ważność:"; }
  #buglist td.column-date-submitted::before  { content: "Zgłoszono:"; }
  #buglist td[class*="column-custom-Pracoch"]::before { content: "Pracochłonność:"; }

  /* status renderuje się w divie z align-left */
  #buglist td.column-status .align-left { display: inline; }
}

@media (max-width: 767px) {
  table.filters {
    display: block;
    max-height: 120px;
    overflow: auto;
    font-size: 11px;
  }
  table.filters td { padding: 2px 4px !important; }
}


@media (max-width: 767px) {
  /* thead wraca — jako pasek sortowania, nie jako nagłówki tabeli */
  #buglist thead { display: block !important; }

  #buglist thead tr.buglist-headers {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 6px 8px;
    border-bottom: 2px solid rgba(128,128,128,.4);
    margin-bottom: 8px;
  }

  #buglist thead th {
    display: inline-block !important;
    width: auto !important;
    border: 0 !important;
    padding: 0 !important;
    font-size: 12px;
    white-space: nowrap;
  }

  #buglist thead th.column-selection { display: none !important; }

  #buglist thead th::before {
    content: "⇅ ";
    opacity: .5;
  }
}

@media (max-width: 767px) {
  #filter .table-responsive {
    overflow: auto;
    max-height: 40vh;
  }
  table.filters { font-size: 11px; }
  table.filters td { padding: 2px 4px !important; }
}
