/**
 * Description: CSS version for SiteWatchman.
 *
 * @package     SiteWatchman
 * @category    module css
 * @author      Oleg Klenitsky
 * @copyright   2024 Oleg Klenitsky
 * @license     GPL-2.0-or-later
 */

.form-table th label.settings_labels {
	font-size: 16px;
	cursor: pointer;
}

.swm-service-btn, .swm-label-stat {
	cursor: pointer;
}

/* Configuring a Google Dashboard chart for statistics */
.swm-chart-filter-wrap {
	display: flex;
	justify-content: center;
}

/* Smooth fade-out animation of the green backlight */
@keyframes swmHighlightAnimation {
  0% {
    background-color: rgba(70, 180, 80, 0.25); /* A fleeting soft-green flash */
  }
  100% {
    background-color: transparent; /* A slow, beautiful fade into transparency. */
  }
}
/* Правильный класс для метабоксов */
.swm-highlight-fade {
  animation: swmHighlightAnimation 2.8s ease-out; /* standard smooth fade-out */
}

/* Formating fields of main table */
.wp-list-table .column-cb { width: 4%; }
.wp-list-table .column-id { width: 5%; }
.wp-list-table .column-uid { width: 5%; }
.wp-list-table .column-user_login { width: 10%; }
.wp-list-table .column-user_role { width: 10%; }
.wp-list-table .column-time { width: 8%; }
.wp-list-table .column-user_ip { width: 12%; }
.wp-list-table .column-bl { width: 10%; }
.wp-list-table .column-page_visit { width: 12%; }
.wp-list-table .column-page_from { width: 12%; }
.wp-list-table .column-info { width: 12%; }

#filter_level1_role {
	width: 120px;
}

#filter_level1_time {
	width: 145px;
}

#filter_level1_country {
	width: 120px;
}

#filter_level1_search {
	width: 150px;
	padding:5px;
}

.radio, .metabox-prefs label {
	cursor: pointer;
}
.radio-level2 {
	margin-top:5px !important;
}
.tablenav.top label.radio {
	display: inline-block;
	margin-top: 5px !important;
}

/* for button debug log. Begin*/
.blinking {
	animation:blinkingText 0.8s infinite;
}
@keyframes blinkingText{
	50%{	color: lightgreen;	}
	100%{	color: green;	}
}
.swm-header-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 57%;
}
.swm {
	display: flex;
	flex-direction: column;
	align-content: center;
	flex-wrap: wrap;
	margin-left: auto;
	margin-right: auto;
}
.swm7_logo {
	margin:40px 0 0 10px;
	height:40px;
	width:40px;
}
/* Custom button SSE */
.sse {
	position: relative;
	width: 80px;
	height: 15px;
	margin: auto;
	padding:0;
	left:-50px;
}

.sse input {
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	opacity: 0;
	z-index: 100;
	position: absolute;
	width: 100%;
	height: 100%;
	cursor: pointer;
}

.sse span {
	display: block;
	width: 100%;
	height: 100%;
	background: #a5a39d;
	border-radius: 40px;
	box-shadow:
	inset 0 3px 8px 1px rgba(0,0,0,0.2),
	0 1px 0 rgba(255,255,255,0.5);
}

.sse span:after {
	content: "";
	position: absolute;
	z-index: -1;
	top: -8px; right: -8px; bottom: -8px; left: -8px;
	border-radius: inherit;
	background: #ababab;
	background: -moz-linear-gradient(#f2f2f2, #ababab);
	background: -ms-linear-gradient(#f2f2f2, #ababab);
	background: -o-linear-gradient(#f2f2f2, #ababab);
	background: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ababab));
	background: -webkit-linear-gradient(#f2f2f2, #ababab);
	background: linear-gradient(#f2f2f2, #ababab);
	box-shadow: 0 0 10px rgba(0,0,0,0.3),	0 1px 1px rgba(0,0,0,0.25);
}

.sse span:before {
	content: "";
	position: absolute;
	z-index: -1;
	top: -18px; right: -18px; bottom: -18px; left: -18px;
	border-radius: inherit;
}

.sse span i {
	display: block;
	height: 100%;
	width: 60%;
	border-radius: inherit;
	position: absolute;
	z-index: 2;
	right: 40%;
	top: 0;
	background: #b2ac9e;
	background: -moz-linear-gradient(#f7f2f6, #b2ac9e);
	background: -ms-linear-gradient(#f7f2f6, #b2ac9e);
	background: -o-linear-gradient(#f7f2f6, #b2ac9e);
	background: -webkit-gradient(linear, 0 0, 0 100%, from(#f7f2f6), to(#b2ac9e));
	background: -webkit-linear-gradient(#f7f2f6, #b2ac9e);
	background: linear-gradient(#f7f2f6, #b2ac9e);
	box-shadow:
	inset 0 1px 0 white, 0 0 8px rgba(0,0,0,0.3),	0 5px 5px rgba(0,0,0,0.2);
}

.sse span i:after {
	content: "SSE";
	font-size: 13px;
	position: absolute;
	left: 27%;
	top: -5%;
	width: 70%;
	height: 50%;
}

.sse span i:before {
	content: "OFF";
	text-transform: uppercase;
	font-style: normal;
	font-weight: bold;
	color: rgba(0,0,0,0.4);
	text-shadow: 0 1px 0 #bcb8ae, 0 -1px 0 #97958e;
	font-family: Helvetica, Arial, sans-serif;
	font-size: 13px;
	position: absolute;
	top: 80%;
	margin-top: -12px;
	right: -50%;
}

.sse input:checked ~ span {
	background: #9abb82;
}

.sse input:checked ~ span i {
	right: -1%;
}

.sse input:checked ~ span i:before {
	content: "ON";
	right: 115%;
	top: 80%;
	color: #82a06a;
	text-shadow: 0 1px 0 #afcb9b,	0 -1px 0 #6b8659;
}
.level1 {
	display: flex;
	justify-content: space-between;
	align-items: center; /* Центрируем блоки по вертикали */
	height: 30px;
	width: 100%;
	margin-bottom: 10px;
}

html body .wrap .level1 .level1_selects select,
html body .wrap .level1 .level1_selects .button,
html body .wrap .level1 .level1_find input[type="search"],
html body .wrap .level1 .level1_find .button {
	height: 30px !important;
	max-height: 30px !important;
	min-height: 30px !important;
	line-height: 28px !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	box-sizing: border-box !important;
}
.level1_selects select {
	width: 120px;
}
.info_panel {
  display: flex;
  justify-content: space-around;
  position: relative;
  margin: 0 0 20px 0;
  width: 100%;
  height: 120px;
  top: 10px;
  border-radius: 10px;
  background: #a5a39d;
  box-shadow: inset 0 3px 8px 1px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.5);
}
.info_panel:after {
	content: "";
	position: absolute;
	z-index: -1;
	top: -8px; right: -8px; bottom: -8px; left: -8px;
	border-radius: inherit;
	background: #ccc;
	background: linear-gradient(#f2f2f2, #ababab);
	box-shadow: 0 0 10px rgba(0,0,0,0.3), 0 1px 1px rgba(0,0,0,0.25);
}
.field_panel_info {
	display:flex;
	justify-content: center;
	position: relative;
	float:left;
	height:110px;
	border-radius: inherit;
	background: #b2ac9e;
	background: linear-gradient(#f7f2f6, #b2ac9e);
	box-shadow:	inset 0 1px 0 white, 0 0 8px rgba(0,0,0,0.3), 0 5px 5px rgba(0,0,0,0.2);
}
.panel_title {
	font-style: normal;
	font-weight: bold;
	font-family: Helvetica, Arial, sans-serif;
	text-transform: uppercase;
	text-shadow: 0 1px 0 #bcb8ae, 0 -1px 0 #97958e;
	background: #9B9993;
}



/* Контейнер метабоксов, выстроенных в одну жесткую линию */
.swm-custom-poststuff {
	min-width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}
.swm-custom-poststuff #post-body {
	margin: 0 !important;
	padding: 0 !important;
}
.swm-custom-poststuff #post-body .postbox-container {
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* Выстраиваем метабоксы строго в одну горизонтальную флекс-линию */
.swm-panels-row .meta-box-sortables {
	display: flex !important;
	gap: 10px !important;
	flex-wrap: nowrap !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
	min-height: auto !important;
}
/* Отключаем псевдоэлементы WP, мешающие Flexbox */
.swm-panels-row .meta-box-sortables:after,
.swm-panels-row .meta-box-sortables:before {
	display: none !important;
	content: none !important;
}
/* Каждый метабокс занимает ровно 25% */
.swm-panels-row .meta-box-sortables .postbox {
	flex: 1 1 calc(25% - 8px) !important;
	width: calc(25% - 8px) !important;
	margin: 0 !important;
}
/* Прячем исключительно стрелки перемещения вверх/вниз */
.swm-panels-row .meta-box-sortables .postbox .handle-order-higher,
.swm-panels-row .meta-box-sortables .postbox .handle-order-lower {
	display: none !important;
}
/* Оставляем кнопку сворачивания (toggle-indicator) активной */
.swm-panels-row .meta-box-sortables .postbox .handle-actions {
	gap: 0 !important;
}
/* Оставляем курсор перетаскивания (move) для шапки, так как drag-and-drop теперь снова работает */
.swm-panels-row .meta-box-sortables .postbox h2.hndle {
	cursor: move !important;
}
.postbox .inside {
	padding: 0 5px 5px;
}

.meta-box-sortables {
	display: flex;
	width:100%;
}
.swm-grid-table {
  display: grid;
  /* We create two columns: the first adjusts to the content, and the second takes up all the remaining space. */
  grid-template-columns: max-content 1fr;
  gap: 15px;
  width: 100%;
	background-color: #F0F0F1;
  height:80px;
  overflow:auto;
  border:1px solid #B4AEA0;
  border-radius:5px;
}
.swm-grid-row {
  /* Forces child cells to ignore this div and align precisely with the parent grid. */
  display: contents;
}
.swm-grid-cell {
  padding: 8px;
  align-self: center;
}

/* button of close win */
.win-popup .btn-close {
	position: absolute;
	top: 12px;
	right: 12px;padding: 0;
	width: 18px;
	height: 18px;
	border: 2px solid #ccc;
	-webkit-border-radius: 15px;
	-moz-border-radius: 15px;
	-ms-border-radius: 15px;
	-o-border-radius: 15px;
	border-radius: 15px;
	background-color: rgba(61, 61, 61, 0.8);
	-webkit-box-shadow: 0px 0px 10px #000;
	-moz-box-shadow: 0px 0px 10px #000;
	box-shadow: 0px 0px 10px #000;
	text-align: center;
	text-decoration: none;
	font-weight: bold;
	line-height: 18px;
	-webkit-transition: all ease .8s;
	-moz-transition: all ease .8s;
	-ms-transition: all ease .8s;
	-o-transition: all ease .8s;
	transition: all ease .8s;
}
.win-popup .btn-close:before {
	color: rgba(255, 255, 255, 0.9);
	content: "X";
	text-shadow: 0 -1px rgba(0, 0, 0, 0.9);
	font-size: 14px;
}
.win-popup .btn-close:hover {
	background-color: rgba(252, 20, 0, 0.8);
	-webkit-transform: rotate(360deg);
	-moz-transform: rotate(360deg);
	-ms-transform: rotate(360deg);
	-o-transform: rotate(360deg);
	transform: rotate(360deg);
}

/* Styles related to the popup window and content */
.popup-header {
	padding: 10px 10px;
}
.popup-header h2 {
	color: #008000;
	background-color: #D4D0C8;
	text-align: center;
	text-shadow: 0 1px 3px rgba(0,0,0,.3);
	font:22px Arial, Helvetica, sans-serif;
	position: relative;
	margin: 0 0 0 0;
	padding: 0 10px;
	-webkit-border-radius: 10px;
	-moz-border-radius: 10px;
	-ms-border-radius: 10px;
	-o-border-radius: 10px;
	-webkit-box-shadow: 0px 0px 10px #000;
	-moz-box-shadow: 0px 0px 10px #000;
	box-shadow: 0px 0px 10px #000;
}

.win-popup{
	width:100%;
	height:100%;
	background-color: rgba(0,0,0,0.5);
	overflow:hidden;
	position:fixed;
	top:0;
	left:0;
	z-index:1;
}
.win-popup .popup-content{
	width: 680px;
	height: 400px;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	margin: auto;
}
.popup-content{
	position: relative;
	margin: 0 0 20px 0;
	float:left;
	width: 100%;
	height:120px;
	top: 10px;
	border-radius: 10px;

	background: #a5a39d;
	box-shadow: inset 0 3px 8px 1px rgba(0,0,0,0.2), 0 1px 0 rgba(255,255,255,0.5);
}
.popup-content:after{
	content: "";
	position: absolute;
	z-index: -1;
	top: -8px; right: -8px; bottom: -8px; left: -8px;
	border-radius: inherit;
	background: #ccc;
	background: linear-gradient(#f2f2f2, #ababab);
	box-shadow: 0 0 10px rgba(0,0,0,0.3), 0 1px 1px rgba(0,0,0,0.25);
}
.popup-body{
	width: 670px;
	padding:0;
	margin:0;
}
.popup-body textarea{
	position: relative;
	text-align: left;
	padding: 10px 15px;
	width: 94%;
	background: #fff;
	color: black;
	height:295px;
	border: 1px solid #5A5750;
	-webkit-box-shadow: 0px 0px 10px #000;
	-moz-box-shadow: 0px 0px 10px #000;
	box-shadow: 0px 0px 10px #000;
	z-index:1;
}
.popup-footer{
	display:flex;
	flex-wrap: wrap;
	text-align: left;
	padding: 0;
	margin:5px;
}
.swm-footer-path, .swm-footer-provider, .swm-footer-visitor {
	height: 14px;
	font-size: 14px;
	margin-left:5px;
}
.button-primary {
	margin: 0 2px !important;
}

/* Screw Decor for window pop-up */
.swm-img-screw-main {
	position: absolute;
	top: 10px;
	left: 12px;
}
.swm-img-screw-tl {
	position: absolute;
	top: 50px;
	left: 12px;
	z-index: 2;
}
.swm-img-screw-bl {
	position: absolute;
	top: 335px;
	left: 12px;
	z-index:2;
}
.swm-img-screw-tr {
	position: absolute;
	top: 50px;
	left: 96%;
	z-index:2;
}
.swm-img-screw-br {
	position: absolute;
	top: 335px;
	left: 96%;
	z-index:2;
}
/* window pop-up */
.popup-body{
	width: 670px;
	padding:0;
	margin:0;
}
.swm-textarea-container {
	height: 300px;
	padding: 5px 0 0 0;
	margin:0 0 0 10px;
	background-color: #D4D0C8;
}
.swm-content-popup {
	position: relative;
	text-align: left;
	padding: 10px 15px;
	width: 94%;
	background: #fff;
	color: black;
	margin-left: 20px;
	height: 295px;
	border: 1px solid #5A5750;
	-webkit-box-shadow: 0px 0px 10px #000;
	-moz-box-shadow: 0px 0px 10px #000;
	box-shadow: 0px 0px 10px #000;
	z-index: 1;
}
.swm-blacklist-popup {
	display:flex;
	justify-content: space-between;
	position: relative;
	text-align: left;
	padding: 10px 15px;
	width: 89%;
	background: #fff;
	color: black;
	margin-left: 20px;
	height: 270px;
	border: 1px solid #5A5750;
	-webkit-box-shadow: 0px 0px 10px #000;
	-moz-box-shadow: 0px 0px 10px #000;
	box-shadow: 0px 0px 10px #000;
	z-index: 1;
}
/* window pop-up wp-cron tasks*/
.swm-cron-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 300px;
	padding: 5px 0 0 0;
	margin:0 0 0 10px;
	background-color: #D4D0C8;
}
.tasks-summary {
	display: flex;
	justify-content: space-around;
	width: 80%;
	height: 20px;
	margin:0;
	padding:0;
}
.task-orphan {
	color: red;
	font-weight: bold;
}
.task-plugin {
	color: blue;
	font-weight:bold;
}
.task-theme {
	color: green;
	font-weight: bold;
}
.task-wp {
	color: brown;
	font-weight:bold;
}

.swm-step-red {
	color: red;
	font-weight: normal;
}
.swm-step-blue {
	color: blue;
	font-weight:normal;
}
.swm-step-green {
	color: green;
	font-weight: normal;
}
.swm-step-brown {
	color: brown;
	font-weight:normal;
}

/* wp-cron tasks table styles */
.table_cron {
	display: table;
	width: 100%;
	border-collapse: collapse;
}

.table_cron *,
.table_cron *::before,
.table_cron *::after {
	box-sizing: border-box;
}

.thead_cron, .tfoot_cron {
	display: block;
	width: calc(100% - 8px);
}

.tbody_cron {
	display: block;
	width: 100%;
	height: 195px;
	max-height: 195px;
	overflow-y: scroll;
	overflow-x: hidden;
	color: black;
}

.tbody_cron td {
	background-color: #D4D0C8;
	padding: 1px 4px 1px 4px;
}

.table_cron .tr_cron {
	display: table;
	width: 100%;
	table-layout: fixed;
	border-bottom: 1px solid black;
	border-left: 1px solid black;
	border-right: 1px solid black;
}

.thead_cron .tr_cron {
	border-top: 1px solid black;
}

.th_cron, .td_cron {
	padding: 8px;
	text-align: left;
	border-right: 1px solid black;
	background-color: white;
}

.th_cron:last-child, .td_cron:last-child {
	border-right: none;
}

.swm-grid-table::-webkit-scrollbar,
.tbody_cron::-webkit-scrollbar,
.tbody_stat::-webkit-scrollbar {
	width: 8px;
}
.swm-grid-table::-webkit-scrollbar-thumb,
.tbody_cron::-webkit-scrollbar-thumb,
.tbody_stat::-webkit-scrollbar-thumb {
	background-color: #8B8B8B;
	border-radius: 4px;
}
.swm-grid-table::-webkit-scrollbar-track,
.tbody_cron::-webkit-scrollbar-track,
.tbody_stat::-webkit-scrollbar-track {
	background-color: #f1f1f1;
}

.swm-col-id { width: 8%; }
.swm-col-name { width: 36%;word-wrap: break-word; }
.swm-col-recurrence { width: 15%;word-wrap: break-word; }
.swm-col-next { width: 20%;word-wrap: break-word; }
.swm-col-source { width: 21%;word-wrap: break-word; }

/* window pop-up statistic of visits*/
.swm-stat-radios {
	margin: -5px 0 5px 10px;
}
.stat_th {
	font-weight: bold;
	border-bottom: 2px solid #ddd;
	height: 25px;
	line-height: 25px;
	box-sizing: border-box;
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 1;
}
.swm-stat-workarea {
	margin-left: 10px;
	background: #D4D0C8;
	width: 660px;
	height: 290px;
	padding-top: 15px;
	box-sizing: border-box;
}
.swm-stat-scroller, .table_stat {
	width: 100%;
	height: 95%;
}

.table_stat {
	display:table;
	width: 100%;
	height: 100%;
}
.tbody_stat {
	display: block;
	width: 100%;
	height: 195px;
	max-height: 195px;
	overflow-y: scroll;
	overflow-x: hidden;
}
.tbody_stat tr {
	display: table;
	width: 100%;
	table-layout: fixed;
}
.thead_stat, .tfoot_stat {
	display: inline-table;
	width: calc(100% - 8px);
}
.tbody_stat tr td {
	text-align: center;
}

.stat-img-screw-tl {
	position: absolute;
	top: 68px;
	left: 12px;
	z-index: 2;
}
.stat-img-screw-bl {
	position: absolute;
	top: 342px;
	left: 12px;
	z-index:2;
}
.stat-img-screw-tr {
	position: absolute;
	top: 68px;
	left: 655px;
	z-index:2;
}
.stat-img-screw-br {
	position: absolute;
	top: 342px;
	left: 655px;
	z-index:2;
}
/* window pop-up console of visits*/
.console-img-screw-tl {
	visibility: hidden;
	position: absolute;
	top: 50px;
	left: 12px;
	z-index: 2;
}
.console-img-screw-bl {
	visibility: hidden;
	position: absolute;
	top: 365px;
	left: 12px;
	z-index:2;
}
.console-img-screw-tr {
	visibility: hidden;
	position: absolute;
	top: 50px;
	left: 655px;
	z-index:2;
}
.console-img-screw-br {
	visibility: hidden;
	position: absolute;
	top: 365px;
	left: 655px;
	z-index:2;
}
.swm-console-container {
	height: 330px;
	padding: 5px 0 0 0;
	margin:0 0 0 10px;
	background-color: #D4D0C8;
}
.swm-console-footer {
	margin: 0 0 0 10px;
	font-weight: bold;
}
#shell {
	display: block;
	margin: 0 auto;
	padding: 5px 10px;
	overflow: auto;
	cursor: text;
	height: 310px;
	width: 90%;
	background-color: #2A2A2E;
	color: #FFFFFF;
	font-family: monaco, 'lucida console', 'courier new', 'courier', monospace;
	font-size: 13px;
	line-height: 18px;
	border: 1px solid #5A5750;
	-webkit-box-shadow: 0px 0px 10px #000;
	-moz-box-shadow: 0px 0px 10px #000;
	box-shadow: 0px 0px 10px #000;
}
#shell input {
	font-family: monaco, 'lucida console', 'courier new', 'courier', monospace;
	font-size: 13px;
	background-color: #2A2A2E;
	color: #FFFFFF;
	width: 98%;
	height: 20px;

	padding-top: 0;
	padding-bottom: 0;
	line-height: 20px;
	min-height: 0; /* Отменяет минимальную высоту WordPress */
}
#shell input:focus {
  outline: none;
  box-shadow: none;
  border: 1px solid #666666;
}

/* phpinfo() table */
.center {
  overflow-x: hidden !important;
}

/* Settings for ALL phpinfo() tables */
.center table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: auto !important;
  border-collapse: collapse !important;
}

.center {
  overflow-x: auto;
}

.center table {
  width: 100% !important;
  max-width: 100% !important;
  /* Forces the browser to divide the width strictly equally among all columns. */
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

/* We are removing the fixed cell widths that PHP generates for certain modules. */
.center td, .center th {
  width: auto !important;
  /* Safe wrapping of long configuration strings and paths within equal-width columns. */
  word-break: break-all !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
}

/* Taming the tag <hr> */
.center hr {
  width: 100% !important;
  max-width: 100% !important;
}
