/* Multi-Player Trading Styles */

/* ─── Auth prompt ─── */
.auth-prompt {
  text-align: center;
  padding: 80px 20px;
}
.auth-prompt h2 { color: #E6A63C; margin-bottom: 15px; }
.auth-prompt p { color: #93E1FF; margin-bottom: 25px; }
.auth-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px; margin: 0 8px;
  text-decoration: none; font-size: 1rem;
  transition: background 0.2s;
}
.auth-btn.google { background: #4285F4; color: #fff; }
.auth-btn.google:hover { background: #3367D6; }
.auth-btn.discord { background: #5865F2; color: #fff; }
.auth-btn.discord:hover { background: #4752C4; }

/* ─── Buttons ─── */
.btn-primary {
  background: #E6A63C; color: #0E1C2F;
  border: none; padding: 10px 22px; border-radius: 6px;
  font-family: 'BeaufortBold', Arial, sans-serif;
  font-size: 0.95rem; cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: #F0B84D; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: #1E3A52; color: #66CCFF;
  border: 1px solid #2A3F56; padding: 8px 18px; border-radius: 6px;
  font-family: 'BeaufortBold', Arial, sans-serif;
  font-size: 0.9rem; cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: #2A4F6E; }
.btn-danger {
  background: #8B2020; color: #F2F2F2;
  border: none; padding: 8px 18px; border-radius: 6px;
  font-family: 'BeaufortBold', Arial, sans-serif;
  font-size: 0.9rem; cursor: pointer;
  transition: background 0.2s;
}
.btn-danger:hover { background: #A52A2A; }

/* ─── Dashboard ─── */
.dashboard-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.dashboard-header h2 {
  font-family: 'BeaufortBold', Arial, sans-serif;
  color: #E6A63C; margin: 0;
}
.rounds-section { margin-bottom: 30px; }
.rounds-section h3 {
  font-family: 'BeaufortBold', Arial, sans-serif;
  color: #93E1FF; font-size: 1rem; margin-bottom: 12px;
}
.rounds-list { display: flex; flex-direction: column; gap: 10px; }
.empty-msg { color: #667; font-size: 0.9rem; text-align: center; padding: 20px; }

/* ─── Round Card ─── */
.round-card {
  background: #15263A; border: 1px solid #2A3F56; border-radius: 8px;
  padding: 16px; cursor: pointer; transition: border-color 0.2s;
  display: flex; align-items: center; gap: 16px;
}
.round-card:hover { border-color: #E6A63C; }
.round-card-info { flex: 1; }
.round-card-name {
  font-family: 'BeaufortBold', Arial, sans-serif;
  color: #F2F2F2; font-size: 1rem; margin-bottom: 4px;
}
.round-card-meta { color: #93E1FF; font-size: 0.8rem; }

/* ─── Status Badges ─── */
.status-badge {
  display: inline-block; padding: 4px 10px; border-radius: 4px;
  font-size: 0.75rem; font-family: 'BeaufortBold', Arial, sans-serif;
  text-transform: uppercase; white-space: nowrap;
}
.status-draft { background: #2A3F56; color: #93E1FF; }
.status-open { background: #1B5E20; color: #A5D6A7; }
.status-matching { background: #E65100; color: #FFCC80; }
.status-proposed { background: #4A148C; color: #CE93D8; }
.status-accepted { background: #0D47A1; color: #90CAF9; }
.status-completed { background: #1B5E20; color: #81C784; }
.status-cancelled { background: #4E342E; color: #BCAAA4; }

/* ─── Detail View ─── */
.round-header {
  background: #15263A; border: 1px solid #2A3F56; border-radius: 8px;
  padding: 20px; margin: 16px 0;
}
.round-title {
  font-family: 'BeaufortBold', Arial, sans-serif;
  color: #E6A63C; font-size: 1.3rem; margin-bottom: 8px;
}
.round-meta { color: #93E1FF; font-size: 0.85rem; }
.round-meta span { margin-right: 16px; }
.detail-section { margin-bottom: 24px; }
.detail-section h3 {
  font-family: 'BeaufortBold', Arial, sans-serif;
  color: #93E1FF; font-size: 1rem; margin-bottom: 12px;
}

/* ─── Participants List ─── */
.participant-row {
  display: flex; align-items: center; gap: 12px;
  background: #15263A; border: 1px solid #2A3F56; border-radius: 6px;
  padding: 10px 14px; margin-bottom: 6px;
}
.participant-name { flex: 1; color: #F2F2F2; font-size: 0.9rem; }
.participant-status { font-size: 0.8rem; }
.participant-remove {
  background: none; border: none; color: #8B2020; cursor: pointer;
  font-size: 1.1rem; padding: 2px 6px;
}
.participant-remove:hover { color: #A52A2A; }

/* ─── Actions Bar ─── */
#round-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
}

/* ─── Proposal Visualization ─── */
.cycle-card {
  background: #15263A; border: 1px solid #2A3F56; border-radius: 8px;
  padding: 16px; margin-bottom: 12px;
}
.cycle-header {
  font-family: 'BeaufortBold', Arial, sans-serif;
  color: #E6A63C; font-size: 0.95rem; margin-bottom: 10px;
}
.movement-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid #1E3A52;
  font-size: 0.85rem;
}
.movement-row:last-child { border-bottom: none; }
.movement-from { color: #FF8A80; }
.movement-arrow { color: #93E1FF; }
.movement-to { color: #A5D6A7; }
.movement-card { color: #F2F2F2; flex: 1; }
.movement-value { color: #E6A63C; font-size: 0.8rem; }
.value-summary {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid #2A3F56;
  font-size: 0.8rem; color: #93E1FF;
}

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal-content {
  background: #15263A; border: 1px solid #2A3F56; border-radius: 10px;
  padding: 30px; width: 90%; max-width: 500px; position: relative;
  max-height: 80vh; overflow-y: auto;
}
.modal-content h2 {
  font-family: 'BeaufortBold', Arial, sans-serif;
  color: #E6A63C; margin: 0 0 20px;
}
.modal-content label {
  display: block; color: #93E1FF; font-size: 0.85rem;
  margin-bottom: 6px; margin-top: 14px;
}
.modal-content input[type="text"],
.modal-content input[type="number"] {
  width: 100%; padding: 10px; border-radius: 6px;
  border: 1px solid #2A3F56; background: #0E1C2F; color: #F2F2F2;
  font-size: 0.95rem; box-sizing: border-box;
}
.modal-content input:focus { border-color: #E6A63C; outline: none; }
.modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: #93E1FF;
  font-size: 1.5rem; cursor: pointer;
}
.modal-close:hover { color: #E6A63C; }
.modal-buttons { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }
.help-text { color: #667; font-size: 0.8rem; margin-top: 4px; }

/* ─── User Search ─── */
.search-results {
  max-height: 200px; overflow-y: auto;
  border: 1px solid #2A3F56; border-radius: 6px;
  margin-top: 6px;
}
.search-result-item {
  padding: 8px 12px; cursor: pointer;
  color: #F2F2F2; font-size: 0.9rem;
  transition: background 0.15s;
}
.search-result-item:hover { background: #1E3A52; }
.search-result-item.ineligible {
  color: #667; cursor: not-allowed;
}
.selected-list { margin-top: 14px; }
.selected-list h4 { color: #93E1FF; font-size: 0.85rem; margin-bottom: 8px; }
.selected-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #1E3A52; border: 1px solid #2A3F56; border-radius: 16px;
  padding: 4px 12px; margin: 3px; font-size: 0.8rem; color: #F2F2F2;
}
.selected-chip button {
  background: none; border: none; color: #FF8A80; cursor: pointer;
  font-size: 0.9rem; padding: 0;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .dashboard-header { flex-direction: column; gap: 10px; text-align: center; }
  .round-card { flex-direction: column; align-items: flex-start; }
  .modal-content { width: 95%; padding: 20px; }
  #round-actions { flex-direction: column; }
  .movement-row { flex-wrap: wrap; }
  .container { padding: 10px; }
}

/* ─── Styled Dialog (replaces browser confirm/alert/prompt) ─── */
.dialog-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  animation: dialogFadeIn 0.15s ease;
}
@keyframes dialogFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.dialog-box {
  background: #15263A; border: 1px solid #E6A63C; border-radius: 10px;
  padding: 28px 32px; width: 90%; max-width: 420px;
  animation: dialogSlideIn 0.2s ease;
}
@keyframes dialogSlideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.dialog-title {
  font-family: 'BeaufortBold', Arial, sans-serif;
  color: #E6A63C; font-size: 1.15rem; margin-bottom: 12px;
}
.dialog-message {
  color: #F2F2F2; font-size: 0.92rem; line-height: 1.5; margin-bottom: 20px;
}
.dialog-input {
  width: 100%; padding: 10px; border-radius: 6px;
  border: 1px solid #2A3F56; background: #0E1C2F; color: #F2F2F2;
  font-size: 0.9rem; font-family: inherit; resize: vertical;
  margin-bottom: 16px; box-sizing: border-box;
}
.dialog-input:focus { border-color: #E6A63C; outline: none; }
.dialog-buttons {
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ─── No Matches Box ─── */
.no-matches-box {
  background: #1E3A52; border: 1px dashed #2A3F56; border-radius: 8px;
  padding: 30px; text-align: center;
}
.no-matches-title {
  font-family: 'BeaufortBold', Arial, sans-serif;
  color: #E6A63C; font-size: 1.1rem; margin-bottom: 10px;
}
.no-matches-desc {
  color: #93E1FF; font-size: 0.85rem; line-height: 1.5;
}

/* ─── Proposal Summary ─── */
.proposal-summary {
  background: #1B5E20; color: #A5D6A7; border-radius: 6px;
  padding: 12px 16px; margin-bottom: 16px;
  font-family: 'BeaufortBold', Arial, sans-serif; font-size: 0.95rem;
}

/* ─── Value Summary Items ─── */
.value-summary-item {
  display: inline-block; margin-right: 16px;
}

@media (max-width: 768px) {
  .dialog-box { padding: 20px; }
  .dialog-buttons { flex-direction: column; }
}

/* ─── Card Picker (matching state) ─── */
.card-picker {
  display: flex; flex-direction: column; gap: 16px;
}
.picker-hint {
  color: #93E1FF; font-size: 0.85rem; margin: 0 0 4px;
}
.picker-pair {
  background: #15263A; border: 1px solid #2A3F56; border-radius: 8px;
  padding: 14px; margin-bottom: 4px;
}
.picker-pair-header {
  font-family: 'BeaufortBold', Arial, sans-serif;
  color: #E6A63C; font-size: 0.95rem; margin-bottom: 10px;
}
.picker-pair-cards {
  display: flex; flex-direction: column; gap: 6px;
}
.picker-card-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 4px; cursor: pointer;
  transition: background 0.15s;
}
.picker-card-row:hover { background: #1E3A52; }
.picker-check {
  accent-color: #E6A63C; width: 16px; height: 16px; cursor: pointer;
}
.picker-card-name {
  flex: 1; color: #F2F2F2; font-size: 0.88rem;
}
.picker-card-value {
  color: #E6A63C; font-size: 0.8rem; min-width: 60px; text-align: right;
}
.picker-qty {
  width: 50px; padding: 4px 6px; border-radius: 4px;
  border: 1px solid #2A3F56; background: #0E1C2F; color: #F2F2F2;
  font-size: 0.85rem; text-align: center;
}
.picker-qty:disabled { opacity: 0.4; cursor: not-allowed; }
.picker-qty:focus { border-color: #E6A63C; outline: none; }
.picker-max {
  color: #667; font-size: 0.8rem; min-width: 30px;
}
.picker-summary {
  background: #1E3A52; border: 1px solid #2A3F56; border-radius: 6px;
  padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 0.85rem;
}
.picker-summary-empty { color: #667; }
.picker-summary-total {
  font-family: 'BeaufortBold', Arial, sans-serif;
  color: #A5D6A7; width: 100%;
}
.picker-summary-user { color: #93E1FF; }
.picker-actions {
  display: flex; gap: 10px; margin-top: 4px;
}

@media (max-width: 768px) {
  .picker-card-row { flex-wrap: wrap; gap: 6px; }
  .picker-card-name { width: 100%; }
  .picker-actions { flex-direction: column; }
}

/* ─── Trading ToS Consent Popup ─── */
.tos-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85); z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  animation: dialogFadeIn 0.2s ease;
}
.tos-box {
  background: #15263A; border: 1px solid #E6A63C; border-radius: 12px;
  width: 92%; max-width: 640px; max-height: 85vh;
  display: flex; flex-direction: column;
  animation: dialogSlideIn 0.25s ease;
}
.tos-header {
  font-family: 'BeaufortBold', Arial, sans-serif;
  color: #E6A63C; font-size: 1.3rem;
  padding: 20px 24px 12px; border-bottom: 1px solid #2A3F56;
  flex-shrink: 0;
}
.tos-body {
  padding: 16px 24px; overflow-y: auto; flex: 1;
  font-size: 0.88rem; line-height: 1.6; color: #ddd;
}
.tos-body p { margin: 8px 0; }
.tos-section {
  background: #0E1C2F; border: 1px solid #2A3F56; border-radius: 6px;
  padding: 12px 14px; margin: 10px 0;
}
.tos-section-title {
  font-family: 'BeaufortBold', Arial, sans-serif;
  color: #93E1FF; font-size: 0.9rem; margin-bottom: 6px;
}
.tos-section p { margin: 0; color: #ccc; font-size: 0.84rem; }
.tos-full-link {
  text-align: center; margin-top: 14px; font-size: 0.85rem;
}
.tos-full-link a { color: #66CCFF; text-decoration: underline; }
.tos-footer {
  padding: 14px 24px 18px; border-top: 1px solid #2A3F56;
  flex-shrink: 0;
}
.tos-checkbox-label {
  display: flex; align-items: center; gap: 10px;
  color: #F2F2F2; font-size: 0.88rem; cursor: pointer;
  margin-bottom: 14px;
}
.tos-checkbox-label input[type="checkbox"] {
  accent-color: #E6A63C; width: 18px; height: 18px; cursor: pointer;
  flex-shrink: 0;
}
.tos-buttons {
  display: flex; gap: 10px; justify-content: flex-end;
}

@media (max-width: 768px) {
  .tos-box { width: 96%; max-height: 90vh; }
  .tos-header { font-size: 1.1rem; padding: 16px 16px 10px; }
  .tos-body { padding: 12px 16px; }
  .tos-footer { padding: 12px 16px 14px; }
  .tos-buttons { flex-direction: column; }
}
