/* ======================================================== */
/* CSS for control sap.m/OverflowToolbarAssociativePopover  */
/* Base theme                                               */
/* ======================================================== */

.sapMOTAPopover {

  &:focus{
	outline: none;
  }

  .sapMBtn .sapMBtnInner {
	justify-content: flex-start;
  }

  &.sapMPopover .sapMPopoverCont .sapMPopoverScroll {
	padding: 0.25rem 0.5rem;

	/* Disappear */
	&> .sapMOTAPHidden {
	  display: none;
	}

	/* All elements inside must have display block */
	&> :not(.sapMOTAPHidden) {
	  display: block;
	}

	&> .sapMTBSeparator.sapMTBSeparatorOverflowToolbar {
		&:first-child,
		&:last-child {
			display: none;
		}
	}

	/* Button, ToggleButton, OverflowToolbarButton */
	&> button.sapMBtn {
	  width: 100% !important;
	  max-width: 100% !important;

	  /* Button alignment */
	  &> .sapMBtnInner {
		text-align: start;
	  }
	}

	/* Select */
	&> div.sapMSlt {
	  width: auto !important;
	}

	/* SegmentedButton - select form */
	&> div.sapMSegBSelectWrapper {
	  width: 100% !important;
	  &> div.sapMSlt {
		width: 100% !important;
		max-width: 100% !important;
	  }
	}

	/* ComboBox */
	&> div.sapMComboBox {
	  width: auto !important;
	  max-width: auto !important;
	}

	/* SearchField */
	&> div.sapMSF {
	  width: 100% !important;
	  max-width: 100% !important;
	}

	/* Input */
	&> div.sapMInput {
	  width: 100% !important;
	  max-width: 100% !important;
	}

	/* DateTimeInput */
	&> div.sapMDTI {
	  width: 100% !important;
	  max-width: 100% !important;
	}

	/* Menu Button */
	&> .sapMMenuBtn {
		max-width: 100% !important;
	}
  }
}

/* Compact mode overrides */
.sapUiSizeCompact{

  .sapMOTAPopover {

	&.sapMPopover .sapMPopoverCont .sapMPopoverScroll {
	  padding: 0.1875rem 0.375rem;
	}

	.sapMBtnInner.sapMBtnIconFirst:not(.sapMBtnBack) {
	  padding-left: 0.5rem;
	  padding-right: 0.5rem;
	}
  }
}

/* Phone mode overrides */
html.sap-phone {
	.sapMOTAPopover {
	  overflow: hidden !important;
	}
}