/*
  https://github.com/darklow/django-suit/issues/777#issuecomment-806114020
  https://github.com/darklow/django-suit/issues/763#issuecomment-982992027
*/
.main {
  width: 100%;
}
#changelist {
  display: grid;
  grid-template-areas: "list filter";
  grid-auto-columns: 5fr 1fr;
}
.changelist-form-container {
  grid-area: list;
  flex-grow: 1;
}
#changelist-form {
  margin-right: 2rem;
}
#changelist #changelist-filter {
  margin-left: auto;
  margin-top: 6px;
  grid-area: filter;
}
/* Make this go away */
.skip-to-content-link { display: none }

.center { text-align: center; }
.right { text-align: right; }

tfoot td, tfoot th { padding: 4px 8px; }

/* Floating submit buttons */
.col-right > .submit-row { position: sticky !important; top: 0.975rem; }
#content-main > .total-hours { display: none !important; }
.col-right > .total-hours { position: sticky; top: 280px !important; }
.button {
  color: #fff;
  background-color: #4298DE;
  border: 0px;
  font-weight: normal;
  line-height: 1.25;
  white-space: nowrap;
  vertical-align: middle;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
}
.button:hover {
  color: #fff;
  background-color: #227bc4;
  cursor: pointer;
  text-decoration: none;
}

/* Task queue */
.task-queue-container {
  background-color: #f6f6f6;
  margin: 0px 12px;
}
.task-queue-container > table { width: 100%; }
.task-queue-container > table > tbody > tr > td { padding: 4px 6px; }
.task-queue-container > table > tbody > tr > td:nth-child(1) { width: 100px; }
.task-queue-container > table > tbody > tr > td:last-child { width: 100px; }
.task-queue-container > table > tbody > tr:hover > td { background-color: #e6e6e6; }
.task-queue-container .small { font-size: 90%; }
.task-queue-container .red { color: red; }
.task-queue-container .button {
  display: inline-block;
  min-width: 128px;
  text-align: center;
}
.task-queue-container .button.ghost {
  color: #666;
  background-color: #f6f6f6;
  border: 1px solid #999;
}
.task-queue-container .button.small { font-size: 80%; }
.task-queue-container .button.green { background-color: #23803f; }
.task-queue-container .button.green:hover { background-color: #1c6632; }
.task-queue-container .button:last-child { margin-bottom: 2px; }
.task-description { padding-left: 12px; margin: 12px 8px; }

table.metrics { margin: 8px; width: 100%; }
table.metrics td { padding: 2px 12px; }
table.metrics tr:hover { background-color: #eee; }
table.metrics tr:focus-within { background-color: #e6e6e6; }
table.metrics .item-detail { font-size: 11px; margin-left: 8px; }
.bcc { color: gray; }

/* Events */
body.dashboard .renewal:before {
    content: "🗘";
    color: #4298DE;
}
body.dashboard .expired:before {
    content: "❗";
    color: lightred;
}
body.dashboard .invoice:before {
    content: "💵";
    color: green;
}
body.dashboard .invoice_send:before {
    content: "🖅";
    color: darkgreen;
}

/* Favourite links */
body.dashboard .favlink:before {
    content: "★";
    color: gold;
}

/* Override suit.css strange label transparency */
.widget-AdminSplitDateTime, .widget-AdminDateWidget, .widget-AdminTimeWidget { color: inherit; }
.custom-select, fieldset select:not([multiple]) { -moz-appearance: button; -webkit-appearance: button; }
.custom-select, fieldset select[multiple] { height: 20rem; }

/* Override suit.css spacing for Add inline */
.inline-group .inline-related + .empty-form + .add-row { margin-top: 0px !important; }

.inline-group td.field-comment {min-width: 25em;}

fieldset.collapsed { margin-top: 0px !important; }
fieldset > h2 { font-size: 1.143rem; font-weight: normal; padding: 0.5rem 1rem; }
fieldset > h2 > a { font-size: 1rem; margin-left: 0.75rem; }

ul.errorlist { list-style: none; padding: 0px; }
ul.errorlist > li {
  padding: 0.75rem 1.25rem; margin: 1rem; border: 1px solid #ebcccc; border-radius: 0.25rem;
  background-color: #f2dede; color: #a94442;
}

/* rangefilter */
.admindatefilter { background-color: #fff; padding: 0.625rem 0; margin-bottom: 1.25rem; }
.admindatefilter .datetimeshortcuts { padding-top: 0px !important; }
.admindatefilter input { font-size: 14px; }
.admindatefilter .vDateField {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.25;
  color: #55595c;
  background-color: #fff;
  background-image: none;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.25rem;
}
.admindatefilter input[type=submit] { color: #fff !important; background-color: #5d6478 !important; }

/* select2 */
.select2-container.select2-container--admin-autocomplete { min-width: 300px; }
.select2-container--admin-autocomplete .select2-selection--single,
.select2-container--admin-autocomplete .select2-search--dropdown .select2-search__field {
  background-color: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
}
.select2-results__option { padding: 2px 6px !important; }
.select2-container--admin-autocomplete .select2-results > .select2-results__options { max-height: 300px !important; }
.select2-container--admin-autocomplete .select2-results__option--highlighted { background-color: #eceeef !important; }
select[data-field-name=product] { width: 90% !important; }

/* admin holiday */
.model-holiday #changelist { margin-top: 4rem !important; width: 100% !important; grid-auto-columns: 50% 50% !important; }
.model-holiday #changelist-filter { width: 100% !important; margin: 0px 1.25rem !important; }
.model-holiday .monthcalendar { min-width: 165px; width: 30%; display: inline-block; margin: 0px 4px; }
table.calendar { width: 100%; }
table.calendar td, table.calendar th { text-align: center; width: 14.2857%; }
table.calendar .weekend { background-color: silver; }
table.calendar .holiday { background-color: lightblue; }
table.calendar span.today { background-color: gold; display: inline-block; border-radius: 50%; border: 0px; width: 15pt; height: 15pt; margin: auto; text-align:center; }

/* other admin */
.widget-RelatedFieldWidgetWrapper select { width: auto; }
.widget-AdminURLFieldWidget input { width: 80% !important; }

.field-status p, .field-status option { font-weight: bold; }
td.field-total, td.field-amount, td.field-unit_price, td.field-quantity, td.field-start_date, td.field-end_date,
td.field-created_at, td.field-due_at, td.field-updated_at, td.field-sla { text-align: right; }
.dynamic-scheduledtask_set td.field-sow > strong { display: block; }
.dynamic-scheduledtask_set td.original > p { display: none; }
