/* modal.css — Unified modal system for RattyData */
/* Used by: marketplace, batch, cart */

/* ============================
   OVERLAY
   ============================ */
.rd-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: rd-fade-in 0.15s ease-out;
}

@keyframes rd-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================
   MODAL SHELL
   ============================ */
.rd-modal {
  background: rgba(8, 6, 4, 0.98);
  border: 1px solid rgba(80, 60, 35, 0.9);
  border-radius: 4px;
  width: 440px;
  max-width: 92vw;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(80, 60, 35, 0.25);
  font-family: 'DIN Alternate', sans-serif;
  animation: rd-slide-up 0.18s ease-out;
}

@keyframes rd-slide-up {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.rd-modal--wide { width: 480px; }
.rd-modal--narrow { width: 360px; }

/* ============================
   HEADER
   ============================ */
.rd-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(80, 60, 35, 0.6);
}

.rd-modal-title {
  color: var(--orange, #ffa040);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.rd-modal-close {
  background: none; border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 22px; cursor: pointer;
  padding: 0 2px; line-height: 1;
  transition: color 0.15s;
}
.rd-modal-close:hover { color: rgba(255, 255, 255, 0.75); }

/* ============================
   BODY
   ============================ */
.rd-modal-body {
  padding: 20px;
}

.rd-modal-body p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* NFT preview row */
.rd-modal-nft {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(80, 60, 35, 0.5);
}

.rd-modal-nft img,
.rd-modal-nft-placeholder {
  width: 60px; height: 60px;
  border-radius: 3px; object-fit: cover;
  border: 1px solid rgba(80, 60, 35, 0.6);
  background: rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.rd-modal-nft-name {
  font-weight: 700; font-size: 16px;
  color: #fff; text-transform: uppercase;
  letter-spacing: 0.3px;
}

.rd-modal-nft-id {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px; margin-top: 3px;
  text-transform: capitalize;
}

/* Line items */
.rd-modal-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
}

.rd-modal-line--muted {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}

.rd-modal-line--total {
  border-top: 1px solid rgba(80, 60, 35, 0.6);
  margin-top: 6px; padding-top: 12px;
  font-weight: 700; font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.rd-modal-line--total small {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px; margin-left: 6px;
  font-weight: 400;
}

/* Status line */
.rd-modal-status {
  margin-top: 14px;
  font-size: 14px; min-height: 18px;
  color: var(--orange, #ffa040);
  letter-spacing: 0.3px;
  transition: color 0.15s;
}

/* Option buttons (batch modal style) */
.rd-modal-option {
  width: 100%; padding: 14px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(80, 60, 35, 0.9);
  color: rgba(255, 255, 255, 0.85);
  font-family: 'DIN Alternate', sans-serif;
  font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.8px;
  cursor: pointer; transition: all 0.15s;
  text-align: left; display: block;
  margin-bottom: 8px;
}
.rd-modal-option:hover {
  border-color: rgba(255, 140, 0, 0.5);
  background: rgba(255, 140, 0, 0.06);
  color: #fff;
}
.rd-modal-option-sub {
  display: block;
  font-size: 12px; color: rgba(255, 255, 255, 0.4);
  font-weight: 400; margin-top: 4px;
  text-transform: none; letter-spacing: 0;
}

/* Input */
.rd-modal-input {
  width: 100%; padding: 10px 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(80, 60, 35, 0.9);
  color: rgba(255, 255, 255, 0.9);
  font-family: 'DIN Alternate', sans-serif;
  font-weight: 700; font-size: 14px;
  border-radius: 3px; outline: none;
  box-sizing: border-box;
  margin-top: 4px;
}
.rd-modal-input:focus {
  border-color: rgba(255, 140, 0, 0.5);
}

/* Fee breakdown toggle */
.rd-modal-breakdown-toggle {
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
  border-top: 1px solid rgba(80, 60, 35, 0.3);
  margin-top: 8px;
}
.rd-modal-breakdown-body {
  font-size: 13px; padding: 10px 0 4px;
  color: rgba(255, 255, 255, 0.5);
}
.rd-modal-breakdown-body .rd-section-label {
  color: var(--orange, #ffa040);
  font-size: 12px; font-weight: 700;
  margin-bottom: 6px; margin-top: 10px;
  display: block;
}
.rd-modal-breakdown-body .rd-section-label:first-child { margin-top: 0; }

/* ============================
   FOOTER / ACTIONS
   ============================ */
.rd-modal-actions {
  display: flex; gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid rgba(80, 60, 35, 0.6);
}

.rd-btn {
  flex: 1; padding: 12px;
  border: none; border-radius: 3px;
  font-family: 'DIN Alternate', sans-serif;
  font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.8px;
  cursor: pointer; transition: all 0.15s ease;
}
.rd-btn:active:not(:disabled) { transform: scale(0.98); }
.rd-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Ghost / cancel */
.rd-btn--ghost {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(80, 60, 35, 0.9);
  color: rgba(255, 255, 255, 0.5);
}
.rd-btn--ghost:hover:not(:disabled) {
  border-color: rgba(80, 60, 35, 1);
  color: rgba(255, 255, 255, 0.75);
}

/* Orange outline / confirm */
.rd-btn--outline {
  background: rgba(255, 140, 0, 0.08);
  border: 1px solid rgba(255, 140, 0, 0.35);
  color: rgba(255, 255, 255, 0.8);
}
.rd-btn--outline:hover:not(:disabled) {
  background: rgba(255, 140, 0, 0.18);
  border-color: rgba(255, 140, 0, 0.65);
  color: #fff;
}

/* Solid orange / primary action */
.rd-btn--primary {
  background: #ffa040;
  border: none;
  color: #000;
}
.rd-btn--primary:hover:not(:disabled) { background: #ffa020; }

/* Danger / destructive */
.rd-btn--danger {
  background: rgba(255, 82, 82, 0.1);
  border: 1px solid rgba(255, 82, 82, 0.4);
  color: #ff8a80;
}
.rd-btn--danger:hover:not(:disabled) {
  background: rgba(255, 82, 82, 0.2);
  border-color: rgba(255, 82, 82, 0.7);
  color: #fff;
}