/* -----------------------------------------------------------------------------
   Group Create Post Modal Actions
   ----------------------------------------------------------------------------- */

.groups.group-home,
.groups.single-item {
	& #bp-nouveau-activity-form.bond-group-create-post-modal {
		& #editor-toolbar {
			display: flex;
			align-items: center;
			justify-content: space-between;
			flex-wrap: nowrap;
			gap: 10px;
			padding: 10px 25px;
			background: #fff;
			border-top: 0;

			& .post-emoji .emojionearea-editor {
				display: none !important;
			}

			& .post-elements-buttons-item {
				display: inline-flex;
				align-items: center;
				margin: 0;
			}

			& .show-toolbar {
				display: none !important;
			}

			& .post-mention {
				order: 2;
				margin-left: auto;
				align-self: center;
			}

			& .post-emoji {
				order: 3;
				align-self: center;

				& .emojionearea,
				& .emojionearea-button {
					display: inline-flex;
					align-items: center;
					justify-content: center;
					width: 24px;
					height: 24px;
					margin: 0;
					padding: 0;
					border: 0;
					background: transparent;
					box-shadow: none;
				}

				& .emojionearea-button-open {
					background-position: center;
				}

				& .emojionearea-picker.emojionearea-picker-position-bottom {
					top: calc(100% + 10px);
					left: auto;
					right: 0;
					margin-top: 0;
				}
			}

			& .toolbar-button,
			& .post-emoji .emojionearea-button {
				color: #37322d;
				display: inline-flex;
				align-items: center;
				justify-content: center;
				height: 24px;
			}

			& .toolbar-button i,
			& .toolbar-button .bb-icon-l,
			& .post-emoji .emojionearea-button-open:before {
				font-size: 24px;
				line-height: 1;
			}
		}

		& .medium-editor-toolbar {
			display: flex !important;
			position: relative !important;
			top: auto !important;
			left: auto !important;
			right: auto !important;
			transform: none !important;
			align-items: center;
			flex: 1 1 auto;
			order: 1;
			min-width: 0;
			width: auto !important;
			max-width: none !important;
			padding: 0;
			border: 0 !important;
			background: transparent !important;
			box-shadow: none !important;
			visibility: visible !important;
			opacity: 1 !important;
			overflow: visible !important;

			& .medium-editor-toolbar-actions {
				display: flex !important;
				align-items: center;
				flex-wrap: nowrap;
				gap: 4px;
				margin: 0;
				padding: 0;
				background: transparent;
				overflow-x: auto;
			}

			& li {
				margin: 0;
				padding: 0;
				list-style: none;
			}

			& .medium-editor-action {
				display: inline-flex;
				align-items: center;
				justify-content: center;
				width: 30px;
				min-width: 30px;
				height: 35px;
				padding: 0;
				border: 0;
				border-radius: 50px;
				background: transparent;
				color: #797667;
				box-shadow: none;

				&:hover,
				&:focus-visible,
				&.medium-editor-button-active {
					background: #f4f4f2;
					color: var(--color-bond-red-darker);
				}

				& b {
					display: inline-flex;
					align-items: center;
					justify-content: center;
					width: 24px;
					height: 24px;
					font-size: 0;
					line-height: 0;
					color: inherit;
				}

				& b:before {
					color: inherit;
				}

				&.medium-editor-action-h3:after,
				&.medium-editor-action-h4:after {
					color: currentColor;
					line-height: 1;
				}
			}

			& .medium-editor-toolbar-form {
				display: none;
			}

			& .medium-editor-toolbar-form.medium-editor-toolbar-form-active {
				display: flex;
				align-items: center;
				gap: 10px;
				position: absolute;
				left: 0;
				bottom: calc(100% + 12px);
				z-index: 40;
				flex: 0 0 auto;
				width: 360px;
				max-width: min(360px, calc(100vw - 64px));
				padding: 12px;
				border: 1px solid #d2d0c8;
				border-radius: 8px;
				background: #fff;
				box-shadow: 0 10px 30px rgba(18, 43, 70, 0.14);
			}

			& .medium-editor-toolbar-form.medium-editor-toolbar-form-active:after {
				content: "";
				position: absolute;
				left: calc(50% - 8px);
				bottom: -8px;
				width: 16px;
				height: 16px;
				border-right: 1px solid #d2d0c8;
				border-bottom: 1px solid #d2d0c8;
				background: #fff;
				transform: rotate(45deg);
			}

			& .medium-editor-toolbar-input {
				height: 35px;
				min-width: 0;
				width: 100%;
				margin: 0;
				padding: 8px 16px;
				border: 1px solid #d2d0c8;
				border-radius: 6px;
				background: #fff;
				color: #37322d;
				font: 400 15px/19px "DINNextRoundedLTProRegular", arial, sans-serif;
				box-shadow: none;

				&::placeholder {
					color: #797667;
					opacity: 1;
				}

				&:focus {
					border-color: var(--color-bond-red-darker);
					outline: none;
					box-shadow: 0 0 0 1px rgba(162, 0, 38, 0.15);
				}

				&.isNotValid {
					border-color: var(--color-bond-red-darker);
				}
			}

			& .medium-editor-toolbar-save,
			& .medium-editor-toolbar-close {
				display: inline-flex;
				align-items: center;
				justify-content: center;
				width: 48px;
				height: 48px;
				margin: 0;
				font-size: 0;
				line-height: 0;
				border-radius: 14px;
				background: var(--color-bond-red-darker);
				color: #fff;
				text-decoration: none;
				transform: none;
				box-shadow: 0 6px 18px rgba(162, 0, 38, 0.18);

				&:before {
					font-family: "bb-icons";
					font-size: 24px;
					line-height: 1;
				}

				&:hover,
				&:focus-visible {
					background: var(--color-bond-red-darkest);
					color: #fff;
				}
			}

			& .medium-editor-toolbar-save:before {
				content: "\e876";
			}

			& .medium-editor-toolbar-close:before {
				content: "\e828";
			}
		}

		& .whats-new-form-footer {
			display: flex;
			align-items: center;
			justify-content: space-between;
			gap: 16px;
			padding: 10px 25px;
			border-top: 1px solid #eee;
			background: #f9f9f9;
			overflow: visible;
		}

		& #whats-new-toolbar {
			display: flex;
			align-items: center;
			flex: 0 0 auto;
			gap: 10px;
			padding: 0;
			background: transparent;
			border: 0;

			& .post-video,
			& .post-gif,
			& .bb-post-poll-button {
				display: none !important;
			}

			& .toolbar-button {
				display: inline-flex;
				align-items: center;
				justify-content: center;
				width: 24px;
				height: 24px;
				padding: 0;
				border: 0;
				background: transparent;
				color: #545246;
				text-decoration: none;

				& i {
					font-size: 24px;
					line-height: 1;
				}
			}
		}

		& #activity-form-submit-wrapper {
			display: flex;
			align-items: center;
			justify-content: flex-end;
			flex: 1 1 auto;
			flex-wrap: nowrap;
			gap: 10px;
			min-height: 44px;
			min-width: 0;
			overflow: visible;

			& #bb-poll-form,
			& #bb-activity-post-feature-image,
			& #discard-draft-activity,
			& #aw-whats-new-reset {
				display: none !important;
			}
		}

		& .whats-new-topic-selector {
			display: inline-flex;
			order: 2;
			margin: 0;
			position: relative;
			visibility: visible;
			flex: 0 1 auto;
			z-index: 5;

			& .bb-topic-selector-button {
				display: inline-flex;
				align-items: center;
				justify-content: flex-start;
				min-height: 34px;
				min-width: 194px;
				max-width: 240px;
				padding: 8px 36px 6px 13px;
				border: 1.2px solid #8a0026;
				border-radius: 4px;
				background: #fff;
				color: #8a0026;
				font: 400 15px/16.5px "DINNextRoundedLTProRegular", arial, sans-serif;
				text-decoration: none;
				cursor: pointer;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
				position: relative;
			}

			& .bb-topic-selector-button:after {
				content: "\e826";
				font-family: "bb-icons";
				font-size: 20px;
				line-height: 1;
				position: absolute;
				top: 50%;
				right: 8px;
				transform: translateY(-50%);
			}

			& .bb-topic-selector-list {
				left: auto;
				right: 0;
				top: calc(100% + 8px);
				min-width: 220px;
				z-index: 50;
				border: 1px solid var(--color-border);
				border-radius: 4px;
				background: #fff;
				box-shadow: 0 6px 24px rgba(18, 43, 70, 0.1);

				& ul {
					margin: 0;
					padding: 8px 0;
					list-style: none;
				}

				& a {
					display: block;
					padding: 8px 14px;
					color: #37322d;
					font: 400 15px/1.4 "DINNextRoundedLTProRegular", arial, sans-serif;
					text-decoration: none;

					&:hover,
					&:focus-visible,
					&.selected {
						background: #f4f4f2;
						color: var(--color-bond-red-darker);
					}
				}
			}
		}

		& .bb-schedule-posts {
			order: 1;
			margin: 0;
			flex: 0 0 auto;

			& .bb-schedule-post_dropdown_section {
				display: flex;
				align-items: center;
				margin: 0;

				&.bp-hide {
					display: none !important;
				}
			}

			& .bb-schedule-post_dropdown_button {
				display: inline-flex;
				align-items: center;
				justify-content: center;
				width: 34px;
				height: 34px;
				padding: 0;
				border: 1px solid var(--color-border);
				border-radius: 4px;
				background: #fff;
				color: #545246;
				text-decoration: none;
			}

			& .bb-schedule-post_dropdown_list {
				left: auto;
				right: 0;
				margin-top: 8px;
				border: 1px solid var(--color-border);
				border-radius: 4px;
				background: #fff;
				box-shadow: 0 6px 24px rgba(18, 43, 70, 0.1);
			}
		}

		& #whats-new-submit {
			display: flex;
			order: 3;
			margin: 0;
			flex: 0 0 auto;

			& .bb-title-tooltip-wrapper {
				display: none;
			}

			& #aw-whats-new-submit {
				height: 34px;
				padding: 8px 22px 6px;
				border: 1px solid var(--color-bond-red-darker);
				border-radius: 4px;
				background: var(--color-bond-red-darker);
				color: #fff;
				font: 400 15px/16.5px "DINNextRoundedLTProRegular", arial, sans-serif;
				box-shadow: none;

				&:hover,
				&:focus-visible,
				&:active {
					border-color: var(--color-bond-red-darkest);
					background: var(--color-bond-red-darkest);
				}

				&:disabled {
					border-color: #d2d0c8;
					background: #d2d0c8;
					color: #797667;
					opacity: 1;
				}
			}
		}

		& #whats-new-form.focus-in--empty #aw-whats-new-submit,
		& #whats-new-form.media-uploading #aw-whats-new-submit {
			border-color: #d2d0c8;
			background: #d2d0c8;
			color: #797667;
			opacity: 1;
		}
	}
}

@media (max-width: 680px) {
	.groups.group-home #bp-nouveau-activity-form.bond-group-create-post-modal,
	.groups.single-item #bp-nouveau-activity-form.bond-group-create-post-modal {
		& #activity-header,
		& #user-status-huddle.bp-activity-huddle,
		& #whats-new-content,
		& #editor-toolbar,
		& .whats-new-form-footer,
		& #whats-new-attachments {
			padding-left: 16px;
			padding-right: 16px;
		}

		& .whats-new-form-footer {
			flex-wrap: wrap;
		}

		& #whats-new-form {
			width: calc(100vw - 16px);
		}

		& #activity-form-submit-wrapper {
			width: 100%;
			flex-wrap: wrap;
		}

		& .whats-new-topic-selector,
		& #whats-new-submit {
			width: 100%;
		}

		& .whats-new-topic-selector .bb-topic-selector-button,
		& #whats-new-submit #aw-whats-new-submit {
			width: 100%;
			justify-content: center;
		}
	}
}
