/* Box sizing */

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

/* Constants */

:root {
  --color-active: #F3E87F;
  --color-active-hover: #FBEF81;
  --color-header: brown;
  --color-header-darker: #822929;
  --color-highlight: #888888;
  --color-title: brown;

  /* Form */
  --color-label: #333333;
  --color-button: #333333;
  --color-button-hover: #555555;
  --color-input-border: #CCCCCC;
  --color-focus: orange;

  /* Timer */
  --color-timer-arc-total: #222222;
  --color-timer-hover: #DDEEDD;
  --color-warm-up: #C679D9;
  --color-prepare: #3B6EDC;
  --color-work: #71B571;
  --color-rest: #B15B5B;

  --base-font-size: 18px;
}

@media all and (max-width: 800px) {
  :root {
    --base-font-size: 14px;
  }
}

/* Layout */

html {
  font-size: var(--base-font-size);
  font-family: sans-serif;
}

body {
  margin: 0;
}

.g-Layout__Page {
  height: 100vh;
  overflow-y: auto;
}

.g-Layout__Header {
  background-color: var(--color-header);
  color: white;
  padding: 1rem 2rem;
  font-size: 2rem;
  border-bottom: 0.1rem solid var(--color-header-darker);
}

/* Config */

.g-Form {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2rem;
  background-color: white;
}

.g-Form__Section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
}

.g-Form__Tabatas {
  display: flex;
  flex-direction: column;
  width: 17rem;
}

.g-Form__Line {
  display: flex;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.g-Form__Title {
  text-align: center;
}

.g-Form__Label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 1rem;
  text-align: center;
  margin: 0 1rem;
  color: var(--color-label);
  line-height: 2rem;
}

.g-Form__Tabata {
  display: grid;
  grid-template-columns: auto auto;
  grid-gap: 1rem;
  margin-bottom: 1rem;
}

.g-Form__Operator {
  padding-bottom: 0.3rem;
}

.g-Form__NumberInput {
  width: 5rem;
}

.g-Form__TabataInput {
  width: 10rem;
}

.g-Form__Duration {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Timer */

.g-Timer {
  display: grid;
  grid-template-columns: 10% auto 10%;
  grid-template-rows: 10% auto 10% 10% 10%;
  color: black;
}

.g-Timer--WarmUp {
  background-color: var(--color-warm-up);
  color: white;
}

.g-Timer--Work {
  background-color: var(--color-work);
  color: white;
}

.g-Timer--Rest {
  background-color: var(--color-rest);
  color: white;
}

.g-Timer--Prepare {
  background-color: var(--color-prepare);
  color: white;
}

.g-Timer__Pause {
  background-color: var(--color-highlight);
}

.g-Timer__Dial {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  white-space: pre-wrap;
  text-align: center;
  line-height: 6rem;

  width: 100%;
  height: 100%;
  grid-row: 2;
  grid-column: 2;

  background-color: transparent;
  color: inherit;
  font-size: 3rem;
  position: relative;
  border: none;
}

.g-Timer__Arc {
  width: inherit;
  height: inherit;
  position: absolute;
  top: 0;
  left: 0;
}

.g-Timer__ArcTotal {
  stroke: var(--color-timer-arc-total);
  fill: none;
  stroke-width: 20;
}

.g-Timer__ArcPrepare {
  stroke: var(--color-prepare);
  fill: none;
  stroke-width: 18;
}

.g-Timer__ArcWarmUp {
  stroke: var(--color-warm-up);
  fill: none;
  stroke-width: 18;
}

.g-Timer__ArcWork {
  stroke: var(--color-work);
  fill: none;
  stroke-width: 18;
}

.g-Timer__ArcRest {
  stroke: var(--color-rest);
  fill: none;
  stroke-width: 18;
}

.g-Timer__ArcProgress {
  stroke: var(--color-active);
  fill: none;
  stroke-width: 18;
}

.g-Timer__Buttons {
  display: flex;
  justify-content: space-around;
  grid-row: 4;
  grid-column: 2;
  width: 100%;
  height: 100%;
}

/* Titles */

h1 {
  font-weight: normal;
  color: var(--color-title);
  margin-top: 0;
  text-decoration: underline;
}

/* Input */

.g-Input {
  display: block;
  font-size: inherit;
  padding: 0.3rem;
  border: 0.1rem solid var(--color-input-border);
}

.g-Input:focus {
  border-color: var(--color-focus);
}

/* Button */

.g-Button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-size: inherit;
  background-color: var(--color-button);
  border: 0.1rem solid var(--color-button);
  color: white;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}

.g-Button:hover {
  background-color: var(--color-button-hover);
}

.g-Button:focus {
  border-color: var(--color-focus);
}

.g-Button--Active {
  background-color: var(--color-active);
  color: black;
}

.g-Button--Active:hover {
  background-color: var(--color-active-hover);
  color: black;
}

/* List */

.g-List {
  margin: 0;
  padding: 0;
}
