/* ===== Admin Page Styling ===== */

/* Admin page background */
.admin-page {
  background: url('/public/images/top-image.jpg') center/cover fixed;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-page.admin-site-frame-open .admin-section .container,
.admin-page.admin-site-frame-open .footer {
  display: none;
}

/* Admin section fills space between navbar and footer */
.admin-section {
  flex: 1;
  padding: 2rem 0;
  background: url('/public/images/top-image.jpg') center/cover no-repeat fixed;
}

.admin-section .container {
  background-color: white;
  border-radius: 4px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-site-frame {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-site-frame__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e8e8e8;
  background: #fafafa;
}

.admin-site-frame__title {
  font-weight: 700;
  color: #363636;
}

.admin-site-frame__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-site-frame__view {
  display: block;
  width: 100%;
  height: calc(100vh - 11rem);
  border: 0;
  background: #fff;
}

/* Admin navbar */
.navbar.is-light {
  border-bottom: 1px solid #e8e8e8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.navbar-item h1.title {
  color: #363636;
  font-weight: 700;
}

/* Navbar burger styling */
.navbar-burger {
  cursor: pointer;
  display: block;
}

@media screen and (min-width: 1024px) {
  .navbar-burger {
    display: none;
  }
}

/* Admin page header */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e8e8e8;
}

.admin-header h1 {
  font-size: 1.75rem;
  color: #363636;
  font-weight: 700;
}

/* Dashboard stats */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-stat-box {
  background-color: #f5f5f5;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 0.85rem 1rem;
  text-align: center;
}

.admin-stat-box .stat-label {
  font-size: 0.875rem;
  color: #7a7a7a;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-stat-box .stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #3273dc;
  margin-top: 0.25rem;
}

/* Dashboard table */
.admin-table-wrapper {
  margin-top: 2rem;
}

.admin-table {
  font-size: 0.95rem;
}

.admin-table thead {
  background-color: #f5f5f5;
}

.admin-table thead th {
  border-bottom: 2px solid #e8e8e8;
  color: #7a7a7a;
  font-weight: 600;
  padding: 1rem !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
}

.admin-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.admin-table tbody tr:hover {
  background-color: #fafafa;
}

/* Image deletion marker overlay - don't block pointer events */
.delete-marker {
  pointer-events: none;
}

/* Image grid cards */
.image-card {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  overflow: hidden;
  display: block;
  border-radius: 6px;
}

/* Drag handle - small grip icon overlay */
.image-card .drag-handle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: grab;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.image-card .drag-handle:active {
  cursor: grabbing;
}

/* SortableJS classes */
.sortable-ghost {
  opacity: 0.6;
  transform: scale(0.98);
}
.sortable-chosen {
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.admin-table td {
  padding: 1rem !important;
  vertical-align: middle;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-available {
  background-color: #e8f8f5;
  color: #27ae60;
}

.status-reserved {
  background-color: #fef5e7;
  color: #f39c12;
}

.status-sold {
  background-color: #fadbd8;
  color: #e74c3c;
}

/* Action buttons */
.admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-actions .button {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-actions .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-actions .button.is-small {
  padding: 0.4rem 0.8rem;
}

/* Form styling */
.admin-form {
  max-width: 900px;
}

.admin-form--sticky-actions {
  padding-bottom: 6rem;
}

.form-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: #f9f9f9;
  border-left: 3px solid #3273dc;
  border-radius: 2px;
}

.form-section h3 {
  font-size: 1.25rem;
  color: #363636;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section h3 i {
  color: #3273dc;
  font-size: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1rem;
}

/* Mobile responsive - single column on small screens */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #363636;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.75rem;
  border: 1px solid #dbdbdb;
  border-radius: 3px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #3273dc;
  box-shadow: 0 0 0 3px rgba(50, 115, 220, 0.1);
}

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

.custom-feature-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.custom-features-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.custom-feature-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 4px;
}

.custom-feature-item span {
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .custom-feature-inputs {
    grid-template-columns: 1fr;
  }

  .custom-feature-item {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Checkbox styling */
.form-group input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
  cursor: pointer;
  accent-color: #3273dc;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #363636;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.form-group label input[type="checkbox"] {
  margin-right: 0.5rem;
  margin-bottom: 0;
}

.form-group label[style*="font-weight: normal"] {
  font-weight: 400;
  cursor: pointer;
}

/* Form buttons */
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e8e8e8;
}

.form-actions--sticky {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  width: min(900px, calc(100vw - 2rem));
  transform: translateX(-50%);
  margin-top: 0;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(232, 232, 232, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  z-index: 50;
}

.form-actions .button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 3px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-actions .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* File input styling - label-based button */
.file-input-label {
  display: inline-block;
  width: fit-content;
  padding: 0.75rem 1.5rem;
  background-color: #3273dc;
  color: white;
  border: 1px solid #3273dc;
  border-radius: 3px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0;
}

.file-input-label:hover {
  background-color: #2366d1;
  border-color: #2366d1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.file-input-label i {
  margin-right: 0.5rem;
}

/* ===== Login Page Styling ===== */

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  background: url('/public/images/top-image.jpg') center/cover fixed;
}

.admin-login-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-box {
  width: 100%;
  max-width: 450px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.login-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
  text-align: center;
  color: white;
}

.login-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.login-header .icon {
  font-size: 1.5rem;
}

.login-header p {
  margin: 0.5rem 0 0 0;
  opacity: 0.9;
  font-size: 0.95rem;
}

.login-form {
  padding: 2rem;
}

.login-form .field {
  margin-bottom: 1.5rem;
}

.login-form .field:last-of-type {
  margin-bottom: 1rem;
}

.login-form .label {
  font-weight: 600;
  color: #363636;
  margin-bottom: 0.75rem;
}

.login-form .input {
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.login-form .input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

.login-form .input::placeholder {
  color: #b5b5b5;
}

.caps-lock-hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  color: #8a5a00;
  font-size: 0.9rem;
  line-height: 1.3;
}

.caps-lock-hint[hidden] {
  display: none;
}

.control.has-icons-left .icon {
  left: 1rem;
  color: #667eea;
}

.login-button {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.login-button:hover {
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}

.login-button:active {
  transform: translateY(0);
}

.login-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid #f0f0f0;
  text-align: center;
  font-size: 0.9rem;
  color: #7a7a7a;
}

.admin-not-found {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.admin-not-found__card {
  width: 100%;
  max-width: 640px;
  padding: 3rem 2.5rem;
  text-align: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 252, 0.98));
  border: 1px solid rgba(232, 232, 232, 0.95);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.admin-not-found__eyebrow {
  margin-bottom: 0.75rem;
  color: #3273dc;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.admin-not-found__title {
  margin-bottom: 1rem;
  color: #363636;
  font-size: 2.4rem;
  font-weight: 700;
}

.admin-not-found__text {
  max-width: 34rem;
  margin: 0 auto;
  color: #6b7280;
  font-size: 1.05rem;
  line-height: 1.6;
}

.admin-not-found__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.error-message {
  background-color: #ffe0e0;
  border-left: 4px solid #ff6b6b;
  color: #c92a2a;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.error-message .delete {
  background-color: transparent;
  border: none;
  color: #c92a2a;
  opacity: 0.7;
  cursor: pointer;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
}

.error-message .delete:hover {
  opacity: 1;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #7a7a7a;
}

.security-note i {
  color: #667eea;
}

.form-actions .button.is-primary {
  background-color: #3273dc;
  color: white;
}

.form-actions .button.is-primary:hover {
  background-color: #2366d1;
}

.form-actions .button.is-light {
  background-color: #f5f5f5;
  color: #363636;
  border: 1px solid #e8e8e8;
}

.form-actions .button.is-light:hover {
  background-color: #eeeeee;
}

/* Add button */
.button.is-success {
  background-color: #48c774;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
}

.button.is-success:hover {
  background-color: #3aa373;
}

/* Minimal breadcrumb in edit form */
.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.admin-breadcrumb a {
  color: #3273dc;
  text-decoration: none;
  transition: color 0.2s ease;
}

.admin-breadcrumb a:hover {
  color: #2366d1;
  text-decoration: underline;
}

.admin-breadcrumb .separator {
  color: #dbdbdb;
}

/* Error messages */
.admin-error {
  background-color: #ffe0e0;
  border-left: 4px solid #ff6b6b;
  border-radius: 3px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #c92a2a;
  font-size: 0.95rem;
}

.admin-error .delete {
  background-color: transparent;
  border: none;
  color: #c92a2a;
  opacity: 0.7;
  cursor: pointer;
}

.admin-error .delete:hover {
  opacity: 1;
}

/* Image gallery preview */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.image-item {
  position: relative;
  border: 1px solid #e8e8e8;
  border-radius: 3px;
  overflow: hidden;
}

.image-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.image-item .delete-btn {
  position: absolute;
  top: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.image-item:hover .delete-btn {
  opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
  .admin-section .container {
    padding: 1rem;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    flex-direction: column;
  }

  .admin-actions .button {
    width: 100%;
  }

  .admin-site-frame__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-site-frame__actions {
    width: 100%;
  }

  .admin-site-frame__actions .button {
    width: 100%;
  }

  .admin-site-frame__view {
    height: calc(100vh - 15rem);
  }

  .form-actions {
    flex-direction: column;
  }

  .admin-not-found__card {
    padding: 2rem 1.25rem;
  }

  .admin-not-found__title {
    font-size: 2rem;
  }

  .admin-not-found__actions {
    flex-direction: column;
  }

  .admin-not-found__actions .button {
    width: 100%;
  }

  .form-actions--sticky {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: auto;
    transform: none;
    padding: 0.9rem;
  }

  .form-actions .button {
    width: 100%;
  }
}

/* Minimize login page differences */
.admin-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #fafafa;
}

/* ===== Admin Footer: compact spacing ===== */
.admin-page .footer {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.admin-page .footer .content {
  margin: 0;
}

.admin-page .footer .content p {
  margin: 0.15rem 0;
}

.admin-login .box {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}
