/* Universal Styles */

/* * {
  border: 2px dashed limegreen; 
  box-sizing: border-box;
   margin:  0; 
  padding: 0;
}  */



/* Container for the button and options */
.dropdown-container {
  position: relative;
  display: inline-block;
}

/* Button Style */
.triangle-button {
  background-color: transparent;
  border: none;
  width: 6px;
  height: 6px;
  position: relative;
  /* margin-top: 4px; */
  margin-left: 2px;
  cursor: pointer;
}

/* Downward triangle */
.triangle-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid black;
  /* Triangle pointing down */
  transform: translate(-50%, -50%);
}

/* Upward triangle when toggled */
.dropdown-container.active .triangle-button::before {
  border-top: none;
  border-bottom: 6px solid black;
  /* Triangle pointing up */
}

/* Dropdown content (hidden by default) */
.dropdown-content {
  display: none;
  position: absolute;
  top: 16px;
  /* Adjust to position below the button */
  left: 0;
  background-color: white;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 15px;
}

/* Style for each option */
.dropdown-content a {
  color: black;
  /* padding was 12px at first position */
  padding: 4px 16px;
  text-decoration: none;
  display: block;
  margin: 0px;
}

/* Highlight options on hover */
.dropdown-content a:hover {
  background-color: #ddd;
}

/* Show dropdown content when active */
.dropdown-container.active .dropdown-content {
  display: block;
}


.budget-container {
  /* border: 2px solid red; */
  /* display: flex; */
  display: none;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.alloted-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 8px;
}

.alloted-balance {
  margin-right: 10px;
  font-size: 15px;
}

.alloted-input {
  width: 80px;
  height: 30px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: border 0.3s, box-shadow 0.3s;

}

.alloted-input:focus {
  border: 1px solid #2277b0;
  box-shadow: 0 0 5px #2277b0;
  /* Orange glow around the input */
  outline: none;
  /* Removes the default outline */
}


.alloted-select {
  display: inline-block;
  text-align: center;
  width: 80px;
  font-size: 15px;
  min-width: 0;
  max-width: 100%;
  /* margin: 0px 150px; */
  border: none;
  background-color: transparent;
}


.remain-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* border: 2px solid red; */
  align-items: center;
  margin-top: 8px;
  /* font-size: 15px; */
}

.remaining-bal {
  font-size: 20px;
}


.budget-form {
  /* border: 2px solid red; */
  height: 50px;
  margin: 0px;
  font-size: 50px;
  text-align: center;
  color: green;
}

.budget-select {
  display: inline-block;
  text-align: center;
  width: 80px;
  font-size: 12px;
  min-width: 0;
  max-width: 100%;
  /* margin: 0px 150px; */
  border: none;
  background-color: transparent;
}




body {
  font-family: monospace;
  display: flex;
  justify-content: center;
  height: 100vh;
  width: 100%;
  /* max-height: 100vh; */
  background-color: #f4f4f4;
  font-size: 2vw;
  /* Base font size using viewport width */
  margin: 0px;
  /* position: relative; */

}

/* Title and Notes */
.title {
  box-sizing: border-box;
  align-self: center;
  text-align: center;
  font-weight: bold;
  color: #28666e;
  /* border: 2px solid #0078D7; */
  border: 2px solid #28666e;
  border-radius: 40px;
  text-transform: uppercase;
  /* letter-spacing: 2px; */
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
  font-size: 5vw;
  margin: 10px;
  padding: 5px 70px;
  background-color: #a8dadc;
}

.k1 {
  color: #E63946;
  /* font-size: 45px; */
  /* color: #f6003d; */
}

.k2 {
  color: #E63946;
  /* font-size: 45px; */
  /* color: #f6003d; */
}



.title:active {
  background-color: #ccc;
}

.note-container {
  box-sizing: border-box;
  text-align: center;
  font-family: monospace;
  font-size: 1.5vw;
  /* padding: ; */
  margin: 0px 12px;
}

.dedication {
  /* border: 1px solid red; */
  font-size: 1.5vw;
  box-sizing: border-box;
  margin: 0px;
}

.dedication-container {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}


/* .add-job-button:active {
  background-color: #45a049;
} */





/* Containers */
.form-btn-container {
  /* border: 2px solid red; */
  /* try to use this as the flex container to contain evrything */
  /* add body 100#heitght */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 8px;
  height: 100vh;
}

.form-container {
  /* border: 2px dashed red; */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background-color: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  flex-grow: 1;
  flex-shrink: 1;
}



.button-container {
  /* border: 2px solid green; */
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 6px 10px;
  padding: 0px;
}

.save-clear-container {
  /* border: 2px solid pink; */
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0px 8px;
  padding: 0px;
}

/* .bottom-container {
  border: 2px solid red;
  margin-bottom: 0px;
  margin-left: 0px;
  margin-right: 0px;
  align-self: baseline;
} */

/* Job and Expense Inputs */
.job-input,
.expense-input {
  display: flex;
  flex-direction: row;
  align-items: center;
}



.job-input .job-name {
  flex: 2.5;
}

.job-input .rate-per-hour {
  flex: 2.2;
}

.job-input .hours-per-shift {
  flex: 2.5;
}

.job-input .no-of-shifts {
  flex: 1.2;
}

.job-input input[type="text"],
.job-input input[type="number"],
.expense-input input[type="text"],
.expense-input input[type="number"] {
  box-sizing: border-box;
  padding: 8px 4px;
  border: 1px solid #ccc;
  border-radius: 1px;
  width: 100%;
}

.job-input input[type="text"]:focus,
.job-input input[type="number"]:focus,
.expense-input input[type="text"]:focus,
.expense-input input[type="number"]:focus {

  /* outline: none;
  border: 1.5px solid rgb(250, 50, 50);
  border: 1.5px solid #2277b0;
  border-radius: 1px;
  box-shadow: 0 0 5px rgb(250, 50, 50); */
  /* outline: 1.5px solid #2277b0; */
}

.job-input select,
.expense-input select {
  padding: 7px 4px;
  border: 1px solid #ccc;
  border-radius: 1px;
  min-width: 0;
}

.job-input select:focus,
.expense-input select:focus {
  /* outline: none; */
  /* border-radius: 1px; */
  /* border: 1.5px solid rgb(250, 50, 50); */
  /* outline: 1.5px solid #2277b0; */
  /* box-shadow: 0 0 5px rgb(250, 50, 50); */
}

.job-input select {
  flex: 1.6;
}

.expense-input .expense-name {
  flex: 4.5;
}

.expense-input .amount {
  flex: 4;
}

.expense-input select {
  flex: 1.5;
}

.job-input .remove-job,
.expense-input .remove-expense {
  flex: .3;
  background-color: #e74c3c;
  color: white;
  padding: 7px;
  margin-left: 4px;
  border-radius: 5px;
  border: 1px solid white;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-input .remove-job:hover,
.expense-input .remove-expense:hover {
  background-color: #c0392b;
}

/* Headings */
h1 {
  /* border: 2px solid violet; */
  box-sizing: border-box;
  font-size: 4.5vw;
  margin: .4em 0px;
  font-family: monospace;
}

#total {
  box-sizing: border-box;
  /* border: 2px solid violet; */
  font-size: 4vw;
  font-family: monospace;
  margin: 0px 8px;
  /* max-height: 70vh;*/
  overflow-y: scroll;
  scroll-behavior: smooth;
  flex-grow: 1;
  flex-shrink: 1;
  /* overflow : 'auto'; */
  /* transition: opacity 0.5s ease-in-out;  */

}

#h1-earnings {
  cursor: pointer;
  user-select: none;
}

.h1-icon {
  /* border: 2px solid blue; */
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}


/* .h1-toggle-container#h1-toggle-earnings {
  margin-top: 100px;
} */

.h1-toggle-container {
  /* border:2px solid green; */
  /* box-sizing: border-box; */
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.financial-overview-container {
  /* border: 2px solid red; */
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0px;
  margin: 10px 0px 0px 0px;
}

/* Select Element */
select {
  text-transform: lowercase;
}

/* Buttons */
.compute-button {
  box-sizing: border-box;
  padding: 8px;
  /* border-radius: 4px; */
  border-radius: 20px;
  font-size: 2vw;
  cursor: pointer;
  transition: all 0.3s ease;
  width: auto;
  flex: 1;
  font-family: monospace;
  margin: 5px;
  border: none;
  color: white;
  /* Make text color white */
  font-weight: bold;
  /* Apply bold font weight */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 3vw;

  -webkit-tap-highlight-color: transparent;
}

.compute-button.save,
.compute-button.clear {
  box-sizing: border-box;
  flex: 1;
  /* background-color: #4CAF50; */
  background-color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* color: white; */
  color: black;
  padding: 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 5px;
  margin-left: 0px;
  margin-right: 0px;
  /* font-size: 3vw; */

  -webkit-tap-highlight-color: transparent;
}


.compute-button.save:active,
.compute-button.clear:active {
  background-color: #aaa;
  transform: translateY(1px);
  box-shadow: none;
}


/* Salary Button - Green Shade */
.compute-button.salary {
  background-color: #66bb6a;
  /* Light green */
}

.compute-button.salary:active {
  background-color: #4caf50;
  transform: translateY(1px);
  box-shadow: none;
}

/* Expense Button - Red Shade */
.compute-button.expense {
  background-color: #e57373;
  /* Light red */
}

.compute-button.expense:active {
  background-color: #f44336;
  transform: translateY(1px);
  box-shadow: none;
}

/* Net Income Button - Blue Shade */
.compute-button.income {
  background-color: #3388cc;
  /* Adjusted blue */
}


.compute-button.income:active {
  background-color: #2277b0;
  transform: translateY(1px);
  box-shadow: none;
}

.toggle-button {
  /* box-sizing: border-box; */
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: monospace;
  margin-right: 8px;
  color: black;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  -webkit-tap-highlight-color: transparent;
}

/* Buttons */
.add-job-icon {
  display: flex;
  box-sizing: border-box;
  margin-right: 2px;
  background-color: #45a049;
  border: 1px solid #45a049;
  border-radius: 50%;
  width: 6vw;
  height: 6vw;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 7vw;
  color: white;
  font-weight: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  -webkit-tap-highlight-color: transparent;
  /* Removes highlight on touch */
}

.edit-budget-icon {

  /* display: flex; */
  display: none;
  box-sizing: border-box;
  margin-right: 2px;
  background-color: #3388cc;
  border: none;
  border-radius: 50%;
  width: 6vw;
  height: 6vw;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 7vw;
  color: white;
  font-weight: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  -webkit-tap-highlight-color: transparent;
  /* Removes highlight on touch */
}

.edit-budget-icon:active {
  color: #2277b0;
  background-color: white;
  border: 1.5px solid #2277b0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(1px);
}


.add-job-icon:active {
  color: #3d8f42;
  background-color: white;
  border: 1.5px solid #3d8f42;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(1px);
}



#toggle-job {
  border: 1.5px solid #45a049;
}

#toggle-job:active {
  background-color: #45a049;
  transform: translateY(1px);
  box-shadow: none;
}


#toggle-exp {
  border: 1.5px solid #e57373;
}

#toggle-exp:active {
  background-color: #e57373;
  transform: translateY(1px);
  box-shadow: none;
}

#toggle-report {
  border: 1.5px solid #3388cc;
  padding: 2px 18px;
}

#toggle-report:active {
  background-color: #2277b0;
  transform: translateY(1px);
  box-shadow: none;
}

/* Media Queries */
@media (min-width: 1024px) {
  body {
    font-size: 16px;
  }

  #toggle-job:hover {
    background-color: #45a049;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
  }

  #toggle-job:active {
    background-color: #45a049;
    transform: translateY(1px);
    box-shadow: none;
  }

  #toggle-exp:hover {
    background-color: #e57373;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
  }

  #toggle-exp:active {
    background-color: #e57373;
    transform: translateY(1px);
    box-shadow: none;
  }

  #toggle-report:hover {
    background-color: #2277b0;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
  }

  #toggle-report:active {
    background-color: #2277b0;
    transform: translateY(1px);
    box-shadow: none;
  }

  .compute-button.expense:hover {
    background-color: #f44336;
    /* Red */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
  }

  .compute-button.expense:active {
    background-color: #f44336;
    transform: translateY(1px);
    box-shadow: none;
  }

  .compute-button.salary:hover {
    background-color: #4caf50;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
  }

  .compute-button.salary:active {
    background-color: #4caf50;
    transform: translateY(1px);
    box-shadow: none;
  }

  .compute-button.income:hover,
  .edit-budget-icon:hover {
    background-color: #2277b0;
    /* Darker blue for hover */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
  }

  .compute-button.income:active {
    background-color: #2277b0;
    transform: translateY(1px);
    box-shadow: none;
  }


  .add-job-icon:hover {
    color: #3d8f42;
    background-color: white;
    border: 1.5px solid #3d8f42;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
  }

  .add-job-icon:active {
    color: #3d8f42;
    background-color: white;
    border: 1.5px solid #3d8f42;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
  }

  .edit-budget-icon:hover {
    color: #2277b0;
    background-color: white;
    border: 1.5px solid #2277b0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
  }

  .edit-budget-icon:active {
    color: #2277b0;
    background-color: white;
    border: 1.5px solid #2277b0;
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  }


  .form-btn-container {
    /* border: 2px solid red; */
    display: flex;
    flex-direction: column;
    width: 60%;
    height: 100;
  }

  h1 {
    font-size: 24px;
  }

  #total {
    font-size: 22px;
  }

  .add-job-icon,
  .edit-budget-icon {
    width: 24px;
    height: 24px;
    font-size: 24px;
  }

  .form-container {
    width: 100%;
  }

  .job-input input,
  .job-input select,
  .expense-input input,
  .expense-input select,
  .job-input .remove-job,
  .expense-input .remove-expense {
    font-size: 16px;
    width: auto;
  }

  .add-job-button {
    font-size: 16px;
  }

  .compute-button {
    font-size: 16px;
  }

  .compute-button.save:hover,
  .compute-button.clear:hover {
    background-color: #aaa;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
  }

  .compute-button.save:active,
  .compute-button.clear:active {
    background-color: #aaa;
    transform: translateY(1px);
    box-shadow: none;
  }

  .compute-button.salary:active {
    background-color: #4caf50;
    transform: translateY(1px);
    box-shadow: none;
  }

  .toggle-button {
    font-size: 10px;
    cursor: pointer;
    padding: 2px 10px;
    /* margin: 20px 20px 20px 10px; */

  }

  .title {
    font-size: 3rem;
  }

  .note-container {
    font-size: 12px;
    margin: 0px 12px;
  }

  .dedication {
    font-size: 10px;
  }

  .triangle-button {
    /* border: 2px solid red; */
    background-color: transparent;
    border: none;
    width: 8px;
    height: 8px;
    position: relative;
    /* margin-top: 4px; */
    margin-left: 8px;
    cursor: pointer;
  }

  /* Downward triangle */
  .triangle-button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid black;
    /* Triangle pointing down */
    transform: translate(-50%, -50%);
  }

  /* Upward triangle when toggled */
  .dropdown-container.active .triangle-button::before {
    border-top: none;
    border-bottom: 8px solid black;
    /* Triangle pointing up */
  }

}