/* ==========================================================================
   ADMIN PANEL — GLOBAL LAYOUT
   ========================================================================== */

.admin-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.admin-content {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* ==========================================================================
    TOAST NOTIFICATIONS
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
}


/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.admin-nav-link {
  display: flex;
  gap: 1.5rem;
}

.admin-nav-link a {
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.admin-nav-link a:hover {
  border-color: #333;
}


/* Inline admin links (used inside warnings, messages, etc.) */
.admin-inline-link {
  color: #4a6a89;
  cursor: pointer;
  text-decoration: underline;
  font-weight: normal;
}

.admin-inline-link:hover {
  opacity: 0.8;
}

.admin-inline-link.delete-link {
  color: #c00;
}

.admin-inline-link.delete-link:hover {
  text-decoration: none;
  opacity: 0.9;
}


/* ==========================================================================
   BODY LINKS (used inside content areas)
   ========================================================================== */

.admin-link {
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.admin-link:hover {
  border-color: #4d4d4d;
}


/* ==========================================================================
   DIVIDERS
   ========================================================================== */

.divider {
  border-top: 1px solid #ddd;
  margin: 1.5rem 0;
}


/* ==========================================================================
   TABLES
   ========================================================================== */

.admin-table,
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th,
.admin-table td,
table th,
table td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  vertical-align: middle;
  text-align: left;
}

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

/* Editable cells */
[contenteditable]:focus {
  background: #fff8d6;
  outline: 2px solid #ffe58f;
}

/* Inactive rows (archived, disabled, etc.) */
.inactive-row {
  opacity: 0.5;
}

.inactive-text {
  color: #777;
}

.inactive-thumb {
  filter: grayscale(100%);
}


/* ==========================================================================
   FORMS
   ========================================================================== */

.admin-form .form-group {
  margin-bottom: 1rem;
}

.admin-form input[type="text"],
.admin-form input[type="file"],
.admin-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-form input[type="text"]:focus,
.admin-form input[type="file"]:focus,
.admin-form textarea:focus {
  border-color: #0077cc;
  box-shadow: 0 0 0 2px rgba(0, 119, 204, 0.2);
  outline: none;
}

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

.admin-form label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: block;
  color: #333;
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.admin-form button {
  margin-top: 1rem;
  padding: 10px 16px;
  font-size: 1rem;
  border-radius: 6px;
}

/* Save buttons */
.save-button,
.save-row {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: #5a7fa3;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.save-button:hover,
.save-row:hover {
  background: #4a6a89;
}

/* Edit buttons */
.edit-button {
    position: absolute;
    top: -1.2rem;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.edit-button:hover {
  background: #f0f0f0;
}

/* Delete buttons */
.delete-button,
.modal-confirm-button {
  color: red;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.delete-button:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* FOOTER EDIT BUTTON */
.footer-edit-button {
    position: absolute;
    top: -1.2rem;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    z-index: 20;
}

.footer-edit-button:hover {
    background: #f0f0f0;
}


/* ==========================================================================
   IMAGE PREVIEWS
   ========================================================================== */

.admin-image-preview,
.admin-hero-thumb {
  max-height: 150px;
  max-width: 150px;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}


/* ==========================================================================
   SELECT DROPDOWNS
   ========================================================================== */

.availability-select {
  appearance: none;
  padding: 6px 28px 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  cursor: pointer;

  background-image: url("data:image/svg+xml;utf8,<svg fill='%23666' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5.516 7.548l4.484 4.484 4.484-4.484 1.06 1.06-5.544 5.544-5.544-5.544z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}

.availability-select:hover {
  border-color: #999;
}

.availability-select:focus {
  outline: none;
  border-color: #0077cc;
  box-shadow: 0 0 0 2px rgba(0, 119, 204, 0.2);
}


/* ==========================================================================
   MODALS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-box {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  width: 320px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
}

.modal-cancel-button {
  background: #ccc;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}


/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */

.breadcrumbs {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #666;
}

.breadcrumbs a {
  color: #333;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.breadcrumbs a:hover {
  border-color: #333;
}

.crumb-sep {
  color: #bbb;
  font-weight: bold;
}


/* ==========================================================================
   WARNINGS / ALERTS
   ========================================================================== */

.admin-warning {
  background: #ffe4b5;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-weight: bold;
  text-align: center;
}


/* ==========================================================================
   SEARCH SUGGESTIONS
   ========================================================================== */

.admin-search-form input {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.suggestions-box {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  width: 300px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
}

.suggestions-box div {
  padding: 6px 10px;
  cursor: pointer;
}

.suggestions-box div:hover {
  background: #f0f0f0;
}


/* ==========================================================================
   TEXT UTILITIES
   ========================================================================== */

.bio-snippet {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  font-size: 0.85rem;
  line-height: 1.3;
  max-height: 2.6em;
  color: #555;
}

.artwork-meta {
  font-size: 0.85rem;
  color: #666;
  margin-top: 4px;
  line-height: 1.3;
  text-align: left;
}


/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

.fade-out {
  opacity: 0;
  transition: opacity 0.4s ease;
}
