* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: bisque;
  font-family: Arial, Helvetica, sans-serif;
}

.main-container {
  display: flex;
  flex-direction: row;
  width: 100%;
}

.landing {
  padding: 0 1%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* main axis */
  align-items: center;
  /* cross axis */
  min-height: 100vh;
  min-width: 35vw;
  width: min-content;
  background: url('./assets/images/odin-digital.jpg') no-repeat left top / cover;
  overflow: hidden;
  gap: 5%;
}

.header {
  overflow: hidden;
  color: bisque;
}

.title {
  display: flex;
  flex-direction: row;
  place-content: center center;
  gap: 5%;
}

.logo {
  min-width: 21px;
  min-height: 46px;
}

.title-text {
  font-size: clamp(3.5rem, 9vw, 5rem);
  font-weight: 900;
  letter-spacing: clamp(0.0rem, 1vw, 0.5rem);
}

.subtitle {
  font-family: 'Trebuchet MS', 'Lucida Sans', Arial, sans-serif;
  font-style: italic;
  text-align: center;
  font-size: clamp(0.6rem, 4vw, 1rem);
  font-weight: 600;
  letter-spacing: clamp(0rem, 1vw, 0.4rem);
}

.logic {
  display: flex;
  flex-direction: column;
  padding: 0 1%;
  height: 100vh;
  width: 65vw;
  min-width: min-content;
}

.nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  margin-top: 4%;
  justify-content: space-evenly;
  gap: 10%;
  padding: 0 5%;
}

#listTitle {
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  font-weight: 600;
  letter-spacing: clamp(0.0rem, 0.5vw, 0.5rem);
  text-align: center;
  color: darkolivegreen;
  /* white-space: nowrap; */
}

i {
  font-size: smaller;
  font-weight: 200;
}

#openBtn {
  align-items: center;
  width: 120px;
  height: 38px;
  min-width: min-content;
  border: none;
  border-radius: 5px;
  background: darkolivegreen;
  color: ivory;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  font-weight: 600;
}

#openBtn:hover {
  background: rgb(50, 70, 30);
  color: bisque;
}

ul {
  list-style-type: none;
  margin: 1% 5%;
}

/* Target the Previous Sibling using :has() pseudo-class 
   Positioning .delete-icon wrt its next sibling li */
.delete-icon:has(+ li) {
  position: relative;
  top: 2.5rem;
  right: -93%;
}

.delete-icon {
  cursor: pointer;
  content: url("./assets/icons/delete.png");
}

.delete-icon:hover {
  content: url("./assets/icons/delete-hover.png");
}

.list-item {
  padding: 0.5rem 1rem;
  text-align: center;
  font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
  letter-spacing: 0.1rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
}

input[type="checkbox"] {
  vertical-align: middle;
}

.modal-overlay {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(0.25rem);
  /* 4px */
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 0.75rem;
  /* 12px */
  width: 90vw;
  /* Responsive width on mobile */
  max-width: 25rem;
  /* Max 400px on desktop */
  position: relative;
  box-shadow: 0 0.625rem 1.5rem rgba(0, 0, 0, 0.1);
}

.close-icon {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  cursor: pointer;
  font-size: 1.5rem;
  color: #888;
}

.close-icon:hover {
  color: crimson;
}

h2 {
  margin-bottom: 1.25rem;
  color: #333;
  font-size: 1.5rem;
}

.input-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  gap: 3rem;
  /* Space between columns */
}

/* Make columns equal width */
.row .input-group {
  flex: 1;
}

label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.3rem;
}

.file-upload-wrapper {
  position: relative;
  width: 100%;
}

input[type="file"] {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.875rem;
  color: #555;
  background: #fafafa;
  border: 0.063rem dashed #ccc;
  /* Dashed border for upload feel */
  border-radius: 0.375rem;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  padding: 0.3rem 0.6rem;
  margin-right: 0.6rem;
  background: #4A90E2;
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  font-family: sans-serif;
  font-size: 0.75rem;
}

input[type="file"]:hover {
  border-color: #4A90E2;
  background: #f0f7ff;
}

input[type="text"],
input[type="number"] {
  padding: 0.625rem;
  border: 0.063rem solid #ddd;
  border-radius: 0.375rem;
  outline: none;
  font-size: 1rem;
}

input:focus {
  border-color: #4A90E2;
  box-shadow: 0 0 0 0.125rem rgba(74, 144, 226, 0.1);
}

.radio-group {
  display: flex;
  gap: 1rem;
  padding-top: 0.6rem;
}

.radio-group label {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.error-msg {
  color: #e74c3c;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  min-height: 0.875rem;
  /* Prevents layout jump */
}

.submit-btn {
  width: 100%;
  padding: 0.75rem;
  background: #4A90E2;
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: #f4f7f6 0.3s ease;
  margin-top: 0.5rem;
}

.submit-btn:hover {
  background: #357ABD;
}

/* Mobile Tweak: Stack columns if screen is too narrow */
@media (max-width: 600px) {
  .modal-content, 
  .delete-icon {
    filter: invert(100%);
  }

  .delete-icon:hover {
    filter: none;
  }

  .row {
    flex-direction: column;
    gap: 0;
  }

  .main-container {
    flex-direction: column;
    background: url('./assets/images/odin-digital.jpg') no-repeat left top / cover;
    overflow: hidden;
  }

  .landing {
    margin: 2% auto;
    display: flex;
    flex-direction: row;
    align-content: center;
    min-height: 10vh;
    width: 100%;
    min-width: none;
    background: none;
  }

  .header {
    display: flex;
    flex-direction: column;
    justify-items: center;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
  }

  .logic {
    width: 100%;
  }

  #openBtn {
    margin-top: 4%;
  }

  ul {
    margin: 0;
  }
}