/* Base styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
  background-color: #f5f5f5;
  color: #333;
}

/* Typography */
h1 {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 40px;
}

h2 {
  color: #34495e;
  margin-bottom: 20px;
}

/* Form elements */
.button-group {
  text-align: right;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input[type="text"],
.form-group textarea {
  width: calc(100% - 24px);
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

/* Version list container */
.version-list {
  margin-top: 40px;
  background-color: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

/* Define column widths */
th:nth-child(1), td:nth-child(1) { width: 10%; } /* Versionsnummer */
th:nth-child(2), td:nth-child(2) { width: 45%; } /* Kommentar */
th:nth-child(3), td:nth-child(3) { width: 10%; } /* Datum */
th:nth-child(4), td:nth-child(4) { width: 35%; text-align: right; } /* Aktionen */

th {
  background-color: #f8f9fa;
  font-weight: 600;
}

th:nth-child(4) {
  text-align: right;
}

tr {
  border-left: 4px solid #ffffff;

}

tr:hover {
  background-color: #f8f9fa;
}

/* Active version row styling */
tr.active-version {
  background-color: #e8f7f0;
  border-left: 4px solid #27ae60;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(39, 174, 96, 0.1);
}

tr.active-version td:first-child {
  position: relative;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 30px;
  border: none;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

/* Close button */
.close {
  color: #666;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
  margin-right: -10px;
  margin-top: -10px;
}

.close:hover {
  color: #333;
}

/* Button styles */
button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #2980b9;
}

/* Submit button */
button[type="submit"] {
  background-color: #2ecc71;
  width: 100%;
  padding: 12px;
  font-size: 16px;
  margin-top: 10px;
}

button[type="submit"]:hover {
  background-color: #27ae60;
}

/* Delete button */
button[onclick*="deleteVersion"] {
  background-color: #e74c3c;
}

button[onclick*="deleteVersion"]:hover {
  background-color: #c0392b;
}

button[onclick*="deleteVersion"]:disabled {
  background-color: #e74c3c;
  opacity: 0.7;
  cursor: default;
}

/* File input styling */
.custom-file-input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.custom-file-label {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  width: calc(100% - 26px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-file-label:hover {
  background-color: #f8f9fa;
}

/* Button group */
.button-group button {
  margin-right: 8px;
}

/* Edit button */
button[onclick*="openEditModal"] {
  background-color: #f39c12;
}

button[onclick*="openEditModal"]:hover {
  background-color: #d68910;
}

/* Activate button */
button[onclick*="activateVersion"] {
  background-color: #27ae60;
}

button[onclick*="activateVersion"]:hover {
  background-color: #219a52;
}

button[onclick*="activateVersion"]:disabled {
  background-color: #27ae60;
  opacity: 0.7;
  cursor: default;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.toast {
  position: relative;
  margin-top: 10px;
  padding: 20px 30px;
  border-radius: 6px;
  color: white;
  font-size: 20px;
  opacity: 0;
  transform: translateX(350px);
  transition: all 0.4s ease-in-out;
  min-width: 300px;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

/* Toast variants */
.toast.info {
  background-color: #3498db;
}

.toast.success {
  background-color: #2ecc71;
}

.toast.warning {
  background-color: #f39c12;
}

.toast.error {
  background-color: #e74c3c;
}
