:root {
  --bg-color: hsl(220, 43%, 99%);
  --primary-color: hsl(0, 0%, 51%);
  --secondary-color: hsl(220, 60%, 99%);
  --accent-color-1: #dcdbda;
  --accent-color-2: hsl(210, 66.7%, 98.8%);
}

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

html {
  height: 100%;
  
  display: grid;
  justify-content: center;
  align-items: center;
}

body {
  max-width: 60em;
  
  color: var(--primary-color);
  background-color: #FAFCFE;
  
  font-family: sans-serif;
}

.content {

  grid-template-columns: 1fr 1fr;

  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}



[mv-app] {
  padding: 2em 2.5em;
  
  h2 {
    font-size: 100%;
    font-weight: 600;
    
    line-height: 1.3;
    
    color: var(--secondary-color);
  }
  
  // Fix issue with highlighting the month and the year fields on hovering 'Send Feedback' button
  &.mv-highlight-unsaved .mv-unsaved-changes {
    box-shadow: none !important;
  }
}

.tickmarks {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 1.25em;
  justify-items: center;
  
  margin-top: 2.5em;
  
  color: var(--accent-color-1);

  font-size: 90%;
  font-weight: bold;
  
  .highlight {
    color: var(--primary-color);
  }
  
  span {
    cursor: pointer;
  }
}

// Slider
[property="score"] {
  display: block;
  margin: 1em 0 1.5em 0;
  
  width: 100%;
  
  cursor: pointer;
  
  // Google Chrome
  -webkit-appearance: none;
  
  &:focus {
    outline: none;
    box-shadow: 0 0 3px 3px var(--accent-color-1);
  }
  
  &::-webkit-slider-thumb {
    --thumb-size: 1em;
    
    margin-top: calc(var(--thumb-size) * -1 / 3);
    height: var(--thumb-size);
    width: var(--thumb-size);
    
    background-color: var(--primary-color);

    border-radius: 50%;
    
    box-shadow: 0 0 0 5px var(--bg-color);
    
    -webkit-appearance: none;
  }
  
  &::-webkit-slider-runnable-track {
    height: 0.5em;
    
    border-radius: 0.3em;
    
    background-color: var(--bg-color);
    background-image: linear-gradient(to right, var(--primary-color) var(--score, 0%), transparent var(--score, 0%)); 
  }
  
  // Mozilla Firefox
  &::-moz-range-thumb {
    background-color: var(--primary-color);

    border-radius: 50%;
    border-color: var(--bg-color);
    border-width: 5px;
  }
  
  &::-moz-range-track {
    height: 0.5em;
    
    border-radius: 0.3em;
    
    background-color: var(--bg-color);
    background-image: linear-gradient(to right, var(--primary-color) var(--score, 0%), transparent var(--score, 0%));
  }
}

.legend {
  display: flex;
  justify-content: space-between;
  
  margin: -0.2em 0 0;
  
  font-size: 80%;
  
  color: var(--accent-color-1);
  
  span {
    cursor: pointer;
  }
}

[property="comment"] {
  resize: none;
  
  width: 100%;
  height: 12em;
  
  margin: 3em 0 2.5em;
  padding: 1em;
  
  border: none;
  border-radius: 0.3em;
  
  color: var(--secondary-color);
  background-color: var(--bg-color);
  
  &::placeholder {
    font-size: 110%;
    
    color: var(--primary-color);
    
    // For Chrome 
    filter: opacity(45%);
  }
  
  &:focus {
    outline: none;
    box-shadow: 0 0 3px 3px var(--accent-color-1);
  }
}

[property="startDate"] {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr;
  gap: 0.3em;
  align-items: center;
  
  margin: 1.5em 0;
  padding: 0;
  
  border: none;
  
  color: var(--secondary-color);
  
  p {
    font-size: 80%;
  }
  
  select {
    display: block;
    
    padding: 0.3em 0.4em;
    
    background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%234454C3" d="M15.3 9.3a1 1 0 0 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 1.4-1.4l3.3 3.29 3.3-3.3z"/></svg>');
    background-position: center right;
    background-size: 2em 2em;
    background-repeat: no-repeat;
    
    border-radius: 0.5em;
    border: 1px solid var(--bg-color);
    
    appearance: none;
    color: inherit;
    background-color: #fff;
    
    cursor: pointer;
    
    transition: background-color 100ms ease;
    
    &:hover {     
      background-color: var(--bg-color);
    }
    
    &:focus {
      outline: none;
      box-shadow: 0 0 3px 3px var(--accent-color-1);
    }
  }
}

// The Send Feedback button
button.mv-save {
  width: 100%;
  margin: 2em 0 1em;
  padding: 0.7em 1em;
  
  border: none;
  border-radius: 0.5em;
  
  color: var(--accent-color-2);
  background-color: var(--primary-color);
  
  font-size: 90%;
  font-weight: 200;
  
  transition: background-color 300ms ease;
  
  &:disabled {
    color: var(--accent-color-1);
    background-color: var(--bg-color);
  }
  
  &:not(:disabled):hover {
    background-color: var(--secondary-color);
    
    cursor: pointer;        
  }
  
  &:not(:disabled):focus {
    outline: none;
    box-shadow: 0 0 5px 5px var(--accent-color-1);
  }
}


[property="feedback"]:first-of-type:nth-last-of-type(n + 2) ~ [property="feedback"] {
  display: none;
}

pre {
  tab-size: 2;
  -moz-tab-size: 2;

  &:empty::after {
    content: "No feedback yet 😔";
  }
}

::-moz-focus-inner {
    border: 0;
} 
/* --- Социальные иконки в правом нижнем углу --- */
.social-icons {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
}

.social-icons ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 0;
  margin: 0;
}

.social-icons ul li {
  position: relative;
}

.social-icons ul li a {
  text-decoration: none;
  color: #aaa;
  font-size: 2.4em;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons ul li a:hover {
  transform: scale(1.2);
}

/* WhatsApp */
.social-icons ul li:nth-child(1) a:hover {
  color: #0077ff;
}

/* ВКонтакте */
.social-icons ul li:nth-child(2) a:hover {
  color: #0077ff;
}

/* Тень для контраста */
.social-icons ul li a {
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}
.h1{
  text-shadow: #000;
}
.top-line {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 1.7rem 0; !important;
  z-index: 10; }

/* ------------------------------------------------------------------ */
/* Mobile adaptation (otz.html) */
@media (max-width: 768px) {
  /* Avoid horizontal scroll */
  body {
    max-width: 100% !important;
    overflow-x: hidden;
  }

  /* The desktop layout centers everything via html grid; on mobile we want normal flow */
  html {
    display: block;
    height: auto;
    justify-content: initial;
    align-items: initial;
  }

  /* Keep content readable with padding */
  [mv-app] {
    padding: 16px !important;
  }

  /* Reduce the huge top gap under the fixed header */
  form[mv-multiple="feedback"] {
    margin-top: 120px !important;
  }

  h1 {
    font-size: 22px;
    line-height: 1.2;
  }

  /* Tickmarks (0..10) should fit on small screens */
  .tickmarks {
    grid-template-columns: repeat(11, minmax(0, 1fr));
    gap: 6px;
    margin-top: 16px;
  }
  .tickmarks span {
    font-size: 12px;
  }

  /* Textarea and select full width */
  textarea[property="comment"] {
    margin: 18px 0 16px;
    height: 10em;
  }

  /* The block contains only text + one select; on mobile use single column */
  [property="startDate"] {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Inline style in HTML sets width:300px; override on mobile */
  select[property="month"] {
    width: 100% !important;
    max-width: 100%;
    color: #000 !important;
    background-color: #fff !important;
    font-size: 16px; /* comfortable on mobile, avoids zoom */
    line-height: 1.2;
    padding: 12px 44px 12px 12px; /* right space reserved for arrow */
    background-position: right 12px center;
    background-size: 18px 18px;
  }

  select[property="month"] option {
    color: #000;
  }

  /* Make the checkbox text wrap nicely */
  .form-check-label {
    font-size: 14px;
    line-height: 1.25;
  }

  /* Social icon: don't cover inputs on small screens */
  .social-icons {
    bottom: 16px;
    right: 16px;
  }
  .social-icons ul li a {
    font-size: 2em;
  }
}
