/**
 * The CSS for the admin functionality.
 */

/*
* GENERAL
*/

html {
	--scrollbar-color: #32373c;
	--scrollbar-thumb-color: #7d7d7d;
	--note-color-none: #fff;
	--note-color-yellow: #fffebb;
	--note-color-red: #ffc0bb;
	--note-color-green: #d9ffbb;
	--note-color-blue: #bbffe6;
	--note-color-purple: #e9bbff;
	--note-color-deleting: #ff6767;
}

.display-block {
	display: block;
}

.no-margin-top {
	margin-top: 0 !important;
}

.form-field-invalid {
	border-color: #dc3232 !important;
	box-shadow: 0 0 2px rgba(204,0,0,.8) !important;
}

.rotate-180 {
	transform: rotate(180deg);
}

/*
* META BOX - Settings
*/

#jamp_meta_box .meta-field {
	margin-top: 15px;
}

#jamp_meta_box .meta-section,
#jamp_meta_box .meta-target-type,
#jamp_meta_box .meta-target {
	display: none;
}

#jamp_meta_box select {
	width: 100%;
}

@media only screen and (max-width: 782px) {
	#jamp_meta_box label {
		margin: .5em 0 !important;
		display: inline-block;
	}
}

.jamp-color-preview {
	display: inline-block;
	vertical-align: bottom;
	width: 16px;
	height: 16px;
	border: 1px solid #c3c4c7;
	background-color: var(--note-color-none);
}

@media only screen and (max-width: 782px) {
	.jamp-color-preview {
		width: 25px;
		height: 25px;
	}
}

@media only screen and (min-width: 783px) {
	.jamp-color-preview--big {
		width: 40px;
		height: 40px;
	}
}

/*
* META BOX - View Notes
*/

.jamp-meta-box-note:not(:last-child) {
	margin-bottom: 20px;
}

.jamp-meta-box-note__title {
	font-weight: 600;
}

.jamp-meta-box-note__container {
	padding-left: 5px !important;
	border-left: 2px solid #dddddd;
}

.jamp-meta-box-note__content {
	margin-bottom: 0 !important;
}

.jamp-meta-box-note__content p {
	margin-top: 2px;
}

.jamp-meta-box-note__content img {
	display: block;
	max-width: 100%;
	height: auto;
}

.jamp-meta-box-note__detail-label {
	font-weight: 600;
}

.jamp-meta-box-note__detail-separator:before {
	content: ' | ';
	color: #dddddd;
}

.jamp-meta-box-note__no-notes-notice {
	display: block;
	font-style: italic !important;
}

/*
* ADMIN BAR
*/

#wp-admin-bar-jamp .ab-icon:before {
	content: "\f157";
	top: 3px;
}

#wp-admin-bar-jamp .notes-count {
	display: inline-block;
	box-sizing: border-box;
	margin-left: 4px;
	padding: 0 5px;
	min-width: 18px;
	height: 18px;
	border-radius: 9px;
	background-color: #ca4a1f;
	color: #fff;
	font-size: 11px;
	line-height: 1.6;
	text-align: center;
}

#wp-admin-bar-jamp .ab-sub-wrapper .ab-item {
	color: #ffffff;
}

#wp-admin-bar-jamp .ab-sub-wrapper #wp-admin-bar-jamp-content div.ab-item {
	height: 100%;
	max-height: 60vh;
	overflow-y: auto;
	
	scrollbar-width: thin;
	scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-color);
}

#wp-admin-bar-jamp .ab-sub-wrapper #wp-admin-bar-jamp-content div.ab-item::-webkit-scrollbar {
  width: 12px;
}

#wp-admin-bar-jamp .ab-sub-wrapper #wp-admin-bar-jamp-content div.ab-item::-webkit-scrollbar-track {
  background: var(--scrollbar-color);
}

#wp-admin-bar-jamp .ab-sub-wrapper #wp-admin-bar-jamp-content div.ab-item::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb-color) ;
  border-radius: 5px;
  border: 3px solid var(--scrollbar-color);
}

.jamp-admin-bar-section-title {
	display: inline-block;
	font-size: 15px !important;
	font-weight: 700 !important;
}

.jamp-admin-bar-action:before {
	font-family: "dashicons";
	font-size: 20px;
	line-height: normal;
	vertical-align: text-bottom;
}

.jamp-admin-bar-action {
	display: inline !important;
	padding: 0 !important;
}

.jamp-admin-bar-action--create:before {
	content: "\f132";
	position: relative;
	top: 5px;
}

.jamp-admin-bar-action--create {
	padding: 0 5px 0 0 !important;
}

.jamp-admin-bar-action--info:before {
	content: "\f348";
}

.jamp-admin-bar-action--info {
	color: #7d7d7d !important;
}

.jamp-admin-bar-action--info:hover {
	color: #00a0d2 !important;
}

.jamp-admin-bar-action--edit:before {
	content: "\f119";
}

.jamp-admin-bar-action--edit {
	color: #7d7d7d !important;
}

.jamp-admin-bar-action--edit:hover {
	color: #00a0d2 !important;
}

.jamp-admin-bar-action--trash:before {
	content: "\f182";
}

.jamp-admin-bar-action--trash {
	color: #7d7d7d !important;
}

.jamp-admin-bar-action--trash:hover {
	color: #a00 !important;
}

.jamp-admin-bar-note {
	position: relative !important;
	box-sizing: border-box !important;
	min-width: 300px;
	max-width: 500px;
	padding: 8px 5px 5px 5px !important;
	margin-bottom: 5px !important;
	background-color: var(--note-color-none);
	color: #32373c;
}

.jamp-admin-bar-note img {
	display: block;
	max-width: 100%;
	height: auto;
}

.jamp-admin-bar-note__title {	
	display: block;
	max-width: 75% !important;
	margin-bottom: 5px !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	white-space: normal !important;
}

.jamp-admin-bar-note__actions {
	position: absolute !important;
	top: 5px;
	right: 10px;
}

.jamp-admin-bar-note__content * {
	white-space: normal !important;
	line-height: 1.6 !important;
}

.jamp-admin-bar-note__content b,
.jamp-admin-bar-note__content strong {
    font-weight: 700 !important;
}

.jamp-admin-bar-note__content a {
	display: inline !important;
	margin: 0 !important;
	padding: 0 !important;

	color: inherit !important;
	text-decoration: underline !important;
}

.jamp-admin-bar-note__content a:hover {
	color: #00a0d2 !important;
}

.jamp-admin-bar-note__details {
	display: none;
	border-top: 1px solid #32373c;
	padding-top: 2px !important;
	margin-top: 6px !important;
	color: #32373c;
}

.jamp-admin-bar-note__detail {
	display: block;
	font-size: 12px !important;
	line-height: 1.2 !important;
}

.jamp-admin-bar-note__detail-label {
	font-size: 12px !important;
	line-height: 1.2 !important;
	font-weight: 700 !important;
}

.jamp-admin-bar-note__no-notes-notice {
	display: block;
	font-style: italic !important;
}

.jamp-admin-bar-note__no-notes-notice--hidden {
	display: none;
}

/*
* TABLE COLUMNS
*/

th.column-jamp_note {
    width: 15%;
}

.jamp_note.column-jamp_note:not(.hidden) {
    overflow: visible !important;
}

.jamp-column-note {
	scroll-margin: 20px;
	box-sizing: border-box;
	margin-bottom: 10px;
	background-color: var(--note-color-none);
	border: 1px solid #c3c4c7;
}

.jamp-column-note img {
	display: block;
	max-width: 100%;
	height: auto;
}

.jamp-column-note__title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 6px;
	width: 100%;
	padding: 6px;
	text-align: left;
	font-weight: 600;
	background: none;
	border: none;
	cursor: pointer;
}

.jamp-column-note__arrow {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	text-align: center;
	line-height: 1;
	transform-origin: center;
	transition: all 0.3s;
}

.jamp-column-note__content {
	margin-bottom: 0 !important;
	padding: 0 6px;
}

.jamp-column-note__content p:first-child {
	margin-top: 6px;
}

.jamp-column-note__content p:last-child {
	margin-bottom: 0;
}

.jamp-column-note__note-actions {
	margin-top: 12px;
	padding: 6px;
	color: #c3c4c7;
	background-color: rgba(200,200,200,.2);
}

.jamp-column-note__note-trash-action {
	color: #b32d2e;
}

.jamp-column-note__note-trash-action:hover {
	color: #b32d2e;
}

.jamp-column-note__no-notes-notice {
	display: block;
	margin-bottom: 10px;
}

.jamp-column-note__no-notes-notice--hidden {
	display: none;
}

.jamp-column-note__orphan-note-notice {
	font-weight: 700;
}

.jamp-column-note.jamp-column-note--close .jamp-column-note__container {
	display: none;
}

/*
* NOTES GLOBAL STYLES
*/
.jamp-note--color-green {
	background-color: var(--note-color-green);
}

.jamp-note--color-blue {
	background-color: var(--note-color-blue);
}

.jamp-note--color-purple {
	background-color: var(--note-color-purple);
}

.jamp-note--color-red {
	background-color: var(--note-color-red);
}

.jamp-note--color-yellow {
	background-color: var(--note-color-yellow);
}

.jamp-note--deleting {
	background-color: var(--note-color-deleting);
}

/*
* TRASH DIALOG
*/

.jamp-trash-dialog--hidden {
	display: none;
}

/*
* NOTE TOOLTIP
*/

/* Tooltip container */
.jamp-note-info-tooltip {
	position: relative !important;
	display: inline-block !important;
}

/* Tooltip content */
.jamp-note-info-tooltip__content {
	display: none !important;
	width: 150px !important;
	background-color: #555 !important;
	color: #ffffff !important;
	text-align: center !important;
	padding: 5px 5px 10px 5px !important;
	border-radius: 5px !important;
	white-space: normal;

	position: absolute !important;
	z-index: 10 !important;
	box-sizing: border-box !important;
}

.jamp-note-info-tooltip__content--top {
	bottom: 100% !important;
	left: 50% !important;
	margin-left: -75px !important;
}

.jamp-note-info-tooltip__content--left {
	top: -20px !important;
	bottom: auto !important;
	right: 125% !important;
}

.jamp-note-info-tooltip__label {
	font-weight: 700 !important;
	line-height: 1 !important;
	display: block;
	margin-bottom: 5px !important;
}

.jamp-note-info-tooltip__field {
	line-height: 1 !important;
	display: block;
}

.jamp-note-info-tooltip__field:not(:last-child) {
	margin-bottom: 10px !important;
}

/* Tooltip arrow */
.jamp-note-info-tooltip__content:after {
	content: "";
	position: absolute !important;
	top: 100% !important;
	left: 50% !important;
	margin-left: -5px !important;
	border-width: 5px !important;
	border-style: solid !important;
	border-color: #555 transparent transparent transparent !important;
}

.jamp-note-info-tooltip__content.jamp-note-info-tooltip__content--left:after {
	top: 32px !important;
	left: 100% !important;
}

/* Show the tooltip */
.jamp-note-info-tooltip:hover .jamp-note-info-tooltip__content {
	display: block !important;
}

/*
* NOTES ADMIN SCREEN
*/
.post-type-jamp_note th.column-jamp_color {
	width: 5%;
}
