/* Card Box View — overrides and additions on top of binder layout */

/* Card box grid area fills available space */
#cardBoxView .binder-container {
  min-height: calc(100vh - 140px);
}

#cardBoxView .binder-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
}

#cardBoxView .binder-name {
  font-size: 1.2rem;
  font-weight: 700;
  flex: 1;
}

#cardBoxView .toolbar-right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Card tile hover actions */
.cardbox-tile-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: none;
  gap: 2px;
  z-index: 5;
}

.collection-tile:hover .cardbox-tile-actions {
  display: flex;
}

.cardbox-tile-btn {
  background: rgba(0,0,0,0.75);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.cardbox-tile-btn:hover {
  background: rgba(0,0,0,0.9);
}

.cardbox-tile-btn.remove:hover {
  background: rgba(220,38,38,0.8);
}

@media (max-width: 968px) {
  #cardBoxView .binder-toolbar {
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  #cardBoxView .card-search-panel {
    display: none;
  }
  #cardBoxView .card-search-panel.mobile-open {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    margin: 0;
    border-radius: 0;
    width: 100%;
    padding: 20px;
    overflow-y: auto;
  }
  #cbMobileAddBtn {
    display: flex !important;
  }
}
