@import 'react-datepicker.css';

/* Fix */
.block-editor-block-icon img[src*="content-views"] {
	max-width: 30px !important;
	max-height: 30px !important;
}

.contentviews-panelbody .components-base-control {
	margin-bottom: 8px;
}

/* Restyle elements */
.components-panel__body-toggle.components-button {
	font-size: 15px;
}

.contentviews-panelbody > div > *, div[id*="subtab2"] > div > * {
	margin-bottom: 15px !important;
}

.relative-wrapper .cvb-label {
	margin-bottom: 5px;
}

.cvb-label span.dashicon {
	color: #999;
}

.cvb-components-wrapper .components-button-group {
	display: flex;
}
.cvb-components-wrapper .components-button-group .components-button {
	flex: 1;
	justify-content: center;
}

.cvb-layouts-list img {
	width: 100%;
	max-height: 59px;
	min-height: 56px;
	border: 1px solid #e9e9e9;
	padding: 2px;
	/*border-radius: 3px;*/
	opacity: 0.8;
	/*	filter: grayscale(1);*/
	filter: grayscale(0) contrast(0.8);
}
.cvb-layouts-list img[src*="overlay"] {
	filter: grayscale(1) contrast(1);
}

.contentviews-panelbody {
	margin-top: 10px;
}

#contentviews-panel-live-filter > button::after,
#contentviews-panel-query > button::after {
    font-family: dashicons;
    margin-left: 6px;
    font-size: 20px;
    color: #666;
    content: "\f179";
}

#contentviews-panel-live-filter > button::after {
	font-size: 16px;
	content: "\f536";
}

.cv-tab-panel .components-tab-panel__tabs {
	border: 1px solid #f3f3f3;
}
.contentviews-panelbody .components-tab-panel__tabs {
	background: #fdfdfd;
	border: 1px solid #ddd;
}
.cv-tab-panel .components-tab-panel__tabs-item,
.contentviews-panelbody .components-tab-panel__tabs-item
{
	display: inline-block;
	width: 50%;
	text-align: center;
}

.contentviews-panelbody .components-tab-panel__tabs-item.is-active {
	background-color: #f1f1f1;
}

.cvb-subpanel .cvb-components-wrapper > .components-base-control:last-child,
.cvb-components-wrapper.cvb-orderby,
.contentviews-panel .components-button .components-checkbox-control,
.contentviews-panel .components-button .components-checkbox-control .components-base-control__field
{
	margin-bottom: 0 !important;
}

/* Pro label when adding block */
.editor-block-list-item-contentviews-timeline > span:first-child::before,
.editor-block-list-item-contentviews-pinterest > span:first-child::before,
.editor-block-list-item-contentviews-overlay8 > span:first-child::before{
    content: 'PRO';
    background: #E90E68;
    color: #fff;
    padding: 0px 3px;
    border-radius: 3px;
    float: right;
    position: absolute;
    top: 0px;
}

/* Popup */
#contentviews-toolbar-button {
    order: 1;
    margin-right: 8px;
}

#contentviews-toolbar-button button {
    display: inline-flex;
    text-decoration: none;
    font-family: inherit;
    /*font-weight: 600;*/
    font-size: 14px;
    margin: 0;
    border: 1px solid #ffe3e4;
    cursor: pointer;


    transition: box-shadow .1s linear;
    height: 38px;
    align-items: center;

    padding: 6px 10px;
    border-radius: 3px;

    min-width: 190px;
    justify-content: center;

    background: #fffaf6;

    text-shadow: none;
    outline: 1px solid transparent;
}
#contentviews-toolbar-button button:hover {border: 1px solid #ff5a5f;}
#contentviews-toolbar-button img {
	height: 20px;
	margin-right: 10px;
}

.contentviews-block-popup {
	position: fixed;
	display: block;
	width: 100%;
	height: 100%;
	top: 0;
    left: 0;
	right: 0;
    bottom: 0;
	background-color: rgba(0,0,0,.5);
	z-index: 999999;
}

#contentviews-popup-content {
	position: relative;
	max-width: 90%;
	height: 90%;
	margin: 30px auto;
	overflow-y: auto;
	background: #fff;
	padding: 0 30px;
	font-size: 14px;
}

.cvb-close-btn1 {
	position: absolute;
	top: 15px;
	right: 20px;
}
.cvb-close-btn1 .dashicon {
	font-size: 30px;
}

.cvb-popup-header h3 {
	text-align: center;
	margin: 1em 0;
}

.cvb-popup-tag {
	position: relative;
	text-align: center;
}

.cvb-popup-tag > * {
	display: inline-block;
	font-size: 30px;
	padding: 8px 24px;
	border: 1px solid #e1e1e1;
	line-height: 1;
}

.cvb-popup-filter li,
.cvb-popup-tag div,
.cvb-close-btn1,
.cvb-popup-right .dashicon,
#contentviews-popup-content button {
	cursor: pointer;
}

#contentviews-popup-content .pactive {
	background: #ff5a5f;
	color: #fff;
}

.cvb-popup-right {
	text-align: right;
	margin-top: 10px;
}
.cvb-popup-right button {
	text-align: right;	
	margin-left: 5px;
	border: 1px solid #ddd;
	padding: 5px 15px;
}
.cvb-popup-right input {
	border-radius: 0;
}
.cvb-popup-right .dashicon {
	font-size: 30px;
	margin-right: 15px;
	color: #a1a1a1;
}

.cvb-popup-body > div {
	display: grid;
	grid-template-columns: 150px auto;
	grid-column-gap: 25px;
	margin-top: 20px;
}

.cvb-popup-content {
	display: grid;
	grid-template-columns: repeat(4,1fr);
	grid-gap: 25px;
	margin: 1em 0;
	grid-auto-rows: max-content;
}
.cvb-popup-content.isexpand {
	grid-template-columns: repeat(2,1fr);
}

.cvb-popup-content a {
	text-decoration: none;
	position: relative;
}

.cvb-popup-item {
	/*border: 1px solid #e1e1e1;*/
	padding: 10px;
	box-shadow: 0 0 10px 0px #cfcfcf; /* 0 0 5px 0px #e3e3e3; */
	position: relative;
	display: grid;
	align-items: end;
}

.cvb-popup-item:hover img {
	filter: brightness(0.9);
}

.cvb-popup-item img {
	width: 100%;
	max-width: 100% !important;
}

.cvb-popup-item a span {
	position: absolute;
	right: 0;
	top: 0;
	color: #fff;
	background-color: #4CAF50;
	padding: 2px 6px;
	border-radius: 2px;
}

.cvb-popup-item a span.ispro {
	background-color: #E90E68;
}

/* preview overlay */
.cvb-popup-item:hover>a::before {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: dashicons;
    content: '\f504';
    z-index: 1;
    font-size: 50px;
    opacity: 1!important;
    color: #fff;
    background-color: transparent!important;
    filter: drop-shadow(2px 4px 6px black);
}

.cvb-popup-item:hover>a::after,
.cvb-popup-item:hover>a::before {
    position: absolute;
    right: 0;
    top: 0;
    background-color: #666;
    opacity: .8;
    width: 100%;
    height: 100%
}


.cvb-popup-filter li {
	text-transform: capitalize;
	padding: 5px 10px;
	margin-bottom: 5px;
}

.contentviews-popup-import.importing {
	pointer-events: none;
	cursor: default;
	opacity: 0.5;
}

.contentviews-popup-update {
	font-size: 20px;
	position: absolute;
	right: 0px;
	padding-right: 0;
	border: none;
	cursor: pointer;
}

.cvb-popup-item-footer {
	padding: 10px 0;
}

.cvb-popup-item-footer span {
	margin-right: 10px;
}

.cvb-popup-item-footer a {
	padding: 5px 10px;
    color: #fff;
    border: none !important;
    box-shadow: none;
    background: #2196F3;
    border-radius: 4px;
	float: right;
	cursor: pointer;
}
.contentviews-popup-import {
	background: #4CAF50 !important;
}

/* Prevent too much sparkling when re-render */
[data-type="contentviews/grid1"] > div > div > div[style*="opacity"] {
	opacity: 0.8 !important;
}

.contentviews-panelheader {
	position: relative;
	background: #f6f6f6;
    margin-bottom: 3px;
}
.contentviews-panelheader button {
	border-bottom: 1px solid #e0e0e0 !important;
}
.contentviews-panelextra {
	position: absolute;
    top: 10px;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}
.contentviews-panelextra .components-checkbox-control {
	display: inline-block !important;
	margin: 0 !important;
}

.cvb-active {outline: 2px solid var(--wp-components-color-accent, var(--wp-admin-theme-color, #3F51B5)) !important;}

/*.pt-cv-wrapper * {
	pointer-events: none !important;
}*/

/*
.contentviews-panelbody .components-select-control,
.contentviews-panelbody .components-custom .components-base-control__field,
*/
.components-half
{
    align-items: center;
    display: grid;
    grid-template-columns: 50% 50%;
    color: #50575E;
    gap: 0;
    margin-bottom: 10px;
}

.cvb-color-indicator {
	grid-template-columns: 60% auto 25px;
	align-items: end;
}

.cvb-color-indicator > *:not(:first-child) {
	justify-self: end;
}
/*
.contentviews-panelbody .components-select-control label,
.contentviews-panelbody .components-half label,
.contentviews-panelbody .components-custom .components-base-control__field label
{
	margin-right: 0;
}*/

.components-half .cvb-upgrade-link {
	grid-area: 2 / 1 / 3 / 3;
}

.components-half .components-button {
	padding: 6px 10px;
}

.contentviews-panelbody .components-button-group .components-button {
	height: 30px;
}

.contentviews-panelbody label.components-base-control__label {
	text-transform: none;
	margin-right: 0;
}

/* Component wrapper label + field */
.cvb-components-wrapper {
	display: flex;
    align-items: normal;
    flex-direction: column;
    gap: calc(8px);
    -webkit-box-pack: justify;
    justify-content: space-between;
    /*height: 100%;*/
    position: relative;
    border-radius: 2px;
    padding-top: 0px;

	margin-bottom: 10px!important;
}

.contentviews-panelbody .components-select-control {
	height:auto !important
}

.contentviews-panelbody .components-base-control__label,
.contentviews-panelbody .components-input-control__label,
.cvb-subpanel .components-button,
.cvb-label
{
	font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: capitalize !important;
    box-sizing: border-box;
    display: block;
    padding-top: 0px;
    padding-bottom: 0px;
    max-width: 100%;
    z-index: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: pre-wrap;
}

.contentviews-panelbody .cvb-mb8 {
	margin-bottom: 8px !important;
}

/* Fix: Sort > Custom Field > Field dropdown shows under Author */
.cvb-subpanel {
	z-index: 1 !important;
}

/* Fix: Sort > Custom Field > Field dropdown shows under Live Sort */
.cvb-order ~ .cvb-subpanel ~ .cvb-subpanel {
	z-index: 0 !important;
}

/* Fix: Categories/Post Include/Exclude dropdown shows under Sort subpanel */
[id^="react-select"][id$="listbox"] {
	z-index: 999 !important;
}

.cvb-subpanel .components-panel__body {
	border-top: none;
}

.cvb-subpanel .components-button {
	padding: 10px 0;	
}

.cvb-subpanel .components-panel__arrow {
	background: #ddd;
	color: #333 !important;
}

.cvb-subpanel .components-panel__body:not(.is-opened) .components-panel__arrow {
	right: 0;
}

.cvb-subpanel .components-panel__body.is-opened {
	padding-right: 0;
}

.cvb-subpanel .components-panel__body .components-base-control__field {
	padding: 5px 0 0;
}

.cvb-subpanel .upgrade-wrapper {
	margin-left: -15px;
}

.cvb-livefilter-style .components-button-group .components-button {
	display: inline-flex;
	padding: 8px;
}

/* Margin padding */
.marpad-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.marpad-input {
	display: flex;
    flex-direction: column;
    width: 24%;
}
.marpad-input input {
	border-color: #ddd !important;
	text-align: center;
	margin: 0 -1px 0 0;
	border-radius: 0;
}
.marpad-label {
	text-align: center;
}
.marpad-container .dashicon {
	font-size: 15px;
    align-items: center;
    display: flex;
    height: 30px!important;
	padding: 3px;
}

/* Box shadow */
.cvb-boxsd-popover {
	padding: 10px;
}
.cvb-boxsd-popover .marpad-container {
	display: grid;
	grid-template-columns: 1fr 50px;
}
.cvb-boxsd-popover .marpad-input {
	flex-direction: row-reverse;
	justify-content: space-between;
	width: 100%;
	margin: 5px;
}
.cvb-boxsd-popover .marpad-container .dashicon {
	align-self: center;
    grid-area: 1 / 2 / 5 / 3;
    margin: 10px;
    height: 94% !important;
    padding: 6px;
    width: 30px;
    background: #f3f3f3;
}
.cvb-boxsd-popover .cvb-label {
	margin-left: 5px;
	font-weight: normal;
}
.cvb-boxsd-popover .marpad-label {
	text-align: left;
}

/* Responsive buttons, units */
.relative-wrapper {
	position: relative;
}

.cvb-responsive-buttons {
	position: absolute;
    top: 0;
	right: 40px;
}

.cvb-responsive-buttons .dashicon {
	font-size: 16px;
	height: 16px;
}

.cvp-typo .dashicon {
	font-size: 23px;
}

.cvb-units {
	position: absolute;
    top: -1px;
	right: 0px;
}

.cvb-units button {
	height: 20px;
	box-shadow: none !important;
	color: #2196F3;
	padding: 0 6px !important;
	border: 1px solid #bbb;
}
.cvb-units button.components-button {
	background: #f8f8f8;
	text-transform: none !important;
}

.cvb-responsive-buttons .cvb-active, .cvb-units button {
	outline: 1px solid #03A9F4;
}

.cvb-layouts-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-gap: 10px;
	align-items: start;
}

.cvb-layouts-list div {
	position: relative;
	margin-bottom: 15px;
}

.cvb-layouts-list div span {
	position: absolute;
	background-color: #E90E68;
    color: #fff;
    right: -5px;
    top: -16px;
    z-index: 1;
    padding: 0 3px;
    border-radius: 3px;
}

/* Others */
.contentviews-panelbody .component-color-indicator, .cvb-boxsd-popover .component-color-indicator {
	width: 25px;
	height: 25px;
}

.cvb-typo .dashicon, .component-color-indicator, .marpad-container .dashicon, .cvb-responsive-buttons .dashicon, .cvp-typo .dashicon,
.contentviews-panelbody .dashicon,
.cvb-units-popover div,
.cvb-layouts-list > div {
	cursor: pointer;
}

.components-popover, .cvb-units-popover {
	padding: 2px;
}

.components-popover .components-popover__content {
	border-radius: 0;
}

.cvb-color-popover, .cvb-typo-popover, .cvb-gradient-popover, .cvb-livefilter-popover {
	padding: 10px;
	min-width: 230px;
}

.cvb-color-popover .react-colorful__saturation {
	max-height: 120px;
}

.upgrade-wrapper {
	background: rgb(255 106 111 / 3%);
	padding: 5px;
	border: 1px solid #f6f6f6;
}

.upgrade-wrapper:not(.contentviews-panelbody) .components-toggle-control {
	margin-left: -5px;
}

.cvb-taxonomy .components-base-control + .upgrade-wrapper {
    margin-top: -20px !important;
}

.contentviews-panelbody .cvb-upgrade-link {
	margin-bottom: 0;
}

.upgrade-wrapper:not(.contentviews-panelbody) .components-base-control {
	margin-bottom: 0 !important;
}

.upgrade-wrapper.contentviews-panelbody .cv-tab-panel {
	opacity: 0.5 !important;
	pointer-events: none !important;
}
.upgrade-wrapper.contentviews-panelbody .cvb-upgrade-link {
	margin-top: 20px;
}

option:disabled {
	background: rgb(255 106 111 / 10%);
}

.contentviews-panelbody .components-range-control {
	margin-bottom: 20px !important;
}

.contentviews-panelbody .components-range-control__reset {
	font-size: 0;
	padding: 0;
	border: none;
	box-shadow: none !important;
}

.contentviews-panelbody .components-range-control__reset::before {
	font-family: dashicons;
	content: "\f531";
	font-size: 14px;
	color: #999;
}

.cvb-gradient-popover {
	width: 280px;
}

.cvb-gradient-popover .components-flex.components-custom-gradient-picker__ui-line {
	align-items: baseline;
}

.cvb-toggle-wrapper {
	position: relative;
}

.cvb-toggle-wrapper .cvb-upgrade-simple {
	position: absolute;
	top: 5px;
	right: 5px;
}

.cvb-toggle-wrapper p {
	margin: 10px 0 0 -5px !important;
}

/* Parent page option */
.cvb-components-wrapper [class*="singleValue"] {
	background-color: hsl(0, 0%, 90%);
	padding: 3px 6px;
}

/* Hide upgrade text if no taxonomy for post type */
.cvb-taxoWhich > .cvb-upgrade-link:first-child {
	display: none;
}

.cvb-livefilter-search,
.cvb-taxonomy-extra,
.cvb-components-wrapper[class*="cvb-orderCtf"]
{
	margin-left: 15px;
}
.cvb-taxonomy-operator .components-select-control,
.cvb-components-wrapper[class*="cvb-orderCtf"] .components-select-control
{
	align-items: center;
	flex-direction: row;
}


.cvb-fieldsPosition div[data-id] {
	border: 1px solid #ddd;
	margin: 5px 0;
	padding: 5px 10px;
	cursor: move;
	border-radius: 2px;
}
.cvb-fieldsPosition > div:nth-child(2) {
	background: #fdfdfd;
	padding: 10px 15px;
}
.cvb-fieldsPosition .sortable-ghost {
	opacity: 0.2;
}
.cvb-fieldsPosition .hidden {
	display: none;
	visibility: hidden;
}

.field-desc, .contentviews-panelbody .components-base-control__help {
	font-style: italic;
	color: #555;
}

/* Filter custom field */
.filter-ctf-item {
	border-bottom: 1px solid #ececec;
}
.filter-ctf-item .components-select-control,
.filter-ctf-item .filter-ctf-datepicker,
.filter-ctf-item > .components-base-control .components-base-control__field,
.cvb-filterCtfRel .components-select-control {
	flex-direction: row;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.filter-ctf-item .cvb-subpanel .components-select-control,
.filter-ctf-item .cvb-subpanel .components-base-control .components-base-control__field {
	flex-direction: column;
	align-items: baseline;
}
.filter-ctf-item .components-select-control > div:nth-child(2),
.filter-ctf-item .components-text-control__input,
.filter-ctf-item .react-datepicker__input-container input {
	width: 160px;
	max-width: 160px;
}
.filter-ctf-item .cvb-subpanel .components-select-control > div:nth-child(2),
.filter-ctf-item .cvb-subpanel .components-text-control__input,
.filter-ctf-item .cvb-subpanel .react-datepicker__input-container input {
	width: 100%;
	max-width: 100%;
}
.filter-ctf-item > div {
	margin-bottom: 5px;
}
.filter-ctf-add {
	margin: 10px 0;
}
.filter-ctf-remove {
	display: flex;
	justify-content: flex-end;
}
.filter-ctf-remove button {
	background: #fff;
	border-width: 1px;
	border-radius: 2px;
	cursor: pointer;
	color: red;
}
.filter-ctf-add ~ ul:empty {
	display: none;
}


.react-datepicker-popper {
	z-index: 99;
}

.cvb-notice {
	padding: 30px 16px;
	font-size: 15px;
	line-height: normal;
	background: #ffe6ec;
	border: 3px solid red;
}

.cvb-demo-link {
	text-align: center;
}
.cvb-demo-link a {
	text-decoration: none;
}

.cvb-alignment {
	margin-top: 20px;
}

.cvb-alignment .components-button {
	max-width: 33.3%;
}

.cvb-extraexclude .components-panel__body-title {
	display: none !important;
}

.cv-toolbar-btn svg {
	fill: #ff6a6f;
}

/* For output in editor only */
.cv-npf {
	grid-template-columns: auto !important;
}
.cv-npf .pt-cv-no-post:empty:after {
	content: "(Visible to admin only - you set empty text when no posts found)";
	color: #888;
}