/* public/css/wallet-bulk-modal.css */
/* Comprehensive styling for bulk resource management modal */

/* ============================================================================
   BULK MODAL BASE
   ============================================================================ */

.bulk-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bulk-modal.active {
  display: flex;
  opacity: 1;
}

.bulk-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
}

.bulk-modal-content {
  position: relative;
  background: linear-gradient(135deg, #1a1a24 0%, #2a2a3a 100%);
  border: 1px solid #3a3a4a;
  border-radius: 16px;
  max-width: 1400px;
  width: 95%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 10001;
}

.bulk-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #3a3a4a;
  color: #888;
  font-size: 32px;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10002;
  padding: 0;
  line-height: 1;
}

.bulk-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.bulk-modal-body {
  overflow-y: auto;
  max-height: 90vh;
  padding: 24px;
}

/* ============================================================================
   LOADING & ERROR STATES
   ============================================================================ */

.bulk-modal-loading,
.bulk-modal-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.bulk-modal-loading p {
  margin-top: 16px;
  font-size: 16px;
  color: #aaa;
}

.bulk-modal-error .error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.bulk-modal-error h3 {
  color: #ef4444;
  margin-bottom: 12px;
}

.bulk-modal-error p {
  color: #aaa;
  margin-bottom: 8px;
}

/* ============================================================================
   BULK INTERFACE LAYOUT
   ============================================================================ */

.bulk-interface {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ============================================================================
   HEADER SECTION
   ============================================================================ */

.bulk-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 2px solid #3a3a4a;
}

.bulk-header-left {
  display: flex;
  gap: 20px;
  flex: 1;
}

.bulk-header-image {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid #3a3a4a;
  background: #0a0a0f;
}

.bulk-header-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.bulk-resource-name {
  font-size: 28px;
  font-weight: 700;
  color: #e0e0e0;
  margin: 0;
  line-height: 1.2;
}

.bulk-collection-name {
  font-size: 16px;
  color: #888;
  margin: 0;
}

.bulk-meta-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.bulk-meta-tags span {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.bulk-meta-chain {
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid rgba(74, 158, 255, 0.3);
  color: #4a9eff;
}

.bulk-meta-game {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
}

.bulk-meta-type {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.bulk-header-stats {
  display: flex;
  gap: 16px;
}

.bulk-stat-box {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid #3a3a4a;
  border-radius: 12px;
  padding: 16px;
  min-width: 100px;
  text-align: center;
  transition: all 0.2s ease;
}

.bulk-stat-box.unlisted {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.05);
}

.bulk-stat-box.listed {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.05);
}

.bulk-stat-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.bulk-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #e0e0e0;
  line-height: 1;
}

.bulk-stat-box.unlisted .bulk-stat-value {
  color: #3b82f6;
}

.bulk-stat-box.listed .bulk-stat-value {
  color: #22c55e;
}

/* ============================================================================
   METADATA SECTION (NEW)
   ============================================================================ */

.bulk-metadata-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid #3a3a4a;
  border-radius: 12px;
  padding: 20px;
}

.bulk-description {
  margin-bottom: 20px;
}

.bulk-description:last-child {
  margin-bottom: 0;
}

.bulk-description h4 {
  font-size: 16px;
  color: #e0e0e0;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.bulk-description p {
  font-size: 15px;
  color: #b0b0c0;
  line-height: 1.6;
  margin: 0;
}

.bulk-attributes {
  margin-top: 20px;
}

.bulk-attributes:first-child {
  margin-top: 0;
}

.bulk-attributes h4 {
  font-size: 16px;
  color: #e0e0e0;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.bulk-attributes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.bulk-attribute-item {
  background: #2a2a3a;
  border: 1px solid #3a3a4a;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
}

.bulk-attribute-item:hover {
  border-color: #4a9eff;
  background: #2d2d3d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 158, 255, 0.1);
}

.bulk-attribute-item .attr-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 600;
}

.bulk-attribute-item .attr-value {
  font-size: 14px;
  color: #e0e0e0;
  font-weight: 500;
  word-break: break-word;
}

/* ============================================================================
   MARKET DATA SECTION
   ============================================================================ */

.bulk-market-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid #3a3a4a;
  border-radius: 12px;
  padding: 20px;
}

.bulk-market-section h3 {
  color: #e0e0e0;
  font-size: 18px;
  margin: 0 0 20px 0;
  font-weight: 600;
}

.bulk-market-empty {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

.bulk-floor-price {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.floor-label {
  font-size: 14px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.floor-value {
  text-align: right;
}

.floor-eth {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #10b981;
  line-height: 1.2;
}

.floor-usd {
  display: block;
  font-size: 16px;
  color: #888;
  margin-top: 4px;
}

.bulk-price-tiers {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #3a3a4a;
  border-radius: 8px;
  overflow: hidden;
}

.price-tier-header {
  display: grid;
  grid-template-columns: 1fr 1fr 80px;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(74, 158, 255, 0.1);
  border-bottom: 1px solid #3a3a4a;
  font-size: 12px;
  font-weight: 600;
  color: #4a9eff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-tier-row {
  display: grid;
  grid-template-columns: 1fr 1fr 80px;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(58, 58, 74, 0.5);
  transition: all 0.2s ease;
}

.price-tier-row:last-child {
  border-bottom: none;
}

.price-tier-row:hover {
  background: rgba(74, 158, 255, 0.05);
}

.tier-eth {
  color: #e0e0e0;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.tier-usd {
  color: #888;
  font-family: 'Courier New', monospace;
}

.tier-count {
  color: #4a9eff;
  font-weight: 600;
  text-align: right;
}

.price-tier-more {
  padding: 12px 16px;
  text-align: center;
  color: #888;
  font-size: 13px;
  font-style: italic;
}

/* ============================================================================
   ITEMS SECTION
   ============================================================================ */

.bulk-items-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid #3a3a4a;
  border-radius: 12px;
  padding: 20px;
}

.bulk-items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.bulk-items-header h3 {
  color: #e0e0e0;
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

.bulk-items-controls {
  display: flex;
  gap: 8px;
}

.btn-filter {
  padding: 8px 16px;
  background: rgba(58, 58, 74, 0.5);
  border: 1px solid #3a3a4a;
  border-radius: 6px;
  color: #888;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-filter:hover {
  background: rgba(74, 158, 255, 0.1);
  border-color: #4a9eff;
  color: #4a9eff;
}

.btn-filter.active {
  background: #4a9eff;
  border-color: #4a9eff;
  color: white;
}

/* Refresh button in bulk items controls */
.btn-bulk-refresh {
  padding: 8px 16px;
  background: rgba(58, 58, 74, 0.5);
  border: 1px solid #3a3a4a;
  border-radius: 6px;
  color: #888;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-bulk-refresh:hover {
  background: rgba(74, 158, 255, 0.1);
  border-color: #4a9eff;
  color: #4a9eff;
}

.btn-bulk-refresh:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.bulk-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px;
}

/* Scrollbar styling */
.bulk-items-grid::-webkit-scrollbar {
  width: 8px;
}

.bulk-items-grid::-webkit-scrollbar-track {
  background: #2a2a3a;
  border-radius: 4px;
}

.bulk-items-grid::-webkit-scrollbar-thumb {
  background: #4a4a5a;
  border-radius: 4px;
}

.bulk-items-grid::-webkit-scrollbar-thumb:hover {
  background: #5a5a6a;
}

.bulk-item-card {
  background: rgba(42, 42, 58, 0.5);
  border: 2px solid #3a3a4a;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all 0.2s ease;
}

.bulk-item-card:hover {
  background: rgba(42, 42, 58, 0.8);
  border-color: #4a9eff;
}

.bulk-item-card.selected {
  border-color: #4a9eff;
  background: rgba(74, 158, 255, 0.1);
}

.bulk-item-card.listed {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.05);
}

.bulk-item-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #4a9eff;
}

.bulk-item-checkbox input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bulk-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bulk-item-token {
  font-size: 16px;
  font-weight: 700;
  color: #e0e0e0;
  font-family: 'Courier New', monospace;
}

.bulk-item-price {
  font-size: 14px;
  font-weight: 600;
  color: #22c55e;
  font-family: 'Courier New', monospace;
}

.bulk-item-status {
  font-size: 13px;
  color: #888;
}

.bulk-item-delist {
  padding: 6px 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #ef4444;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bulk-item-delist:hover {
  background: #ef4444;
  color: white;
}

/* ============================================================================
   BULK ACTIONS BAR
   ============================================================================ */

.bulk-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid #3a3a4a;
  border-radius: 12px;
  gap: 16px;
}

.bulk-actions-left,
.bulk-actions-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-select-all,
.btn-clear-selection {
  padding: 10px 16px;
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid rgba(74, 158, 255, 0.3);
  border-radius: 8px;
  color: #4a9eff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-select-all:hover,
.btn-clear-selection:hover:not(:disabled) {
  background: rgba(74, 158, 255, 0.2);
  border-color: #4a9eff;
}

.btn-clear-selection:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.selected-count {
  color: #e0e0e0;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
}

.btn-bulk-list {
  padding: 12px 24px;
  background: linear-gradient(135deg, #4a9eff 0%, #3a7edf 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.btn-bulk-list:hover:not(:disabled) {
  background: linear-gradient(135deg, #3a7edf 0%, #2a6ecf 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 158, 255, 0.4);
}

.btn-bulk-list:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1200px) {
  .bulk-header {
    flex-direction: column;
  }

  .bulk-header-stats {
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .bulk-modal-content {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .bulk-metadata-section {
    padding: 16px;
  }
  
  .bulk-attributes-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }
  
  .bulk-attribute-item {
    padding: 10px;
  }
  
  .bulk-attribute-item .attr-label {
    font-size: 10px;
  }
  
  .bulk-attribute-item .attr-value {
    font-size: 13px;
  }

  .bulk-items-grid {
    grid-template-columns: 1fr;
  }

  .bulk-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .bulk-actions-left,
  .bulk-actions-right {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .bulk-header-left {
    flex-direction: column;
    text-align: center;
  }

  .bulk-header-image {
    width: 100px;
    height: 100px;
    margin: 0 auto;
  }

  .bulk-resource-name {
    font-size: 22px;
  }

  .bulk-stat-box {
    min-width: auto;
  }

  .bulk-attributes-grid {
    grid-template-columns: 1fr 1fr;
  }

  .price-tier-header,
  .price-tier-row {
    grid-template-columns: 1fr 1fr auto;
    font-size: 11px;
  }
}
