@import "active_admin/mixins";
@import "active_admin/base";
@import "activeadmin_blaze_theme/theme";

// Force utility navigation visible (blaze theme may hide it)
#utility_nav { display: flex !important; visibility: visible !important; }
#utility_nav #site_link a {
  color: #fff !important;
  font-weight: bold;
  text-decoration: none;
  &:hover { text-decoration: underline; }
}

// File Manager
.fm-breadcrumbs {
  background: #f5f5f5; padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; font-family: monospace; font-size: 14px;
  a { color: #5a6268; text-decoration: none; &:hover { text-decoration: underline; } }
}
.fm-actions {
  display: flex; gap: 16px; align-items: center; margin-bottom: 16px; padding: 12px; background: #fafafa; border: 1px solid #e0e0e0; border-radius: 4px;
}
.fm-inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.fm-text-input { padding: 4px 8px; border: 1px solid #ccc; border-radius: 3px; font-size: 13px; }
.fm-btn { display: inline-block; padding: 5px 12px; background: #5a6268; color: #fff; border: none; border-radius: 3px; font-size: 12px; cursor: pointer; text-decoration: none;
  &:hover { background: #484e53; color: #fff; }
}
.fm-btn-select { background: #28a745; color: #fff !important; &:hover { background: #218838; color: #fff !important; } &:visited { color: #fff !important; } }
.fm-table {
  width: 100%; border-collapse: collapse;
  th { background: #f0f0f0; padding: 8px 12px; text-align: left; font-size: 12px; text-transform: uppercase; color: #666; border-bottom: 2px solid #ddd; }
  td { padding: 8px 12px; border-bottom: 1px solid #eee; font-size: 13px; }
  tr:hover td { background: #f9f9f9; }
}
.fm-type { font-family: monospace; font-size: 11px; color: #999; }
.fm-action-link { font-size: 12px; color: #5a6268; text-decoration: none; margin-right: 8px; &:hover { text-decoration: underline; } }
.fm-icon-btn { font-size: 16px; text-decoration: none; margin-right: 6px; opacity: 0.7; cursor: pointer; &:hover { opacity: 1; } }
.fm-icon-danger:hover { filter: brightness(1.3); }
.fm-danger { color: #dc3545; }

// Emoji action buttons in AA index tables
.table_actions {
  a.view_link, a.edit_link, a.delete_link {
    font-size: 0 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2px 4px !important;
    margin: 0 2px !important;
    &::before { font-size: 16px; opacity: 0.7; }
    &:hover { background: none !important; }
    &:hover::before { opacity: 1; }
  }
  a.view_link::before { content: "👁️"; }
  a.edit_link::before { content: "✏️"; }
  a.delete_link::before { content: "🗑️"; }
}
.fm-entry-actions { white-space: nowrap; }
.fm-drop-hint { font-size: 12px; color: #999; margin-left: 8px; }
.fm-dropzone { transition: background 0.15s, border-color 0.15s; border: 2px dashed transparent; }
.fm-dropzone.fm-dragover { background: #e8f4fd !important; border-color: #4a90d9 !important; }

// Browse button in release forms
.fm-browse-btn {
  display: inline-block; margin-left: 8px; padding: 4px 10px; background: #6c757d; color: #fff !important; border-radius: 3px; font-size: 11px; text-decoration: none !important; vertical-align: middle;
  &:hover { background: #5a6268; color: #fff !important; }
  &:visited { color: #fff !important; }
}

// Inline file picker modal
.fm-modal-overlay {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center;
}
.fm-modal {
  position: relative; width: 90vw; max-width: 1000px; height: 80vh; background: #fff; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); display: flex; flex-direction: column; overflow: hidden;
}
.fm-modal-header {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #e0e0e0; background: #f8f8f8; flex-shrink: 0;
}
.fm-modal-title { font-weight: bold; font-size: 15px; color: #333; }
.fm-modal-close {
  background: none; border: none; font-size: 24px; color: #666; cursor: pointer; line-height: 1; padding: 0 4px;
  &:hover { color: #000; }
}
.fm-modal-body {
  flex: 1; overflow-y: auto; padding: 16px;
  .fm-breadcrumbs { margin-bottom: 12px; }
  .fm-actions { margin-bottom: 12px; }
  .fm-table { font-size: 13px; }
}
