:root {
  --bg: #e4e4e4;
  --primary: #ff9800;
  --primary-dark: #c67700;
  --primary-text: #000;
  --secondary: #9b59b6;
  --secondary-text: #fff;
  --secondary-dark: #814b96;
  
}

body {
  background-color: var(--bg);
  maring: 0;
  overflow-y: hidden;
  overflow-x: hidden;
}

header {
  position: fixed;
  width: 100vw;
  top: 0;
  left: 0;
  margin: 0;
  height: 64px;
  background-color: var(--primary);
  color: white;
  box-shadow: #666 0px 2px 3px;
  z-index: 2048;
}

header > div {
  display: flex;
  flex-direction: row;
  align-items: center;
  color: white;
  width: 100%;
  height: 100%;
}

header > div > .brand {
  min-width: 12em;
  font-weight: bold;
  color: var(--primary-text);
}

.header-links {
  display: flex;
  flex-direction: row;
  flex-wrap: no-wrap;
  height: 100%;
}

.header-links > a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  min-width: 6em;
  height: 100%;
  padding: auto;
  margin: 0;
  transition: background-color ease 0.2s;
  border-width: 0;
  cursor: pointer;
  text-decoration: none;
  color: var(--primary-text);
}
.header-links > a:hover {
  background-color: rgba(255, 255, 255, .3);
  box-shadow: none;
}
.header-links > a.active {
  background-color: rgba(255, 255, 255, .3);
}

.spacer {
  width: 100%;
}

.main {
  /* margin-top: 64px; */
  display: flex;
  flex-direction: column;
  width: 100%;
}

.center-h {
  display: flex;
  align-items: center;
}

article {
  background-color: #e4e4e4;
  box-shadow: #666 0px 0px 3px;
  max-width: 900px;
  width: 100%;
  padding: 24px;
  margin-top: 32px;
  border-radius: 10px;
  margin-bottom: 2em;
  text-align: justify;
}

button {
  background-color: var(--secondary);
  color: var(--secondary-text);
  border-style: solid;
  border-color: var(--secondary-text);
  border-width: 0px;
  border-radius: 10px;
  font-size: 1em;
  padding: .5em 1em .5em 1em;
  box-shadow: 0px 0px 0px #666;
  transition: box-shadow ease 0.2s;
}

button:hover {
  box-shadow: 0px 2px 4px #666;
}

button:active {
  background-color: var(--secondary-dark);
}

button.big {
  font-size: 2em;
}

button.full-width {
  width: 100%;
}

.primary {
  color: var(--primary);
}



#login {
  display: none;
}
.login {
  background-color: #000;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.login-cont {
  background-color: var(--bg);
  min-width: 200px;
  min-height: 200px;
  display: flex;
  padding: 32px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  border-style: solid;
  border-color: var(--primary);
  border-width: 4px;
}


.layout {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.layout > .other {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}
@media (orientation: portrait) {
  .layout > .other {
    flex-direction: column;
  }
}

.img {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  width: 100%;
  height: 100%;
  min-width: 64px;
  min-height: 64px;
}

.img > .label {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.label > span {
  background-color: rgba(0, 0, 0, .5);
  color: #fff;
  padding: 4px;
  border-radius: 5px;
}

.layout > .self {
  padding: 0px;
  height: calc(20vh - 2px);
  max-height: 8em;
  width: 100vw;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  /* justify-content: center; */
  gap: .5em;
  border-style: solid;
  border-color: var(--primary);
  border-width: 2px 0px 0px 0px;
}
#self::before, #self::after {
  content: '';  /* Insert pseudo-element */
  margin: auto; /* Make it push flex items to the center */
}
#self {
  padding: 5px 5px 5px 5px;
  display: flex;
  height: 100%;
  max-height: calc(8em - 5px * 2);
  flex-direction: row;
  overflow-y: auto;
  width: 100%;
  gap: .5em;
  height: 100%;
}

#self > img {
  border-style: solid;
  border-width: 2px;
  border-color: var(--secondary);
  border-radius: 20px;
  max-width: 100%;
  max-height: 100%;
}

.button-add-foto {
  width: 128px;
  min-width: 128px;
}

.nofotos-upload {
  height: 100%;
  min-width: 100vw;
  width: 100vw;
  display: none; /* flex */
  flex-direction: row;
  align-items: center;
  justify-content: center;
}
.nofotos-upload > span {
  font-size: 26px;
  font-weight: bold;
  padding-left: 24px;
}
.nofotos-upload > img {
  height: 100%;
}

.nofotos-download {
  position: absolute;
  top: calc(100vh/2 - 50vh/2);
  left: calc(100vw/2 - 360px/2);
  height: 50vh;
  width: 360px;
  min-width: 360px;
  display: none; /* flex */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.nofotos-download > span {
  font-size: 26px;
  font-weight: bold;
  padding-left: 24px;
}
.nofotos-download > img {
  height: 100%;
}


#popup-upload {
  display: none;
}


.popup.container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: calc(100vh - 3em);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1019;
  background-color: rgba(0, 0, 0, .8);
}

.popup.outer-header {
  display: none;
  z-index: 2000;
}
.popup.outer-header > button {
  background-color: var(--primary);
  border-radius: 10px 10px 0px 0px;
  min-width: 4em;
}
.popup.outer-header > button:hover {
  box-shadow: none;
  background-color: var(--primary-dark);
}

.popup.outer-footer {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 2000;
}
.popup.outer-footer > div > button.popup-close {
  border-radius: 0;
  box-shadow: 0px 0px 10px #333;
}

.popup.content {
  position: relative;
  max-width: 720px;
  max-height: 80vh;
  background-color: var(--bg);
  border-style: solid;
  border-color: var(--primary);
  border-width: 4px;
  border-radius: 10px;
  padding: 20px;
  z-index: 1025;
  overflow-y: auto;
  /* box-shadow: 0px 0px 10px #fff; */
}

.upload-new-cont {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 280px;
  flex-wrap: no-wrap;
}

@media (orientation: portrait) {
  .popup.container {
    background-color: var(--primary);
  }
  .popup.content {
    max-width: 100vw;
    max-height: 100vh;
    border-width: 8px 2px 0px 2px;
    width: calc(100vw - 20px * 2);
    height: 100vh;
    border-radius: 20px;
    padding-bottom: calc(20px + 3em + 20px);
  }
  .popup.outer-header {
    display: none;
  }
  .popup.outer-footer {
    display: block;
  }
  .upload-new-cont {
    flex-wrap: wrap;
    justify-content: space-between;
  }
}

.hidden {
  width: 0px;
  height: 0px;
  font-size: 1px;
  margin: 0;
  padding: 0;
}


.upload-text {
  display: block;
  max-width: 40em;
  min-width: 8em;
  width: 100%;
  height: 2em;
  background-color: #fff;
  border-style: solid;
  border-color: #4a4a4a;
  color: var(--primary-text);
  padding: .5em;
  font-size: 1.2em;
}
.upload-text:active, .upload-text:focus {
  border-color: var(--primary);
}

#upload-preview {
  width: calc(100% - 2px * 2);
  max-height: 320px;
  margin-top: 10px;
  background-color: #000;
  border-style: solid;
  border-color: #4a4a4a;
  border-radius: 10px;
  object-fit: contain;
}

.photo-edit-header {
  color: black;
  width: 100%;
  font-size: 1.2em;
  font-weight: bold;
  padding: .5em 0em .5em 0em;
}

.photo-edit-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: .5em;
  justify-content: center;
}

.edit-img {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  max-width: 35em;
  border-radius: 10px;
  border-style: solid;
  border-width: 2px;
  border-color: var(--secondary);
  background-color: var(--secondary);
  color: var(--secondary-text);
}
.edit-img > .info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 10em;
  width: 100%;
  text-align: center;
  gap: 1.5em;
}
.edit-img > .info > .comment {
  font-style: oblique;
  font-size: 1.2em;
}
.edit-img > .info > .date {
  font-size: .9em;
}

.edit-img-cont {
  display: block;
  width: 180px;
  min-width: 180px;
}
.edit-img-cont > img {
  display: block;
  max-width: 180px;
  max-height: 128px;
  min-height: 64px;
  border-radius: 10px;
  border-style: solid;
  border-width: 0px 2px 0px 0px;
  border-color: var(--secondary);
}


#confirm-delete {
  display: none;
}

.confirm-popup {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, .5);
  z-index: 2000;
}

.confirm-popup > div {
  width: 320px;
  height: 240px;
  background-color: var(--bg);
  box-shadow: 0px 0px 10px #333;
  border-radius: 20px;
  position: relative;

  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;

}

.confirm-popup > div > span {
  display: block;
  width: 100%;
  text-align: center;
  background-color: #ff9800aa;
  color: var(--primary-text);
  font-size: 1.2em;
  font-weight: bold;
  padding: .5em 0em .5em 0em;
  border-radius: 20px 20px 0px 0px;
}

.confirm-bottom {
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: calc(100% + 20px * 2);
  display: flex;
  align-items: end;
  justify-content: space-between;
  font-size: 1.2em;
}

.confirm-bottom > button {
  box-shadow: 0px 0px 10px #333;
  width: 8em;
}






.loading-popup {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, .6);
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.loading-popup > div {
  width: 212px;
  height: 128px;
  background-color: white;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 0px 10px #333;
}

/* HTML: <div class="loader"></div> */
.loader {
  width: 120px;
  height: 60px;
  border-radius: 120px 120px 0 0;
  position: relative;
  overflow: hidden;
}
.loader:before {
  content: "";
  position: absolute;
  inset: 0 0 -100%;
  background: radial-gradient(farthest-side at top,#0000 35%,#aa47be,#039be6,#26c6dc,#459e44,#f9ec44,#f68524,#fa3536,#0000) bottom/100% 50% no-repeat;
  animation: l8 2s infinite;
}
@keyframes l8 {
  0%,20%   {transform: rotate(0)}
  40%,60%  {transform: rotate(.5turn)}
  80%,100% {transform: rotate(1turn)}
}
