/*!**********************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js!./src/DOM/DOMapp.css ***!
  \**********************************************************************/
/* Font style declarations */
@font-face {
  font-family: "Urbanist";
  src: url(fonts/a6ee275138c2c861fd11.woff);
  font-weight: 400;
  font-style: normal;
  unicode-range: U+000-5FF;
  font-display: swap;
}

@font-face {
  font-family: "Urbanist";
  src: url(fonts/4db034b7de3d28210801.woff);
  font-weight: 700;
  font-style: normal;
  unicode-range: U+000-5FF;
  font-display: swap;
}

*,
*::after,
*::before {
  font-family:
    "Urbanist",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
  box-sizing: border-box;
  /* Disables the colored highlight that is supposed to appear over a link while it's being 
    tapped but also appears over button elements on mobile devices */
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: 0;
  text-transform: lowercase;
}

* {
  --color1: #151515;
  --color2: #ffffff;
  --color3: #dddddd;
  --color4: #5e5e5e;
}

body button {
  position: relative;
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 0.2rem;
}

body button::after {
  position: absolute;
  content: "";
  z-index: -1;
  width: 120%;
  height: 120%;
  left: -10%;
  bottom: 0;
  background-image: linear-gradient(
    to top,
    hsl(0, 0%, 85%) 0%,
    hsl(0, 0%, 85.21%) 8.1%,
    hsl(0, 0%, 85.79%) 15.5%,
    hsl(0, 0%, 86.68%) 22.5%,
    hsl(0, 0%, 87.82%) 29%,
    hsl(0, 0%, 89.13%) 35.3%,
    hsl(0, 0%, 90.56%) 41.2%,
    hsl(0, 0%, 92.05%) 47.1%,
    hsl(0, 0%, 93.55%) 52.9%,
    hsl(0, 0%, 94.99%) 58.8%,
    hsl(0, 0%, 96.34%) 64.7%,
    hsl(0, 0%, 97.54%) 71%,
    hsl(0, 0%, 98.55%) 77.5%,
    hsl(0, 0%, 99.32%) 84.5%,
    hsl(0, 0%, 99.82%) 91.9%,
    hsl(0, 0%, 100%) 100%
  );
  clip-path: polygon(0 1%, 100% 0, 90% 100%, 10% 100%);
  opacity: 0;
}

@media (hover: hover) {
  body button:hover::after {
    opacity: 1;
  }
}

body button.mobile:hover::after {
  opacity: 0;
}

body button.mobile.clicked::after {
  animation: clickEffect 0.3s ease;
}

@keyframes clickEffect {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

body button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@media (hover: hover) {
  body button:disabled:hover::after {
    opacity: 0;
  }
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  justify-content: space-between;
  background-color: var(--color2);
  color: var(--color1);
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

header h1 {
  font-size: 4rem;
  margin-top: 1rem;
}

.game-manipulation_btns {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.game-manipulation_btns button {
  width: 140px;
  font-size: 1.1rem;
  background-color: transparent;
  color: var(--color1);
  border-bottom: 1px solid var(--color1);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding: 0.75rem 0;
}

.game-manipulation_btns button:last-of-type {
  margin-left: 4rem;
}

.game-container {
  margin-top: 4rem;
}

.game-sides {
  display: flex;
  gap: 8rem;
}

.game-sides > div.disabled {
  opacity: 0.5;
}

.player-info,
.computer-info {
  display: flex;
  justify-content: space-between;
}

.player-info div,
.computer-info div {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 0;
}

.player-score,
.computer-score {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.player-score {
  margin-right: 20px;
}

.computer-score {
  margin-left: 20px;
}

.score-point {
  width: 2px;
  height: 18px;
  background-color: var(--color1);
  transform: rotate(25deg);
}

.player-gameboard,
.computer-gameboard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color4);
  border-radius: 0.2rem;
}

.x-axis {
  display: flex;
}

.player-gameboard .y-axis,
.computer-gameboard .y-axis {
  position: relative;
  width: 40px;
  height: 40px;
  border-right: 1px solid var(--color4);
  border-bottom: 1px solid var(--color4);
}

.x-axis:last-of-type .y-axis {
  border-bottom: 0;
}

.y-axis:last-of-type {
  border-right: 0;
}

@media (hover: hover) {
  .computer-gameboard .y-axis:hover {
    background-color: rgba(0, 255, 50, 0.2);
    cursor: crosshair;
  }
}

.y-axis.is-hit {
  pointer-events: none;
  background-color: rgba(0, 0, 0, 0.1);
}

.y-axis.is-hit::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 16px;
  width: 6px;
  height: 6px;
  background-color: var(--color4);
  border-radius: 100%;
}

.y-axis.is-hit.is-collateral-damage::before {
  background-color: rgba(0, 0, 0, 0.3);
}

.y-axis.last-hit {
  background-color: rgba(255, 255, 0, 0.2);
}

.y-axis.own-ship {
  background-color: rgba(0, 0, 255, 0.2);
}

.y-axis.own-ship.last-hit {
  background-color: rgba(255, 255, 0, 0.2);
}

.y-axis.damaged-ship::before {
  content: "";
  top: 10%;
  left: calc(50% - 1px);
  width: 2px;
  height: 80%;
  background-color: rgba(206, 37, 37, 1);
  border-radius: unset;
  transform: rotate(-45deg);
}

.y-axis.damaged-ship::after {
  content: "";
  position: absolute;
  top: 10%;
  left: calc(50% - 1px);
  width: 2px;
  height: 80%;
  background-color: rgba(206, 37, 37, 1);
  border-radius: unset;
  transform: rotate(45deg);
}

.y-axis.sunk-ship {
  background-color: rgba(255, 0, 0, 0.2);
}

.y-axis.sunk-ship.last-hit {
  background-color: rgba(255, 255, 0, 0.2);
}

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  margin-top: 4rem;
}

.links {
  display: flex;
  gap: 0.5rem;
}

.links svg {
  width: 34px;
  height: 34px;
  fill: var(--color1);
}

.winner-modal {
  display: none;
  position: fixed;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
}

.winner-wrapper {
  z-index: 100;
  position: relative;
  max-width: 300px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--color2);
  box-shadow: 0 0 60px 0 rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  margin-bottom: 8rem;
  padding: 2rem;
}

.winner-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.play-again_btn {
  width: 140px;
  font-size: 1.1rem;
  background-color: transparent;
  color: var(--color1);
  border-width: 1px;
  border-style: solid;
  border-color: transparent;
  border-bottom-color: var(--color1);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-top: 2rem;
  padding: 0.75rem 0;
}

@media (max-width: 1024px) {
  body {
    height: 100%;
  }

  .game-sides {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 650px) {
  header h1 {
    font-size: 3rem;
  }

  .game-manipulation_btns {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
  }

  .game-container {
    margin-top: 1.5rem;
  }

  .player-gameboard .y-axis,
  .computer-gameboard .y-axis {
    width: 30px;
    height: 30px;
  }

  .y-axis.is-hit::before {
    top: 12px;
    left: 12px;
  }

  .y-axis.damaged-ship::before {
    top: 10%;
    left: calc(50% - 1px);
  }

  footer {
    margin-top: 2rem;
  }
}

/*!*****************************************************************************************************!*\
  !*** css ./node_modules/css-loader/dist/cjs.js!./src/DOM/shipPlacementModal/shipPlacementModal.css ***!
  \*****************************************************************************************************/
.ship-placement_modal {
  display: none;
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  background-color: var(--color2);
}

.ship-placement_wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ship-placement_title {
  margin-top: 2rem;
  font-size: 2rem;
}

.ship-placement_actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.ship-placement_actions button {
  width: 80px;
  font-size: 1.1rem;
  background-color: transparent;
  color: var(--color1);
  border-bottom: 1px solid var(--color1);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding: 0.5rem 0;
}

.ship-placement_area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
}

.ship-placement_ships {
  max-width: 388px;
  height: 200px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.ship-placement_ships.rotate-x {
  align-content: center;
}

.ship-placement_ships.rotate-y {
  align-items: end;
}

.placement-ship_wrapper {
  background-image: linear-gradient(
    to bottom right,
    rgba(0, 0, 0, 0.1),
    rgba(0, 0, 0, 0)
  );
  border: 1px solid var(--color1);
  border-radius: 0.2rem;
}

.placement-ship_wrapper.holds-destroyer.rotate-x,
#destroyer.rotate-x {
  width: 80px;
  height: 40px;
}

.placement-ship_wrapper.holds-submarine.rotate-x,
.placement-ship_wrapper.holds-cruiser.rotate-x,
#submarine.rotate-x,
#cruiser.rotate-x {
  width: 120px;
  height: 40px;
}

.placement-ship_wrapper.holds-battleship.rotate-x,
#battleship.rotate-x {
  width: 160px;
  height: 40px;
}

.placement-ship_wrapper.holds-carrier.rotate-x,
#carrier.rotate-x {
  width: 200px;
  height: 40px;
}

.placement-ship_wrapper.holds-destroyer.rotate-y,
#destroyer.rotate-y {
  width: 40px;
  height: 80px;
}

.placement-ship_wrapper.holds-submarine.rotate-y,
.placement-ship_wrapper.holds-cruiser.rotate-y,
#submarine.rotate-y,
#cruiser.rotate-y {
  width: 40px;
  height: 120px;
}

.placement-ship_wrapper.holds-battleship.rotate-y,
#battleship.rotate-y {
  width: 40px;
  height: 160px;
}

.placement-ship_wrapper.holds-carrier.rotate-y,
#carrier.rotate-y {
  width: 40px;
  height: 200px;
}

.placement-ship {
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
  background-image: linear-gradient(to bottom right, #a4a4d7, #b6b6e9);
  color: var(--color1);
  outline: 1px solid var(--color1);
  border-radius: 0.2rem;
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.placement-ship.being-dragged {
  cursor: grabbing;
}

.placement-ship.rotate-y {
  flex-direction: column;
  align-self: center;
  writing-mode: vertical-lr;
}

.ship-placement_gameboard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color4);
  border-radius: 0.2rem;
  margin-top: 2rem;
}

.ship-placement_gameboard .y-axis {
  position: relative;
  width: 40px;
  height: 40px;
  border-right: 1px solid var(--color4);
  border-bottom: 1px solid var(--color4);
}

.ship-placement_gameboard .y-axis.hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.ship-placement_gameboard .y-axis:last-of-type {
  border-right: 0;
}

@media (max-width: 650px) {
  .ship-placement_title {
    font-size: 1.75rem;
    margin-top: 1.75rem;
  }

  .ship-placement_area {
    margin-top: 1rem;
  }

  .ship-placement_ships {
    max-width: 325px;
    height: 160px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .placement-ship {
    font-size: 10px;
  }

  .placement-ship_wrapper.holds-destroyer.rotate-x,
  #destroyer.rotate-x {
    width: 64px;
    height: 32px;
  }

  .placement-ship_wrapper.holds-submarine.rotate-x,
  .placement-ship_wrapper.holds-cruiser.rotate-x,
  #submarine.rotate-x,
  #cruiser.rotate-x {
    width: 96px;
    height: 32px;
  }

  .placement-ship_wrapper.holds-battleship.rotate-x,
  #battleship.rotate-x {
    width: 128px;
    height: 32px;
  }

  .placement-ship_wrapper.holds-carrier.rotate-x,
  #carrier.rotate-x {
    width: 160px;
    height: 32px;
  }

  .placement-ship_wrapper.holds-destroyer.rotate-y,
  #destroyer.rotate-y {
    width: 32px;
    height: 64px;
  }

  .placement-ship_wrapper.holds-submarine.rotate-y,
  .placement-ship_wrapper.holds-cruiser.rotate-y,
  #submarine.rotate-y,
  #cruiser.rotate-y {
    width: 32px;
    height: 96px;
  }

  .placement-ship_wrapper.holds-battleship.rotate-y,
  #battleship.rotate-y {
    width: 32px;
    height: 128px;
  }

  .placement-ship_wrapper.holds-carrier.rotate-y,
  #carrier.rotate-y {
    width: 32px;
    height: 160px;
  }

  .ship-placement_gameboard {
    margin-top: 1rem;
  }

  .ship-placement_gameboard .y-axis {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 350px) {
  .ship-placement_title {
    font-size: 1.5rem;
    margin-top: 1rem;
  }

  .ship-placement_actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .ship-placement_actions button {
    width: 60px;
    font-size: 1rem;
    padding: 0.5rem 0;
  }

  .ship-placement_ships {
    max-width: 325px;
    height: 150px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .placement-ship {
    font-size: 0.5rem;
  }

  .placement-ship_wrapper.holds-destroyer.rotate-x,
  #destroyer.rotate-x {
    width: 50px;
    height: 25px;
  }

  .placement-ship_wrapper.holds-submarine.rotate-x,
  .placement-ship_wrapper.holds-cruiser.rotate-x,
  #submarine.rotate-x,
  #cruiser.rotate-x {
    width: 75px;
    height: 25px;
  }

  .placement-ship_wrapper.holds-battleship.rotate-x,
  #battleship.rotate-x {
    width: 100px;
    height: 25px;
  }

  .placement-ship_wrapper.holds-carrier.rotate-x,
  #carrier.rotate-x {
    width: 125px;
    height: 25px;
  }

  .placement-ship_wrapper.holds-destroyer.rotate-y,
  #destroyer.rotate-y {
    width: 25px;
    height: 50px;
  }

  .placement-ship_wrapper.holds-submarine.rotate-y,
  .placement-ship_wrapper.holds-cruiser.rotate-y,
  #submarine.rotate-y,
  #cruiser.rotate-y {
    width: 25px;
    height: 75px;
  }

  .placement-ship_wrapper.holds-battleship.rotate-y,
  #battleship.rotate-y {
    width: 25px;
    height: 100px;
  }

  .placement-ship_wrapper.holds-carrier.rotate-y,
  #carrier.rotate-y {
    width: 25px;
    height: 125px;
  }

  .ship-placement_gameboard .y-axis {
    width: 25px;
    height: 25px;
  }
}

