:root {
  --headline-1: 3rem;
  --headline-4: 1.5rem;
  --button-blue: #007bff;
  --hover-lightblue: #e0f7fa;
  --hover-blue: #007bff;
  --hover-darkblue: #0056b3;
  --identity-clr: #007bff;
  --bx-shadow-task: 0 2px 8px rgba(0, 0, 0, 0.1);
  --bg-clr-1: #ffffff;
}

.contacts-container {
  display: flex;
  height: calc(100vh - 60px);
  /* Ensure the container takes up the full available height */
}

.contacts-list {
  width: 450px;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 80px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

.add-contact-btn {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  color: white;
  background-color: var(--button-blue);
  border: none;
  border-radius: 5px;
  margin-bottom: 20px;
  cursor: pointer;
}

.contact-group {
  margin-bottom: 20px;
}

.contact-group-title {
  font-size: 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 5px;
}

.contact {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact:hover {
  background-color: var(--hover-lightblue);
  border-radius: 5px;
}

.contact.selected {
  background-color: var(--hover-blue);
  color: white;
  border-radius: 5px;
}

.contact.selected .contact-email {
  color: white;
}

.contact-initials {
  border-radius: 100px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-right: 10px;
}

.contact-info {
  flex-grow: 1;
}

.contact-name {
  font-size: 19px;
  flex-grow: 1;
}

.contact-name-detail {
  font-size: var(--headline-1);
}

.contact-email {
  font-size: 14px;
  color: gray;
}

.contact-detail {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
}

.contact-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.contact-initials-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
  margin-right: 20px;
}

.name-initial-container {
  display: flex;
  align-items: center;
}

.contact-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 1rem;
}

.contact-actions button {
  display: flex;
  align-items: center;
  background-color: transparent;
  border: none;
  color: black;
  font-size: 16px;
  cursor: pointer;
  padding: 5px 10px;
  transition: color 0.3s ease;
}

.contact-actions-btn {
  display: flex;
}

.return-img {
  cursor: pointer;
}

.contact-actions button img {
  margin-right: 5px;
  width: 20px;
}

.edit-btn:hover,
.delete-btn:hover {
  color: var(--hover-darkblue);
  font-weight: bold;
}

.contact-detail-info h2 {
  margin-top: 0;
  color: black;
}

.contact-detail-info p {
  margin: 5px 0;
}

.contact-detail-info button {
  margin-right: 10px;
  padding: 10px 20px;
  background-color: var(--button-blue);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.contact-detail-info a {
  color: var(--identity-clr);
  text-decoration: none;
}

.contact-detail-info a:hover {
  text-decoration: underline;
}

/* Neues Design für das Popup */

.contact-dialog {
  height: 100vh;
  width: 100%;
  box-shadow: var(--bx-shadow-task);
  color: var(--bg-clr-1);
}

.contact-popup-header {
  display: flex;
  border-top-left-radius: 30px;
  background-color: #005dff;
  padding: 40px;
  justify-content: center;
  align-items: center;
}

.contact-logo-white {
  height: 80px;
}

.contact-logo-slogan {
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: center;
}

.contact-popup-header h1 {
  font-size: var(--headline-1);
  margin-bottom: 0;
}

.contact-popup-header p {
  font-size: var(--headline-4);
}

.contact-img-container {
  height: 30px;
}

.contact-close-btn {
  width: 24px;
  height: 24px;
  position: absolute;
  top: 30px;
  left: 470px;
  cursor: pointer;
}

.contact-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  position: absolute;
  z-index: 1;
  top: 250px;
}

.contact-person-icon {
  background-color: #d1d1d1;
  border-radius: 50%;
  padding: 36px;
  border: 2px solid white;
}

.contact-popup-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 124px;
}

.contact-input-group {
  position: relative;
  margin: 15px 0;
}

.contact-input-group input {
  width: 310px;
  padding: 10px 35px 10px 10px;
  border: none;
  border-bottom: 2px solid #d1d1d1;
  font-size: 16px;
}

.contact-input-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
}

.contact-button-group {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.contact-cancel-btn,
.contact-create-btn {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.contact-cancel-btn {
  background-color: #d1d1d1;
  color: #000;
}

.contact-create-btn {
  background-color: var(--button-blue);
  color: #fff;
}

/* Dialog Container */
.dialog-container {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 100%;
  z-index: 998;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: flex-end;
}

.task-dialog {
  background: white;
  max-width: 500px;
  transition: right 0.3s ease;
  position: absolute;
  right: -600px;
}

.task-dialog.show {
  right: 0;
}

.task-dialog {
  padding-left: 0;
}

@media (max-width: 1170px) {
  .contact-detail .contact-name-detail {
    font-size: 2rem;
  }

  .contact-detail-info h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 1030px) {
  .contact-detail .contact-initials-large {
    width: 80px;
    height: 80px;
    font-size: 28px;
  }
}

@media (max-width: 990px) {
  .contacts-list {
    width: 350px;
  }
}

@media (max-width: 800px) {
  .contacts-container {
    flex-direction: column;
  }

  .contacts-list {
    margin-bottom: 80px;
  }

  .contacts-list,
  .contact-detail {
    width: calc(100% - 40px);
  }

  .contact-detail {
    display: none;
  }

  .contact.selected + .contact-detail {
    display: block;
  }

  .contacts-list.hidden {
    display: none;
  }

  .contact-detail.visible {
    display: block;
  }
}

@media (max-width: 500px) {
  .task-dialog {
    max-width: unset;
    width: 100%;
    border-top-left-radius: unset;
    border-bottom-left-radius: unset;
  }

  .contact-logo-slogan {
    padding: unset;
  }

  .contact-popup-header {
    border-top-left-radius: unset;
    height: 100px;
  }

  .contact-icon-container {
    padding: unset;
    margin-top: unset;
  }

  .contact-button-group {
    margin-top: 10px;
  }

  .contact-close-btn {
    left: 20px;
  }

  h1 {
    margin-top: unset;
  }

  .contact-popup-main {
    margin-top: 100px;
  }

  .contact-button-group {
    justify-content: center;
    margin-top: 42px;
  }

  .contact-cancel-btn {
    display: none;
  }

  .contact-logo-white {
    display: none;
  }

  .contact-popup-header {
    padding: 90px;
  }

  .contact-input-group input {
    width: unset;
  }

  form {
    margin-top: 100px;
  }
}

@media (max-height: 740px) {
  .contact-close-btn {
    left: 320px;
  }
}

@media (max-height: 600px) {
  .task-dialog {
    max-width: unset;
    width: 100%;
    border-top-left-radius: unset;
    border-bottom-left-radius: unset;
  }

  .contact-logo-slogan {
    padding: unset;
  }

  .contact-popup-header {
    border-top-left-radius: unset;
    height: 100px;
  }

  .contact-icon-container {
    padding: unset;
    margin-top: unset;
  }

  .contact-button-group {
    margin-top: 10px;
  }

  .contact-close-btn {
    left: 360px;
  }

  h1 {
    margin-top: unset;
  }
}
