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

* {
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  padding-bottom: 2rem;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

:root {
  --rem-val: 16;
  --font-size: 1.125rem;
  --text-color: #000000;
  --times-color: hsl(192.24deg 58.1% 49.61%);
  --sp-xxxl: 10rem;
  --sp-xxl: 9rem;
  --sp-xl: 5rem;
  --sp-l: 2.75rem;
  --sp-m: 1.25rem;
  --sp-s: 0.875rem;
  --sp-xs: 0.375rem;
  --sp-xxs: 0.1875rem;
  --rad-xxl: 1.5rem;
  --rad-xl: 1rem;
  --rad-l: 0.5rem;
  --rad-m: 0.25rem;
  --rad-s: 0.125rem;
  --rad-xs: 0.0625rem;
  --h-xxl: 6rem;
  --h-xl: 4.5rem;
  --h1: 3.5rem;
  --h2: 3.25rem;
  --h3: 3rem;
  --h4: 2rem;
  --h5: 1.5rem;
  --h6: 1.125rem;
  --p-l: 1.25rem;
  --p: 1.125rem;
  --p-s: 1rem;
  --p-xs: 0.875rem;
}

@media screen and (min-width: 480px) {
  :root {
    --sp-xxxl: calc(10rem + ((100vw - 480px) / (1280 - 480)) * ((12 - 10) * var(--rem-val)));
    --sp-xxl: calc(9rem + ((100vw - 480px) / (1280 - 480)) * ((10 - 9) * var(--rem-val)));
    --sp-xl: calc(5rem + ((100vw - 480px) / (1280 - 480)) * ((6 - 5) * var(--rem-val)));
    --sp-l: calc(2.75rem + ((100vw - 480px) / (1280 - 480)) * ((3 - 2.75) * var(--rem-val)));
    --sp-m: calc(1.25rem + ((100vw - 480px) / (1280 - 480)) * ((1.5 - 1.25) * var(--rem-val)));
    --sp-s: calc(0.875rem + ((100vw - 480px) / (1280 - 480)) * ((1 - 0.875) * var(--rem-val)));
    --sp-xs: calc(0.375rem + ((100vw - 480px) / (1280 - 480)) * ((0.5 - 0.375) * var(--rem-val)));
    --sp-xxs: calc(0.1875rem + ((100vw - 480px) / (1280 - 480)) * ((0.25 - 0.1875) * var(--rem-val)));
    --rad-xxl: calc(1.5rem + ((100vw - 480px) / (1280 - 480)) * ((2 - 1.5) * var(--rem-val)));
    --rad-xl: calc(1rem + ((100vw - 480px) / (1280 - 480)) * ((1.5 - 1) * var(--rem-val)));
    --rad-l: calc(0.5rem + ((100vw - 480px) / (1280 - 480)) * ((1 - 0.5) * var(--rem-val)));
    --rad-m: calc(0.25rem + ((100vw - 480px) / (1280 - 480)) * ((0.5 - 0.25) * var(--rem-val)));
    --rad-s: calc(0.125rem + ((100vw - 480px) / (1280 - 480)) * ((0.25 - 0.125) * var(--rem-val)));
    --rad-xs: calc(0.0625rem + ((100vw - 480px) / (1280 - 480)) * ((0.125 - 0.0625) * var(--rem-val)));
    --h-xxl: calc(6rem + ((100vw - 480px) / (1280 - 480)) * ((8 - 6) * var(--rem-val)));
    --h-xl: calc(4.5rem + ((100vw - 480px) / (1280 - 480)) * ((6 - 4.5) * var(--rem-val)));
    --h1: calc(3.5rem + ((100vw - 480px) / (1280 - 480)) * ((4.5 - 3.5) * var(--rem-val)));
    --h2: calc(3.25rem + ((100vw - 480px) / (1280 - 480)) * ((4 - 3.25) * var(--rem-val)));
    --h3: calc(3rem + ((100vw - 480px) / (1280 - 480)) * ((3.5 - 3) * var(--rem-val)));
    --h4: calc(2rem + ((100vw - 480px) / (1280 - 480)) * ((3 - 2) * var(--rem-val)));
    --h5: calc(1.5rem + ((100vw - 480px) / (1280 - 480)) * ((2 - 1.5) * var(--rem-val)));
    --h6: calc(1.125rem + ((100vw - 480px) / (1280 - 480)) * ((1.5 - 1.125) * var(--rem-val)));
    --p-l: calc(1.25rem + ((100vw - 480px) / (1280 - 480)) * ((1.375 - 1.25) * var(--rem-val)));
    --p: calc(1.125rem + ((100vw - 480px) / (1280 - 480)) * ((1.125 - 1.125) * var(--rem-val)));
    --p-s: calc(1rem + ((100vw - 480px) / (1280 - 480)) * ((1 - 1) * var(--rem-val)));
    --p-xs: calc(0.875rem + ((100vw - 480px) / (1280 - 480)) * ((0.875 - 0.875) * var(--rem-val)));
  }
}

@media screen and (min-width: 1280px) {
  :root {
    --sp-xxxl: 12rem;
    --sp-xxl: 10rem;
    --sp-xl: 6rem;
    --sp-l: 3rem;
    --sp-m: 1.5rem;
    --sp-s: 1rem;
    --sp-xs: 0.5rem;
    --sp-xxs: 0.25rem;
    --rad-xxl: 2rem;
    --rad-xl: 1.5rem;
    --rad-l: 1rem;
    --rad-m: 0.5rem;
    --rad-s: 0.25rem;
    --rad-xs: 0.125rem;
    --h-xxl: 8rem;
    --h-xl: 6rem;
    --h1: 4.5rem;
    --h2: 4rem;
    --h3: 3.5rem;
    --h4: 3rem;
    --h5: 2rem;
    --h6: 1.5rem;
    --p-l: 1.375rem;
    --p: 1.125rem;
    --p-s: 1rem;
    --p-xs: 0.875rem;
  }
}

@font-face {
  font-family: "indopak";
  src: url("/fonts/indopak.woff2") format("woff2");
}

@font-face {
  font-family: "uthman-tn";
  src: url("/fonts/uthman-tn.woff2") format("woff2");
}

@font-face {
  font-family: "uthman-tn-bold";
  src: url("/fonts/uthman-tn-bold.woff2") format("woff2");
}

.dua-arabic,
.dua-english,
.dua-reading,
.dua-count,
.dua-benefit {
  font-size: var(--font-size);
  color: var(--text-color);
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: aliceblue;
}

.duas-wrapper {
  max-width: 80ch;
  padding-bottom: var(--sp-l);
}

h1 {
  margin-block: var(--sp-l);
  margin-inline: auto;
  text-align: center;
  font-size: var(--h5);
}

.dua-wrapper {
  background-color: #ffffff;
  padding-inline: var(--sp-m);
  padding-block: var(--sp-l);
  border-radius: var(--rad-l);
  position: relative;
  box-shadow: 2.8px 2.8px 2.2px rgba(0, 0, 0, 0.003), 6.7px 6.7px 5.3px rgba(0, 0, 0, 0.004), 12.5px 12.5px 10px rgba(0, 0, 0, 0.005), 22.3px 22.3px 17.9px rgba(0, 0, 0, 0.006),
    41.8px 41.8px 33.4px rgba(0, 0, 0, 0.007), 100px 100px 80px rgba(0, 0, 0, 0.01);
}

.dua-wrapper:not(:last-of-type) {
  margin-block-end: var(--sp-m);
}

.dua-wrapper > p:not(:first-child) {
  border-top: solid 1px rgba(146, 146, 146, 0.116);
}

.dua-arabic {
  direction: rtl;
  font-size: calc(var(--font-size) * 1.5);
  font-family: "uthman-tn", sans-serif;
  font-family: "uthman-tn-bold", sans-serif;
  font-family: "indopak", sans-serif;
  padding: var(--sp-s);
}

.dua-english {
  padding: var(--sp-s);
}

.dua-reading {
  padding: var(--sp-s);
}

.dua-benefit {
  padding: var(--sp-s);
  background-color: var(--times-color);
  color: white;
  border-radius: var(--rad-m);
}

.dua-reference {
  padding: var(--sp-s);
  font-size: var(--p-xs);
  opacity: 0.8;
}

.dua-count {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 24px;
  line-height: 0;
  font-weight: 500;
  width: min-content;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-s);
  background-color: var(--times-color);
  color: #fff;
  border-radius: var(--rad-l) 0 var(--rad-l) 0;
}

.dua-count::after {
  content: "time";
  font-size: 0.75rem;
  margin-top: var(--sp-m);
  font-weight: 700;
}

.quick-duas .dua-count::before {
  content: attr(data-quick-count);
}

.regular-duas .dua-count::before {
  content: attr(data-regular-count);
}

.long-duas .dua-count::before {
  content: attr(data-long-count);
}

.hide-reading .dua-reading {
  display: none;
}

.hide-meaning .dua-english {
  display: none;
}

.hide-benefit .dua-benefit {
  display: none;
}

.hide-reference .dua-reference {
  display: none;
}

.time-morning .dua-wrapper[data-time="evening"] {
  display: none;
}

.time-evening .dua-wrapper[data-time="morning"] {
  display: none;
}

/* Filters */
.filters-wrapper {
  margin-bottom: var(--sp-m);
}

.choices-wrapper {
  margin-top: var(--sp-m);
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  flex-direction: row;
  gap: var(--sp-s);
}

.choices-wrapper > label:not(:last-child) {
  margin-right: var(--sp-m);
}

.choices-wrapper > label {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  align-content: center;
  align-items: center;
}

.choices-wrapper > label > input {
  margin-right: var(--sp-xs);
  accent-color: var(--times-color);
  width: 1em;
  height: 1em;
}

.choice-wrapper input[type="checkbox"] {
  display: none;
}

.choice-wrapper label {
  display: inline-block;
  padding: 0.5em 1em;
  border: 1px solid;
  border-radius: 20px;
  cursor: pointer;
  background-color: white;
  color: hsl(192.24deg 83.02% 31.69%);
}

.choice-wrapper input[type="checkbox"]:checked + label {
  background-color: var(--times-color);
  color: white;
  border: 1px solid var(--times-color);
}

@media screen and (max-width: 480px) {
  .choices-wrapper {
    display: flex;
    margin-inline: auto;
    width: 90vw;
    grid-template-columns: (auto-fit, minmax(240px, 1fr));
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .choices-wrapper > label {
    justify-items: center;
  }
}

/* Morning Evening Switch */

.toggle-div {
  display: flex;
  flex-direction: column;
  margin: auto;
  text-align: center;
  width: 70%;
  transform: translateY(5%);
}

.toggle-wrapper,
.toggle {
  height: 2.8rem;
  border-radius: 100px;
}

#switch {
  display: none;
}

.toggle-wrapper {
  width: 100%;
  margin-inline: auto;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 100px;
  position: relative;
  cursor: pointer;
}

.toggle {
  position: absolute;
  width: 50%;
  background-color: #fff;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease-in-out;
}

.names {
  font-size: 90%;
  font-weight: bolder;
  width: 100%;
  margin-top: 3.5%;
  position: absolute;
  display: flex;
  justify-content: space-around;
  user-select: none;
}

.dark {
  opacity: 0.5;
}

[type="checkbox"]:checked + .toggle-wrapper .toggle {
  transform: translateX(100%);
  background-color: #34323d;
}

[type="checkbox"]:checked + .toggle-wrapper .dark {
  opacity: 1;
  color: white;
}

[type="checkbox"]:checked + .toggle-wrapper .light {
  opacity: 0.5;
}
