/* ===========================================
   common.css - Shared styles for all views
   =========================================== */

/* Base Layout */
body {
  font-family: Arial, sans-serif;
  margin: 0 auto;
  padding: 20px;
}

body.layout-form {
  max-width: 600px;
}

body.layout-list {
  max-width: 800px;
}

h1 {
  margin-bottom: 20px;
}

/* Form Styles */
.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

input,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
  transform: scale(1.3);
  cursor: pointer;
}

.checkbox-group label {
  font-weight: bold;
  margin: 0;
  cursor: pointer;
}

/* Password Field */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #6c757d;
  font-size: 14px;
  user-select: none;
}

.password-toggle:hover {
  color: #007bff;
}

/* Buttons */
button,
.btn {
  padding: 10px 20px;
  margin-top: 10px;
  margin-right: 10px;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  background-color: #007bff;
  color: white;
  font-size: 14px;
}

button:hover,
.btn:hover {
  background-color: #0056b3;
}

button:disabled,
.btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: #6c757d;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-danger {
  background-color: #dc3545;
}

.btn-danger:hover {
  background-color: #c82333;
}

/* List Styles */
.entity-list {
  list-style-type: none;
  padding: 0;
}

.entity-item {
  padding: 15px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.entity-item:hover {
  background-color: #f0f0f0;
}

.entity-item-info {
  font-weight: bold;
  margin-bottom: 5px;
}

.entity-item .btn-danger {
  float: right;
  margin-top: 0;
}

/* State Styles */
.loading-message {
  display: none;
  color: blue;
  margin-bottom: 10px;
}

.error-message {
  display: none;
  color: red;
  margin-bottom: 10px;
}

.loading-message.visible,
.error-message.visible {
  display: block;
}

/* Button Container */
.button-group {
  margin-top: 20px;
}
