/* ----------------------------------
 * Object menu
 * ---------------------------------- */

/* Main dialog setup */
[role="dialog"][data-type="object"] {
  display: flex;
  flex-direction: column;
  background-color: #2d2d2d;
  overflow: hidden;
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  color: #fff;
  font-size: 1.6rem;
}

[role="dialog"][data-type="object"] > header {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  height: 5rem;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-weight: normal;
  padding: 0 3rem;
  border-bottom: 0.1rem solid #616262;
}

[role="dialog"][data-type="object"] > header h1 {
  text-align: left;
  color: #fff;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  overflow: hidden;
  margin: 0;
  font-weight: normal;
}

/* Specific component code */
[role="dialog"][data-type="object"] > section {
  color: #fff;
  flex: 1;
  overflow: scroll;
}

/* subheaders */
[role="dialog"][data-type="object"] h2 {
  background-color: #242424;
  color: #858585;
  font-size: 1.4rem;
  font-weight: 500;
  padding: 1rem 3rem;
  margin: 0;
}

[role="dialog"][data-type="object"] ul {
  padding: 0;
  margin: 0;
}

[role="dialog"][data-type="object"] ul li {
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;
  margin: 0 1.5rem;
  padding: 1rem 1.5rem;
  min-height: 3.9rem;
  height: auto;
  list-style: none;
  font-size: 1.8rem;
  font-weight: 300;
  color: #fff;
  word-wrap: break-word;
  -moz-hyphens: auto;
  transition: background-color 0.2s ease;
}

[role="dialog"][data-type="object"] ul li.input {
  margin: 0;
}

[role="dialog"][data-type="object"] ul li:not(.input):before {
  position: absolute;
  content: "";
  top: 0;
  right: -1.5rem;
  bottom: 0;
  left: -1.5rem;
  z-index: -1;
}

[role="dialog"][data-type="object"] ul li:after {
  position: absolute;
  content: "";
  height: 0.1rem;
  top: 0;
  right: 0;
  left: 0;
  background-color: #666;
}

[role="dialog"][data-type="object"] ul li:first-child:after {
  display: none;
}

[role="dialog"][data-type="object"] ul + ul li:first-child:after {
  display: block;
}

[role="dialog"][data-type="object"] ul + ul li.input:first-child:after {
  left: 1.5rem;
  right: 1.5rem;
}

[role="dialog"][data-type="object"] ul li a {
  color: #fff;
  text-decoration: none;
}

[role="dialog"][data-type="object"] ul li button {
  font-family: sans-serif;
  color: #fff;
  border: none;
  background-color: transparent;
  text-align: left;
  font-size: 1.8rem;
  font-weight: 300;
  font-style: normal;
  padding: 0;
  margin: 0;
}

[role="dialog"][data-type="object"] ul li button[type="reset"] {
  font-size: 0;
}

[role="dialog"][data-type="object"] ul li p {
  outline: none;
  display: block;
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1.8rem;
  font-weight: normal;
}

[role="dialog"][data-type="object"] ul li p:first-child {
  font-size: 1.8rem;
  font-weight: 500;
}

[role="dialog"][data-type="object"] ul li p:empty {
  display: none;
}

/* Pressed status */
[role="dialog"][data-type="object"] ul li:active:before {
  background-color: #00aacc;
}

[role="dialog"][data-type="object"] ul li:not(.input):active:after,
[role="dialog"][data-type="object"] ul li:not(.input):active + li:after {
  display: none;
}

/* Menu & buttons setup */
[role="dialog"][data-type="object"] menu {
  display: flex;
  margin: 0;
  padding: 1.5rem;
  background-color: #4d4d4d;
}

[role="dialog"][data-type="object"] menu button::-moz-focus-inner {
  border: none;
  outline: none;
  margin-top: -0.2rem; /* To fix line-height bug (697451) */
}

[role="dialog"][data-type="object"] menu button {
  font-family: sans-serif;
  font-style: italic;
  width: 100%;
  height: 4rem;
  margin: 0;
  padding: 0 1.2rem;
  box-sizing: border-box;
  display: inline-block;
  vertical-align: middle;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  background: #d8d8d8;
  border: none;
  border-radius: 2rem;
  font-weight: normal;
  font-size: 1.6rem;
  line-height: 4rem;
  color: #333;
  text-align: center;
  text-shadow: none;
  text-decoration: none;
  outline: none;
}

/* Recommend */
[role="dialog"][data-type="object"] menu button.recommend {
  background-color: #00caf2;
  color: #fff;
}

/* Danger */
[role="dialog"][data-type="object"] menu button.danger {
  background-color: #e51e1e;
  color: #fff;
}

/* Pressed */
[role="dialog"][data-type="object"] menu button:active {
  background: #00aacc;
  color: #fff;
}

/* Disabled */
[role="dialog"][data-type="object"] > menu > button[disabled] {
  background-color: #565656;
  color: rgba(255,255,255,0.4);
  pointer-events: none;
}

[role="dialog"][data-type="object"] > menu > button[disabled].recommend {
  background-color: #006579;
}

[role="dialog"][data-type="object"] > menu > button[disabled].danger {
  background-color: #730f0f;
}

button[disabled]::-moz-selection,
label span::-moz-selection {
  -moz-user-select: none;
}

[role="dialog"][data-type="object"] menu button {
  margin-left: 1rem;
}

[role="dialog"][data-type="object"] menu button:first-child {
  margin-left: 0;
}
