@import "./icons.css";

/* Personal Storage Panel Styles (moved from inline JS)
   Scope: Personal Storage UI and confirmation modal */

.ps-root {
  width: 100%;
  height: 100%;
  padding: 16px;
  background: #0a0f14;
  color: #cfe;
  overflow-y: auto;
  box-sizing: border-box;
}

.ps-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #1f2b33;
}

.ps-header h3 {
  margin: 0 0 6px;
  font:
    600 20px system-ui,
    Arial;
  color: #e5eef7;
  letter-spacing: 0.5px;
}

.ps-header p {
  margin: 0;
  font-size: 13px;
  color: #7f95a6;
  line-height: 1.4;
}

.ps-section {
  margin-bottom: 20px;
}

.ps-section-title {
  margin: 0 0 10px;
  font:
    600 15px system-ui,
    Arial;
  color: #dde7ef;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-section-icon {
  font-size: 18px;
}

.ps-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #0d1418;
  border: 1px solid #1f2b33;
  border-radius: 8px;
}

.ps-grid-ships {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.ps-grid-items {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.ps-slot {
  position: relative;
  padding: 12px;
  background: #121a21;
  border: 2px solid #223;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ps-slot:hover {
  border-color: #3a4a5a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ps-slot.empty {
  border-style: dashed;
  opacity: 0.6;
  cursor: default;
}

.ps-slot.empty:hover {
  transform: none;
  box-shadow: none;
}

.ps-slot-header {
  font-size: 11px;
  color: #6a8a9f;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ps-slot-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ps-slot-label {
  font-size: 13px;
  color: #b9c9d6;
  font-weight: 500;
  word-break: break-word;
}

.ps-slot-meta {
  font-size: 11px;
  color: #7f95a6;
}

.ps-slot-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.ps-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ps-btn-primary {
  background: #1d6ad8;
  color: #fff;
}

.ps-btn-primary:hover {
  background: #2578e8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(29, 106, 216, 0.4);
}

.ps-btn-danger {
  background: #c83232;
  color: #fff;
}

.ps-btn-danger:hover {
  background: #d84242;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(200, 50, 50, 0.4);
}

.ps-btn-secondary {
  background: #2d3944;
  color: #cfe;
}

.ps-btn-secondary:hover {
  background: #3a4a5a;
}

.ps-btn-tiny {
  padding: 4px 8px;
  font-size: 11px;
}

.ps-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.ps-player-storage {
  margin-top: 20px;
}

.ps-player-storage-list {
  max-height: 280px;
  overflow-y: auto;
  background: #0d1418;
  border: 1px solid #1f2b33;
  border-radius: 6px;
  padding: 8px;
}

.ps-player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #1a2329;
  transition: background 0.15s ease;
}

.ps-player-item:last-child {
  border-bottom: none;
}

.ps-player-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.ps-player-item-info {
  flex: 1;
  font-size: 13px;
  color: #b9c9d6;
}

.ps-player-item-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.ps-empty-state {
  text-align: center;
  padding: 20px;
  color: #7f95a6;
  font-size: 13px;
}

/* Confirmation Modal */
.ps-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25000;
  animation: ps-fadeIn 0.2s ease;
}

.ps-confirm-dialog {
  background: #1a2329;
  border: 2px solid #2d3944;
  border-radius: 10px;
  padding: 24px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: ps-slideIn 0.25s ease;
}

.ps-confirm-title {
  margin: 0 0 12px;
  font:
    600 18px system-ui,
    Arial;
  color: #e5eef7;
}

.ps-confirm-message {
  margin: 0 0 20px;
  font-size: 14px;
  color: #b9c9d6;
  line-height: 1.5;
}

.ps-confirm-warning {
  padding: 12px;
  background: rgba(200, 100, 50, 0.1);
  border-left: 3px solid #c86432;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #f5d27a;
}

.ps-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@keyframes ps-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes ps-slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Icons base styling: ensure pseudo-element emoji/icons are visible and aligned */
.ps-slot-header .ps-icon-ship,
.ps-slot-header .ps-icon-ore,
.ps-slot-header .ps-icon-module,
.ps-slot-header .ps-icon-empty,
.ps-player-item .ps-icon-ore,
.ps-player-item .ps-icon-module {
  display: inline-block;
  width: 20px;
  height: 20px;
  font-size: 18px;
  line-height: 20px;
  text-align: center;
  vertical-align: middle;
  margin-right: 6px;
}
