
/* ------ Dialog ------ */
.dialog-outer {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: black;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  z-index: 1000;
}

.dialog-outer .dialog {
  display: block;
  max-width: 90%;
  width: 100%;
  box-sizing: border-box;
  overflow: auto;
  margin: 5% auto;
  height: 84%;
  position: relative;
}

@media (min-width: 650px) {
  .dialog-outer .dialog {
    max-width: 600px;
  }
}

.dialog-outer .dialog .desc {
  margin: 1em;
  color: white;
}

.dialog-outer .dialog .close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
  width: 30px;
  height: 30px;
}

.dialog iframe {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  border-radius: 4px;
  background: white;
}

.iframe h1 {
  margin-bottom: .5em;
  text-align: center;
  font-size: 1.5rem;
}

body.iframe {
  padding: 3em 0;
}

.dialog.select-photo {
  width: 100%;
  box-sizing: border-box;
  min-height: 100%;
  padding: 1em;
}

.dialog .dialog-menu {
  text-align: right;
}

.dialog .dialog-menu button {
  color: #565A5C;
  cursor: pointer;
}

/* XXX */

.dialog.select-photo ul {

}

.dialog.select-photo ul > li {
  display: inline-block;
  width: 150px;
  height: 150px;
  vertical-align: middle;
  text-align: center;
  position: relative;
  margin: 4px;
  border: solid 3px transparent;
  padding: 8px;
  background: white;
  color: #565A5C;
}

.dialog.select-photo ul > li:hover {
  border-color: blue;
}

.dialog.select-photo ul > li > img {
  width: 140px;
  max-height: 140px;
  cursor: pointer;
}

.dialog.select-photo .upload-new {
}

.dialog.select-photo .delete-button {
  position: absolute;
  top: 0;
  right: 0;
  color: transparent;
  width: 16px;
  height: 16px;
  border-style: none;
  background: url(http://hatenablog.com/images/admin/delete.gif);
}

/* XXX */

dialog-main.dialog.select-photo {
  display: grid;
  grid-template-areas:
        "toolbar"
        "main";
  grid-template-rows: min-content auto;
  grid-template-columns: auto;
  grid-row-gap: 1em;
  grid-column-gap: 1em;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: auto;
}

dialog-main.dialog.select-photo > .toolbar:not([hidden]) {
  display: flex;
  grid-area: toolbar;
  flex-wrap: wrap;
}

dialog-main.dialog.select-photo > .toolbar > .intro {
  align-self: start;
  justify-self: start;
  margin: 0;
  flex-grow: 1;
}

dialog-main.dialog.select-photo > .toolbar > .folder-selector {
  align-self: start;
  justify-self: center;
  margin: 0;
  flex-basis: 15em;
}

dialog-main.dialog.select-photo > .toolbar > .buttons {
  align-self: start;
  justify-self: end;
  margin: 0;
}

dialog-main.dialog.select-photo > media-selector {
  grid-area: main;
  overflow: auto;
  text-align: center;
}