/* === Global Styles === */
:root {
  --rad: .7rem;
  --dur: .3s;
  --color-dark: #2f2f2f;
  --color-light: #fff;
  --color-brand: #57bd84;
  --btn-width: 6rem;
  --bez: cubic-bezier(0, 0, 0.43, 1.49);
}

*,
*::before,
*::after {
  font-family: 'vazir-medium', sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

h1 {
  font-family: 'vazir-bold', sans-serif;
}

label {
  user-select: none;
}

a {
  text-decoration: none;
}

.common-width {
  width: 30rem;
}

/* Searchbar Style */

.search-form {
  position: relative;
  width: 30rem;
  background: var(--color-brand);
  border-radius: var(--rad);
}

.search-input,
button {
  height: 3.5rem;
  color: var(--color-dark);
}

input[type="search"] {
  outline: 0;
  width: 100%;
  background: var(--color-light);
  padding: 0 1.6rem;
  border-radius: var(--rad);
  border: 1px solid #ccc;
  transition: all var(--dur) var(--bez);
  transition-property: width, border-radius;
  z-index: 1;
  position: relative;
  font-size: 16px;
}

main form > button {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: var(--btn-width);
  font-size: larger;
  font-family: 'vazir-bold';
  background: var(--color-brand);
  border-radius: 0 var(--rad) var(--rad) 0;
  border: none;
  text-align: center;
  cursor: pointer;
}

.search-input:not(:placeholder-shown) {
  border-radius: var(--rad) 0 0 var(--rad);
  width: calc(100% - var(--btn-width));

  +button {
    display: block;
  }
}
