/* === 共用樣式 === */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #212529;
}

.container {
  max-width: 600px;
  margin: 30px auto 100px;
  padding: 30px;
  padding-bottom: 130px; /* 預留空間給底部導航 */
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-color: #ffffff;
}

h1 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 25px;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: inline-block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #212529;
}

.required-star {
  color: red;
  font-weight: bold;
  margin-left: 4px;
}

/* 表單元素 */
input.form-control,
select.form-control,
textarea.form-control,
.flatpickr-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 1rem;
  border: 1px solid #ced4da;
  background-color: #ffffff;
  color: #212529;
}

input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus,
.flatpickr-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* CKEditor */
.ck-editor__editable {
  min-height: 200px;
  border-radius: 4px;
  border: 1px solid #ced4da;
  padding: 12px;
  font-size: 1rem;
  background-color: #ffffff;
  color: #212529;
}

/* 圖片預覽區塊 */
.image-preview-box {
  width: 100%;
  height: 300px;
  border: 2px dashed #ced4da;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  color: #999;
}

.image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 搜尋與列表 */
.input-group {
  display: flex;
}

.input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group-append .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding: 6px 16px;
  font-size: 0.95rem;
}

#placeSearchResults {
  margin-top: 10px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 10px;
  background-color: #f1f3f5;
}

#placeSearchResults li {
  padding: 8px 12px;
  font-size: 0.95rem;
  border-bottom: 1px solid #ced4da;
  color: #212529;
}

#placeSearchResults li:last-child {
  border-bottom: none;
}

#placeSearchResults li .btn {
  font-size: 0.85rem;
}

#goAddPlaceBtn {
  margin-top: 5px;
  font-size: 0.9rem;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #007bff;
}

#goAddPlaceBtn:hover {
  color: #0056b3;
  text-decoration: none;
}

/* 儲存按鈕區塊 */
.form-actions-fixed {
  position: static;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
  background-color: #ffffff;
}

.form-actions-fixed .btn {
  flex: 1;
  padding: 12px;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.form-actions-fixed .btn-back::before {
  content: "\2190";
  margin-right: 8px;
}

.form-actions-fixed .btn-back {
  background-color: #6c757d;
  color: #fff;
}

.form-actions-fixed .btn-back:hover {
  background-color: #5a6268;
}

.form-actions-fixed .btn-primary {
  background-color: #007bff;
  color: #fff;
}

.form-actions-fixed .btn-primary:hover {
  background-color: #0056b3;
}

/* 響應式排版 */
@media (max-width: 767px) {
  .form-actions-fixed {
    flex-direction: column;
  }

  .form-actions-fixed .btn-back {
    display: inline-block;
  }

  .form-actions-fixed .btn {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .form-actions-fixed .btn-back {
    display: none;
  }
}
