@import "./edit-button/style.pcss";

.tribe-editor__rsvp-container {
	background-color: #fff;
}

.tribe-editor__rsvp {
	font-family: "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
	position: relative;


	.tribe-editor {

		&__ticket__capacity-label {
			width: 90px;
		}
	}

	.components-spinner {
		float: none;
		left: 50%;
		margin: 0;
		opacity: 0.8;
		position: absolute;
		top: 50%;
		transform: translate(-50%, -50%);
	}

	&--selected.tribe-editor__rsvp--add-edit-open {
		border: none;
		padding: 0;
	}
}

.tribe-editor__inactive-block__icon {
	align-items: center;
	display: flex;
	flex-direction: column;

	> svg {
		flex: none;
	}
}

.tribe-editor__rsvp__inactive-block-icon-label {
	color: var(--tec-color-text-disabled);
	flex: none;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.05px;
	line-height: 19px;
}

.tribe-editor__card.tribe-editor__inactive-block--rsvp {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}

.tribe-editor__inactive-block--rsvp {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	width: 100%;

	.tribe-editor__rsvp-details-wrapper {
		align-items: center;
		display: flex;
		flex: none;
		justify-content: center;
		padding: var(--tec-spacer-6);
		width: calc(var(--tec-grid-width-1-of-8) * 5);
	}

	.tribe-editor__rsvp-details {
		width: 100%;
	}

	.tribe-editor__rsvp-description {
		color: var(--tec-color-text-secondary);
		font-size: var(--tec-font-size-1);
		margin-top: var(--tec-spacer-1);
	}

	.tribe-editor__rsvp__content-wrapper {
		padding: var(--tec-spacer-5);
	}

	.tribe-editor__rsvp-disabled-text {
		color: var(--tec-color-text-secondary);
		font-size: var(--tec-font-size-3);
		margin-top: var(--tec-spacer-1);
	}

	.tribe-editor__rsvp-actions-wrapper {
		align-items: center;
		border-left: 1px dashed var(--tec-color-border-secondary);
		display: flex;
		flex: none;
		justify-content: center;
		padding: 0 var(--tec-spacer-5) 0 var(--tec-spacer-4);
		text-align: center;

		@media screen and (min-width: 1024px) {
			padding: 0 var(--tec-spacer-5) 0 var(--tec-spacer-9);
		}
	}

	.tribe-editor__rsvp-actions {
		border-top: 0;
		height: 100%;
		margin-top: 0;
		padding: 0;
		width: 100%;

		.tribe-common-c-btn {
			text-wrap: nowrap;
			width: 125px;
		}

		.tribe-editor__rsvp-actions-rsvp {
			align-items: center;
			display: flex;
			height: 100%;

			.tribe-editor__rsvp-actions-rsvp-create {
				display: flex;
				flex-direction: column;
				height: 100%;
				justify-content: space-between;
			}

			.tribe-editor__rsvp__action-button {
				padding: var(--tec-spacer-3) 0 0 0;
			}
		}
	}

	#add-rsvp {
		margin: auto;
	}
}

/* -------------------------------------------------------------------------
   RSVP disabled / loading muted styles
   ------------------------------------------------------------------------- */

.tribe-editor__rsvp-container--disabled {

	.tribe-editor__rsvp-container-header__title,
	.tribe-editor__rsvp-container-header__description,
	.tribe-editor__numeric-label.tribe-editor__rsvp-container-header__capacity-label,
	.tribe-editor__rsvp-container-header__capacity-label-fallback,
	.tribe-editor__rsvp-container-content__capacity-label,
	.tribe-editor__rsvp-container-content__not-going-responses .tribe-editor__checkbox__label,
	.tribe-editor__rsvp__attendee-registration-label-with-modal .tribe-editor__labeled-item__label,
	.tribe-editor__rsvp__attendee-registration-helper-text,
	.tribe-editor__rsvp-container__icon-label,
	.tribe-editor__rsvp-duration__duration-label .tribe-editor__labeled-item__label,
	.tribe-editor__rsvp__advanced-options-header-text,
	.tribe-editor__date-time-range-picker__separator {
		color: var(--tec-color-text-disabled);
	}

	svg.tribe-editor__rsvp-duration__duration-tooltip-label,
	svg.tribe-editor__rsvp__advanced-options-header-icon {
		fill: var(--tec-color-icon-disabled);
	}
}

.tribe-editor__rsvp .tribe-editor__rsvp-container .tribe-editor__rsvp-container-content__capacity-input:disabled {
	color: var(--tec-color-text-disabled);
}

.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input:disabled,
.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input:disabled:hover,
.tribe-editor__rsvp .tribe-editor__rsvp-container-header__title-input:disabled:focus,
.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input:disabled,
.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input:disabled:hover,
.tribe-editor__rsvp .tribe-editor__rsvp-container-header__description-input:disabled:focus {
	background-color: transparent;
	color: var(--tec-color-text-disabled);
}

.tribe-editor__rsvp--loading {

	.tribe-editor__warning-button-text {
		color: var(--tec-color-text-disabled);
	}

	svg.tribe-editor__warning-button-icon {
		fill: var(--tec-color-icon-disabled);
	}
}

.tribe-editor__rsvp__settings-dashboard--loading {

	.tribe-editor__settings-dashboard__header-left-text {
		color: var(--tec-color-text-disabled);
	}

	.tribe-editor__settings-dashboard__header-left > svg,
	.tribe-editor__settings-dashboard__header-left > svg path {
		fill: var(--tec-color-icon-disabled);
	}
}

.edit-post-visual-editor .editor-block-list__block .tribe-editor__rsvp__settings-dashboard--loading {

	.tribe-editor__image-upload__title,
	.tribe-editor__image-upload__content p.tribe-editor__image-upload__description {
		color: var(--tec-color-text-disabled);
	}
}

/* Mirrors the disabled Tickets block; its styles live in the Tickets bundle. */
.tribe-editor__card.tribe-editor__rsvp-not-supported {
	padding-bottom: var(--tec-spacer-4);

	.tickets-heading {
		font-family: var(--tec-font-family-sans-serif);
		font-size: var(--tec-font-size-7);
		font-weight: var(--tec-font-weight-regular);
		line-height: var(--tec-line-height-1);
		margin-top: var(--tec-spacer-5);
		padding-bottom: var(--tec-spacer-1);
	}

	.tickets-row-line {
		border-bottom: 1px solid var(--tec-color-border-secondary);
	}

	.tribe-editor__notice {
		margin-top: var(--tec-spacer-3);

		p {
			margin: 0;
		}
	}

	a.helper-link {
		color: var(--tec-color-link-accent);
		font-size: var(--tec-font-size-2);
	}
}
