@import url('https://www.pellicciotta.com/hinolugi-support.js/css/reset.css');
@import url('https://www.pellicciotta.com/hinolugi-support.js/css/colors.css');
@import url('https://fonts.googleapis.com/css?family=Roboto');

*,
*:before,
*:after {
  box-sizing: border-box;
}

::placeholder {
  opacity: 0.5;
}

body {
  display: grid;
  grid-template-rows: min-content 1fr;
  grid-template-columns: minmax(0, 100vw);

  min-height: 100vh;
  width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;

  justify-items: stretch;

  background-color: #cecece;
  color:#3e3e3e;
  font-family: Roboto, Helvetica, Arial, sans-serif;
}

/* Landscape phone and bigger */
@media only screen and (min-width: 600px) {
  body {
    grid-template-rows: min-content auto min-content;
    padding: 1rem;
  }
}

kbd {
  font-family: 'Roboto Mono', 'Consolas', monospace;
}

h1 {
  font-size: 250%;
  font-weight: 600;
  letter-spacing: 6;

  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  text-align: center;
}

h1 > img {
  height: 1em;
}

header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  padding: 1rem;
  padding-bottom: 2rem;
}

/* Landscape phone and bigger */
@media only screen and (min-width: 600px) {
  header {
    width: auto;
  }
}

header > p {
  font-variant: small-caps;
  text-align: center;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 1rem;
}

/* Landscape phone and bigger */
@media only screen and (min-width: 600px) {
  main {
    width: auto;    
  }

  table {
    max-width: 60rem;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.35);
  }

  .card {
    max-width: 60rem;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.35);
  }
}

main > p {
  text-align: center;
}

#tool-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  justify-items: center;
  align-items: center;
}

/* Landscape phone and bigger */
@media only screen and (min-width: 600px) {
  #tool-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, 10rem);
    grid-template-rows: repeat(auto-fit, minmax(10rem, min-content));
    justify-content: center;
    justify-items: center;
    align-items: flex-start;
  }
}

#tool-list .tool {
  display: grid;
  grid-template-areas: "tool-name"
                       "tool-icon"
                       "tool-description";
  grid-template-rows: 2rem min-content auto;   
  justify-items: center;
  align-items: start;
  background-color: white;                 
  min-width: 5rem;
  max-width: 20rem;
  width: 10rem;
  min-height: 10rem;
  gap: 0.5rem;
  text-align: center;
  box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.35);
}

.tool-name {
  width: 100%;
  grid-area: tool-name;
  background-color: #3e3e3e;
  color: #cecece;
  padding: 0.5rem;
}

.tool:hover > .tool-name{
  color: white;
}

.tool-icon {
  grid-area: tool-icon;
  max-width: 4rem;
  color: red;
  stroke: yellow;
  fill: purple;
}

.tool:hover > .tool-icon {
  animation: tilt-shaking 1s infinite;
}

.tool-description {
  grid-area: tool-description;
  padding: 0.5rem;
  color: #3e3e3e;
}

.tool:hover > .tool-description {
  color: var(--blue-hex);
}

.card {
  width: 100%;
  min-width: 20rem;
  overflow: hidden;
  border-radius: 0.25rem;
}

table {
  width: 100%;
  min-width: 20rem;
  overflow: hidden;
  border-radius: 0.25rem;
}

table, table * {
  border-collapse: collapse;
}

table tr:not(:last-of-type) {
  border: none;
  border-bottom: 0.5px solid #3e3e3e;
}

table tr:nth-child(odd) {
  background-color: #3e3e3e00;
}

table tr:nth-child(even) {
  background-color: #3e3e3e22;
}

table tr:hover {
  font-weight: bold;
}

table th, table td {
  padding: 0.75rem;  
}

table tr:nth-child(odd) th {
  background-color: #3e3e3eaa;
  border-bottom: 0.5px solid #cecece;
  color: #cecece;
  text-align: left;
}

table tr:nth-child(even) th {
  background-color: #3e3e3ecc;
  border-bottom: 1px solid #cecece;
  color: #cecece;
  text-align: left;
}

a {
  display: inline-flex;
  text-decoration: none;
  color: var(--blue-hex);
}

a:hover {
  text-decoration: none;
  color: inherit;
}

a[data-tooltip] {
  margin: 4px;
}

@media (hover: none) {
  a[data-tooltip]:focus,
  a[data-tooltip]:hover,
  a[data-tooltip]:active {
    background-color: inherit;
    color: inherit;
  }
}

.tooltip {
  display: none;
  padding: 1em;
  border: 1px dashed #3e3e3e;
  border-radius: 1rem;
  margin: 0.5rem;
}

.horizontal-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: end;
  align-items: baseline;
}

.vertical-group {
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: flex-start;
}

label {
  font-variant: small-caps;
  font-size: 80%;
}

.vertical-group .unit {
  align-self: end;
  justify-self: start;
  vertical-align: top;
  font-variant: small-caps;
  font-size: 80%;
}

input[type="checkbox"],
input[type="checkbox"]:hover,
input[type="checkbox"]:focus,
input[type="checkbox"]:active,
input[type="checkbox"]:checked {
  -webkit-appearance: none;
  outline: none;
  width: 0;
  height: 0;
  padding: 0;
  margin: 0;
  border: none;
}

input,
select {
  padding: 0.5rem;
  outline: none;
  border: 1px solid #3e3e3e;
  border-radius: 0.125rem;

  color: #3e3e3e;
  background-color: #cecece;
}

input:focus,
select:focus {
  border: 1px solid var(--blue-hex);
  color: var(--blue-hex);
  background-color: white;
}

button {
  padding: 0.5rem;
  border: 1px solid s#3e3e3e;
  border-radius: 0.125rem;

  background-color: #3e3e3e;
  color: #cecece;
}

button.icon-button {
  padding: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 1.5rem;
  line-height: 1.5rem;
  font-size: 1.5rem;  
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

button:hover {
  background-color: var(--blue-hex);
  color: white;
}

button:active {
  background-color: var(--blue-hex);
  color: #3e3e3e;
}

button.disabled {
  background-color: #cecece;
  color: #7e7e7e;
  border: 1px solid #7e7e7e;
}

.item-actions>*[draggable] {
  color: white;
}

.item-actions>button.icon-button {
  border-radius: 50%;
  color: white;
  background-color: inherit;
  border: none;
}

.item-actions>button.icon-button:active,
.item-actions>button.icon-button:active * {
  color: var(--red-hex);
}

.item>.item-actions>*[draggable]:hover,
.item>.item-actions>*[data-action]:hover {
  animation: tilt-shaking 0.15s infinite;
}

footer {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;

  line-height: 1rem;
  font-variant: small-caps;
  font-size: 80%;

  padding: 0.25rem;
  padding-top: 1rem;
}

/* Landscape phone and bigger */
@media only screen and (min-width: 600px) {
  footer {
    display: flex;
  }
}

@keyframes tilt-shaking {
  0% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(5deg);
  }

  50% {
    transform: rotate(0eg);
  }

  75% {
    transform: rotate(-5deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

@keyframes horizontal-shaking {
  0% {
    transform: translateX(0)
  }

  25% {
    transform: translateX(5px)
  }

  50% {
    transform: translateX(-5px)
  }

  75% {
    transform: translateX(5px)
  }

  100% {
    transform: translateX(0)
  }
}

@keyframes vertical-shaking {
  0% {
    transform: translateY(0)
  }

  25% {
    transform: translateY(5px)
  }

  50% {
    transform: translateY(-5px)
  }

  75% {
    transform: translateY(5px)
  }

  100% {
    transform: translateY(0)
  }
}

