/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap');

/* Reset default styles */
* {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

/* Background gradient */
body {
  background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Main container centering */
.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding-top: 30px;
}

/* Page title */
.main > h1 {
  color: #646464;
  font-weight: bold;
  text-shadow: 1px 1px #ffffff;
  font-size: 55px;
}

/* Currency Selector Styles */
currency-selector {
  margin: 20px 0;
  padding: 15px 25px;
  background-color: #ffffff83;
  border-radius: 10px;
  box-shadow: #ffffff62 0px 3px 8px;
  display: flex;
  align-items: center;
  gap: 20px;
}

currency-label {
  font-weight: 600;
  color: #646464;
  margin: 0;
  font-size: 16px;
}

currency-options {
  display: flex;
  gap: 15px;
  flex-wrap: nowrap;
}

currency-option {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  margin: 0;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.2s;
}

currency-option:hover {
  background-color: #ffffff50;
}

currency-option input[type="radio"] {
  cursor: pointer;
  margin: 0;
}

currency-option span {
  font-size: 14px;
  color: #646464;
  font-weight: 500;
}

/* Main content container */
.budget-container {
  height: auto;
  width: 85%;
  box-shadow: #00000059 0px 5px 15px;
  border-radius: 20px;
  background-color: #ffffff99;
  padding: 40px;
}

/* Input form container */
.add-budget-container,
.add-expense-container {
  box-shadow: #ffffff62 0px 3px 8px;
  padding: 20px;
  border-radius: 10px;
  background-color: #ffffff83;
}
/* Placeholder text styling */
input::placeholder {
  color: #bdbdbd;
  font-style: italic;
}

input::-webkit-input-placeholder {
  color: #bdbdbd;
  font-style: italic;
}

input::-moz-placeholder {
  color: #bdbdbd;
  font-style: italic;
}

input:-ms-input-placeholder {
  color: #bdbdbd;
  font-style: italic;
}

/* Custom Alert Styles */
.custom-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  background-color: #28a745;
  color: white;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  font-size: 16px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
}

.custom-alert.show {
  opacity: 1;
  transform: translateX(0);
}

.custom-alert.error {
  background-color: #dc3545;
}

.custom-alert.warning {
  background-color: #ffc107;
  color: #333;
}

/* Display area for budget summary and table */
.display-container {
  box-shadow: #ffffff62 0px 3px 8px;
  padding: 20px;
  border-radius: 10px;
  background-color: #ffffff83;
  width: 65%;
}

/* Table and mobile responsiveness */
@media screen and (max-width: 768px) {
  .main {
    height: auto;
    padding-top: 20px;
  }

  .main > h1 {
    font-size: 35px;
    text-align: center;
    padding: 0 10px;
    margin-bottom: 20px;
  }

  .budget-container {
    height: auto;
    width: 95%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .add-container {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    display: flex !important;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20%;
    padding: 0 !important;
  }

  .add-budget-container,
  .add-expense-container {
    width: 100%;
    padding: 15px;
    margin: 0 !important;
    box-sizing: border-box;
  }

  .add-budget-container {
    margin-bottom: 0;
  }

  .add-expense-container {
    margin-top: 0 !important;
  }

  .btn-danger.form-control {
    width: 100%;
    margin: 0;
  }

  .display-container {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 15px;
    box-sizing: border-box;
  }

  .heading {
    flex-wrap: wrap;
    justify-content: center !important;
    margin: 0 -5px;
  }

  .heading .alert {
    flex: 0 0 calc(50% - 10px);
    margin: 5px;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    box-sizing: border-box;
  }

  .heading .alert:nth-child(3) {
    flex: 0 0 calc(60% - 10px);
    margin: 5px auto;
  }
}
