/* CSS for internt.alliancen.se */

/* ---------- Fonts --------- */
@font-face {
  font-family: 'English Towne';
  src: url('/css/fonts/englishtowne-webfont.woff') format('woff'),
       url('/css/fonts/englishtowne-webfont.ttf') format('truetype'),
       url('/css/fonts/englishtowne-webfont.svg#EnglishTowneRegular') format('svg');
  font-weight: normal;
  font-style: normal;
}

@import 'https://fonts.googleapis.com/css?family=Fira+Sans:400,400i&subset=latin-ext';

/* ---------- Main definitions --------- */
html {
  --main-color: rgb(119,38,191);
  --main-accent: rgb(253,191,45);
  --main-light: rgb(245,245,245);
  color: var(--main-accent);
  background-color: var(--main-color);
  font-family: 'Fira Sans', sans-serif;
}


/* ---------- Layout and spacing --------- */
body {
  display: flex;
  justify-content: center;
      margin: 0 1rem;
}

* + * {
  margin-top: 1em;
}

main {
  margin-top: 6rem;
  flex-basis: 60ch;
}

main > section {
  margin-top: 3em;
}

/* ---------- Color --------- */

a, a:visited {
  color: var(--main-accent);
}

/* ---------- Headings --------- */

h1, h2 {
  font-family: 'English Towne', serif;
  font-weight: 100;
}

h3, h4 {
  font-family: 'Fira Sans', sans-serif;
  font-weight: 600;
  margin-top: .5rem;
}

h1 {
  font-size: 3rem;
  margin-top: 1rem;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.5rem;
}

/* ---------- Navigation --------- */

nav {
  padding-right: 2rem;
  flex-basis: 10rem;
  flex-shrink: 10;
}

nav::before {
  display: block;
  background-image: url("../images/alliancen_logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
  height: 20vh;
  margin: 1rem 0;
  content: "";
}

nav > a {
  font-family: 'English Towne', serif;
  font-size: 2rem;
  font-weight: 400;
  display: block;
}

.active {
  text-decoration: none;
}

.settings {
  font-size: 1rem;
  font-family: 'Fira Sans', sans-serif;
}


/* ---------- Kommande --------- */

.accept::before {
  content: "✓";
  color: #8eea1c;
  font-size: 1.5rem;
  padding: 0 .3rem;
}

.decline::before {
  content: "✗";
  color: #dc4053;
  font-size: 1.5rem;
  padding: 0 .3rem;
}


/* ---------- Forms --------- */

form > * + * {
  margin-top: .5em;
}

input[type=input] {
   flex-grow: 1;
   margin-left: 6ch;
   max-width: 40ch;
}

input[type="submit"], .login button {
  border-radius: 3px;
  border-style: none;
  background: var(--main-accent);
  box-shadow: rgba(0, 0, 0, 0.4) 0px 0px 2px 1px;
}

label > span, label > a {
  margin-right: auto;
  padding-left: 2ch;
}

label {
  display: flex;
  justify-content: space-between;
}

button[type="submit"] {
  display: block;
}

textarea {
  width: 100%;
  padding: 0;
  margin-right: 0;
}


/* ---------- PhotoSwipe --------- */
.pswp {
  margin-top: 0;
}

.pswp * {
  margin-top: 0;
}

div.pswp__bg {
  background-color: rgba(0,0,0,0.8);
}

/* ---------- Events --------- */

.event form {
  display: inline;
}

.response-input {
  margin-top: .2rem;
}

.event + .event {
  margin-top: 3rem;
}

time, .album_info {
  font-family: "Fira mono";
  font-weight: 100;
  font-size: 1.2rem;
  padding-right: 2ch;
}

.description {
  font-size: 1.2rem;
}

.event > * + * {
  margin-top: 0.5rem;
}

.event {
  border-left: solid 4px;
  border-radius: 2px;
  padding-left: 12px;
  margin-left: 4px;
}


/* ---------- Photoalbums --------- */

#album-list {
  margin-top: 4rem;
}

.album_info > span + span {
  padding-left: 2ch;
}

.thumbnails {
  display: flex;
  flex-wrap: wrap;
  margin-left: -3px;
  justify-content: space-between;
}

.thumbnails > img + img {
  margin-top: 0;
}

.thumbnails > img {
  padding: 3px;
  flex: 1 1;
  height: 120px;
  object-fit: cover;
  width: 30%;
}

.thumbnails > img:last-child {
  flex-grow: 0;
}

.album + .album {
  margin-top: 3em;
}

/* ---------- Login --------- */

.login {
  margin: 3rem auto;
}

.login > h1 {
  margin-left: auto;
  text-align: center;
}

.login::before {
  display: block;
  background-image: url("../images/alliancen_logo.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  height: 30vh;
  margin: 0 auto;
  content: "";
}

.login button {
  margin-left: auto;
  margin-right: auto;
  width: 50%;
}

/* ---------- Lists --------- */

ul {
  padding-left: 0;
}

li {
  margin-top: .2rem;
}

/* ---------- Tables --------- */

th {
  text-align: left;
  font-size: 1.25rem;
}

td, th {
  border: solid 1px;
  padding: .1rem .5rem;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---------- Media queries --------- */

@media (max-width: 599px) {
  body {
    flex-direction: column;

  }

  nav::before {
    background-position: center;
  }

  nav {
    margin: 0;
  }

  nav > a:nth-child(3)::after {
   content: "\A";
   white-space: pre;
  }

  nav > a {
    display: inline-block;
    font-size: 2rem;
    margin-right: 1ch;
  }

  main {
    margin-top: inherit;
  }

  .thumbnails > img {
    height: 100px;
  }

  ul {
    padding-left: 1rem;
  }
}

@media (max-width: 449px) {
  input[type=input] {
   margin-left: 1ch;
  }
}

@media (min-width: 1500px) {
  main {
    flex-basis: 75ch;
  }
}
