/* Bootstrap-Anpassungen */
:root {
  --bs-primary: #002b5c;
  --bs-primary-rgb: 0, 43, 92;
}

.btn-primary {
  background-color: #002b5c;
  border-color: #002b5c;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: #001e42 !important;
  border-color: #001e42 !important;
}

.bg-primary {
  background-color: #002b5c !important;
}

/* Layout */
body {
  padding-top: 56px;
}

/* Navigation */
.nav-link {
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--bs-primary) !important;
  padding: 0.8rem 1.5rem !important;
  transition: background-color 0.2s;
}

.nav-link:hover {
  background-color: rgba(0, 43, 92, 0.05);
}

.nav-link i {
  margin-right: 0.5rem;
  width: 1.2em;
  text-align: center;
}

/* Offcanvas Menu Header */
.offcanvas-header {
  background-color: var(--bs-primary);
  color: white;
  padding: 1rem 1.5rem;
}

.offcanvas-title {
  color: white;
  font-weight: 600;
}

.btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.8;
}

.btn-close:hover {
  opacity: 1;
}

.back-button {
  cursor: pointer;
  color: white;
  font-size: 1.5rem;
  margin-right: 12px;
}

.navbar-title {
  display: flex;
  align-items: center;
}

/* Chat-Komponenten */
.message-bubble {
  border-radius: 1rem;
  padding: 10px 15px;
  margin: 5px 0;
  max-width: 80%;
}

.message-left {
  background-color: #f1f1f1;
  align-self: flex-start;
}

.message-right {
  background-color: #002b5c;
  color: white;
  align-self: flex-end;
}

.chat-box {
  display: flex;
  flex-direction: column;
  height: 70vh;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.swipe-container {
  position: relative;
  width: 100%;
  min-height: 72px;
  overflow: visible;
}

.delete-box {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 80px;
  height: 100%;
  background: #ffb3b3;
  border-radius: 0 12px 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  box-shadow: 0 2px 8px -2px #d9534f33;
  transition: opacity 0.2s, visibility 0.2s;
}

.delete-box .delete-btn {
  background: transparent;
  border: none;
  color: #222;
  padding: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
}

.delete-box .delete-btn i {
  font-size: 24px;
  transition: transform 0.2s;
}


.delete-box .delete-btn:hover, .delete-box .delete-btn:focus {
  color: #a71d2a;
}

.message-entry {
  position: relative;
  background: white;
  z-index: 1;
  transition: transform 0.2s;
}

.message-entry.swiped, .message-entry[style*="background-color: #ffd6d6"], .message-entry[style*="translateX(-"] {
  /* Kein roter Hintergrund mehr für den Eintrag selbst */
  transition: transform 0.25s cubic-bezier(.4,1.5,.5,1), box-shadow 0.2s;
  box-shadow: 0 4px 24px -4px #d9534f33;
}

.message-list .item-icon {
  font-size: 1.8rem;
  margin-right: 10px;
  width: 30px;
  text-align: center;
}

.message-list .message-entry {
  position: relative;
  background: white;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.2s;
  min-height: 72px; /* Ensure consistent height */
}

.message-date-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  height: 100%;
  gap: 4px;
}

.message-date {
  color: #6c757d;
  white-space: nowrap;
  display: flex;
  align-items: center;
  height: 100%;
}

.message-list .message-text {
  flex-grow: 1;
  margin-left: 10px;
}

.message-list .message-preview {
  font-size: 0.9rem;
  color: #555;
}

/* Buttons */
.fab-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: transform 0.2s, box-shadow 0.2s;
}

.fab-button i {
  font-size: 1.5em;
  line-height: 1;
}

.fab-button:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Empty state message styling */
.empty-state-message {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh; /* Nimmt die volle Höhe des sichtbaren Bereichs ein */
  color: #6c757d;
  text-align: center;
  padding: 2rem;
  font-size: 1.25rem; /* Größere Schrift */
  line-height: 1.5;
}

.empty-state-message p {
  max-width: 300px;
  margin: 0 auto;
}

.empty-state-message .bi-plus-circle-fill {
  font-size: 1.3em; /* Etwas größeres Plus-Icon */
  vertical-align: middle;
  margin: 0 4px;
}

/* Identity View Mode Styles */
.identity-details {
  max-width: 600px;
  margin: 0 auto;
  padding: 0.1rem 0 0;
}

.identity-row {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f5f5f5;
}

.identity-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.identity-label {
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 0.1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.identity-value {
  font-size: 0.95rem;
  color: #212529;
  font-weight: 400;
  line-height: 1.4;
  word-break: break-word;
  margin: 0;
  padding: 0.1rem 0;
}

/* Card Styling */
#identityViewMode .card {
  border: none;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.05);
  border-radius: 0.5rem;
  overflow: hidden;
}

#identityViewMode .card-body {
  padding: 1rem 1.25rem 1.25rem;
}

#identityViewMode .card-title {
  color: #002b5c;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e9ecef;
}

#identityEditMode {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
}

/* Form Elements */
#identityForm .form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.25rem;
}

/* Bootstrap Select Anpassungen */
select.form-select {
  font-size: 1rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  min-height: 48px; /* Bessere Touch-Ziele */
}

/* Focus state */
select.form-select:focus {
  border-color: #002b5c;
  box-shadow: 0 0 0 0.25rem rgba(0, 43, 92, 0.15);
  outline: none;
}

#identityForm .form-control:focus,
#identityForm .form-select:focus {
  border-color: #002b5c;
  box-shadow: 0 0 0 0.25rem rgba(0, 43, 92, 0.15);
}

#identityForm .btn-outline-secondary:not(:disabled) {
  border-color: #6c757d;
  color: #6c757d;
}

#identityForm .btn-outline-secondary:not(:disabled):hover {
  background-color: #6c757d;
  color: white;
}

#identityForm .btn-primary {
  min-width: 120px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  #identityViewMode .col-4 {
    width: 40%;
  }
  
  #identityViewMode .col-8 {
    width: 60%;
  }
  
  #identityEditMode {
    padding: 0 0.5rem;
  }
  
  #identityForm .d-flex {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  #identityForm .btn {
    width: 100%;
  }
}
