/*
 * Sydney Bitcoin Hub - Minimal Stylesheet
 * Vibes: Bitcoiner, Hackerish, Coworking
 */

:root {
  /* Colors */
  --orange: #f7931a;
  --orange-dim: rgba(247, 147, 26, 0.12);
  --orange-hover: #e8851a;

  --bg: #1a1a2e;
  --bg-raised: #16213e;
  --bg-input: #1e2a4a;

  --text: #ffffff;
  --text-dim: #a0a0a0;
  --text-muted: #707070;

  --border: #2a3a5a;
  --border-focus: #3a4a6a;

  --success: #4CAF50;
  --success-dim: rgba(76, 175, 80, 0.15);
  --error: #f44336;
  --error-dim: rgba(244, 67, 54, 0.15);

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', Consolas, monospace;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;

  /* Radii */
  --radius: 6px;
  --radius-lg: 10px;
}

/* === Reset === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === Base === */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* === Typography === */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

p { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--orange);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

small, .text-sm {
  font-size: 0.8125rem;
}

code, .mono {
  font-family: var(--font-mono);
}

/* === Layout === */
.container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-4);
}

.container-sm {
  max-width: 480px;
}

.container-lg {
  max-width: 900px;
}

/* === Header === */
header {
  text-align: center;
  margin-bottom: var(--sp-8);
}

header h1 {
  margin-bottom: var(--sp-2);
}

header p {
  color: var(--text-dim);
  font-size: 0.9375rem;
}

.logo {
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.logo .accent {
  color: var(--orange);
}

/* === Cards === */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-4);
}

.card-header {
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.card h2, .card h3 {
  color: var(--orange);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary {
  background: var(--orange);
  color: #000;
}

.btn-primary:hover:not(:disabled) {
  background: var(--orange-hover);
}

.btn-secondary {
  background: transparent;
  border-color: var(--orange);
  color: var(--orange);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--orange-dim);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--border-focus);
  color: var(--text);
}

.btn-danger {
  background: transparent;
  border-color: var(--error);
  color: var(--error);
}

.btn-danger:hover:not(:disabled) {
  background: var(--error-dim);
}

.btn-lg {
  padding: var(--sp-4) var(--sp-6);
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* === Forms === */
label {
  display: block;
  margin-bottom: var(--sp-1);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input, textarea, select {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font);
  font-size: 0.9375rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.15s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--orange);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group {
  margin-bottom: var(--sp-4);
}

.form-hint {
  margin-top: var(--sp-1);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Checkbox & Radio */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  text-transform: none;
  font-size: 0.9375rem;
  color: var(--text);
}

.checkbox-label input {
  width: auto;
  accent-color: var(--orange);
}

/* === Alerts & Messages === */
.alert {
  padding: var(--sp-4);
  border-radius: var(--radius);
  margin-bottom: var(--sp-4);
}

.alert-error {
  background: var(--error-dim);
  border: 1px solid var(--error);
  color: var(--error);
}

.alert-success {
  background: var(--success-dim);
  border: 1px solid var(--success);
  color: var(--success);
}

/* === Badges === */
.badge {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 100px;
}

.badge-new {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.badge-pending {
  background: var(--orange-dim);
  color: var(--orange);
}

.badge-success {
  background: var(--success-dim);
  color: var(--success);
}

/* === Lists === */
.feature-list {
  list-style: none;
}

.feature-list li {
  padding: var(--sp-2) 0;
  color: var(--text-dim);
}

.feature-list li::before {
  content: "\2713";
  color: var(--orange);
  margin-right: var(--sp-2);
  font-weight: bold;
}

/* === Grid === */
.grid {
  display: grid;
  gap: var(--sp-4);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 640px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* === Pricing Cards === */
.pricing-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  transition: border-color 0.15s ease;
}

.pricing-card:hover {
  border-color: var(--border-focus);
}

.pricing-card h3 {
  color: var(--orange);
  margin-bottom: var(--sp-2);
}

.pricing-card .desc {
  color: var(--text-dim);
  margin-bottom: var(--sp-4);
}

/* === Tabs === */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-6);
}

.tab {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

/* === Supporters === */
.supporters {
  text-align: center;
  margin-top: var(--sp-10);
}

.supporters h2 {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: var(--sp-4);
}

.supporters-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4);
}

.supporter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

.supporters-subtitle {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: var(--sp-4);
  font-weight: 600;
}

.supporter img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--orange);
}

.enterprise-sponsors-grid .supporter img {
  width: 188px;
  height: 75px;
  box-sizing: border-box;
  border-radius: 999px;
  border: none;
  object-fit: contain;
  background: #fff;
  padding: var(--sp-1) var(--sp-2);
}

.enterprise-sponsors-grid .supporter img.blue-pill {
  background: rgb(153, 235, 255);
}

.enterprise-sponsors-grid .supporter img.dark-rounded {
  background: var(--bg);
  border-radius: var(--radius);
}

.enterprise-sponsors-grid .supporter img.dark-pill {
  background: var(--bg);
}

.enterprise-sponsors-grid .supporter img.circular {
  width: 75px;
  height: 75px;
  max-width: 75px;
  border-radius: 50%;
  object-fit: cover;
  background: none;
  padding: 0;
}

.enterprise-sponsors-grid .supporter {
  width: 188px;
}

.enterprise-sponsors-grid .supporter span {
  max-width: 188px;
}

.supporter span {
  font-size: 0.75rem;
  color: var(--text-dim);
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Footer === */
footer {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* === Utility Classes === */
.text-orange { color: var(--orange); }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-center { text-align: center; }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }

.hidden { display: none; }

/* === QR Code === */
.qr-container {
  background: white;
  padding: var(--sp-4);
  border-radius: var(--radius);
  display: inline-block;
}

/* === Selection Cards (Payment methods, etc) === */
.select-card {
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.select-card:hover {
  border-color: var(--border-focus);
}

.select-card.selected {
  border-color: var(--orange);
  background: var(--orange-dim);
}

.select-card .icon {
  font-size: 1.75rem;
  margin-bottom: var(--sp-2);
}

.select-card h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: var(--sp-1);
}

.select-card p {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin: 0;
}

/* === Connection Status === */
.connection-status {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  font-size: 0.75rem;
  border-radius: var(--radius);
}

.connection-status.connected {
  background: var(--success-dim);
  color: var(--success);
}

.connection-status.disconnected {
  background: var(--error-dim);
  color: var(--error);
}

/* === Invoice/Monospace text === */
.mono-box {
  background: var(--bg-input);
  border-radius: var(--radius);
  padding: var(--sp-3);
  word-break: break-all;
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* === Progress Stepper === */
.stepper {
  margin: var(--sp-6) 0;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  margin-bottom: var(--sp-2);
}

.step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-input);
  border: 2px solid var(--border);
  font-size: 0.75rem;
}

.step.active .step-icon {
  border-color: var(--orange);
}

.step.complete .step-icon {
  background: var(--success);
  border-color: var(--success);
  color: #000;
}

.step.pending .step-icon,
.step.pending .step-content {
  opacity: 0.4;
}

.step-content {
  flex: 1;
  padding-top: var(--sp-1);
}

.step-title {
  font-weight: 600;
  font-size: 0.9375rem;
}

.step-detail {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.step-connector {
  width: 2px;
  height: 20px;
  background: var(--border);
  margin-left: 13px;
  margin-bottom: var(--sp-2);
}

.step-connector.active {
  background: var(--success);
}

/* === About Section === */
.about {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-8);
  color: var(--text-dim);
}

.about p {
  margin-bottom: var(--sp-4);
}

.about p:last-child {
  margin-bottom: 0;
}

/* === Back Link === */
.back-link {
  display: inline-block;
  color: var(--text-dim);
  font-size: 0.875rem;
  margin-bottom: var(--sp-6);
}

.back-link:hover {
  color: var(--text);
}

/* === CTA === */
.cta {
  text-align: center;
  margin: var(--sp-8) 0;
}

/* === Animations === */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* === Detail Rows (key-value pairs) === */
.detail-row {
  display: flex;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border);
}

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

.detail-label {
  width: 100px;
  flex-shrink: 0;
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.detail-value {
  flex: 1;
}

/* === Price Display === */
.price-box {
  background: var(--bg-input);
  padding: var(--sp-4);
  border-radius: var(--radius);
  margin-bottom: var(--sp-4);
}

.price-box .amount {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.price-box .detail {
  color: var(--text-dim);
  font-size: 0.875rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-1) 0;
}

.price-row .label {
  color: var(--text-dim);
}

.price-total {
  border-top: 1px solid var(--border);
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  font-weight: 600;
}

/* === Copy Button with Tooltip === */
.copy-container {
  position: relative;
}

.copy-text {
  background: var(--bg-input);
  border-radius: var(--radius);
  padding: var(--sp-3);
  padding-right: 44px;
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  max-height: 80px;
  overflow-y: auto;
}

.copy-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.15s;
}

.copy-btn:hover {
  color: var(--orange);
}

.copy-btn svg {
  width: 18px;
  height: 18px;
}

.copy-tooltip {
  position: absolute;
  top: 50%;
  right: 45px;
  transform: translateY(-50%);
  background: var(--success);
  color: #000;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.copy-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: var(--success);
  border-right: none;
}

.copy-tooltip.show {
  opacity: 1;
  visibility: visible;
}

/* === Success Animation === */
.success-screen {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
}

.success-checkmark {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--sp-6);
}

.success-checkmark .circle {
  fill: none;
  stroke: var(--success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  animation: draw-circle 0.6s ease forwards;
}

.success-checkmark .check {
  fill: none;
  stroke: var(--success);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: draw-check 0.4s ease forwards 0.5s;
}

@keyframes draw-circle {
  to { stroke-dashoffset: 0; }
}

@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}

.success-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--success);
  margin-bottom: var(--sp-4);
  opacity: 0;
  transform: translateY(20px);
  animation: fade-in-up 0.5s ease forwards 0.8s;
}

.success-message {
  color: var(--text-dim);
  opacity: 0;
  animation: fade-in 0.5s ease forwards 1s;
}

@keyframes fade-in-up {
  to { opacity: 1; transform: translateY(0); }
}

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

/* === Preformatted/About Text === */
.about-text {
  background: var(--bg-input);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  margin-top: var(--sp-4);
  white-space: pre-wrap;
  color: var(--text-dim);
}

/* === Invoice Amount Display === */
.invoice-amount {
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--orange);
  text-align: center;
}

.invoice-description {
  color: var(--text-dim);
  text-align: center;
  margin-top: var(--sp-2);
}

/* === Status with animated dots === */
.status-waiting::after {
  content: '';
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* === Info boxes === */
.info-box {
  background: var(--orange-dim);
  border: 1px solid rgba(247, 147, 26, 0.3);
  border-radius: var(--radius);
  padding: var(--sp-4);
}

.success-box {
  background: var(--success-dim);
  border: 1px solid var(--success);
  border-radius: var(--radius);
  padding: var(--sp-6);
  text-align: center;
}

.success-box h3 {
  color: var(--success);
  margin-bottom: var(--sp-2);
}

/* === Profile image (circular) === */
.profile-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--orange);
}

.profile-img-lg {
  width: 80px;
  height: 80px;
  border-width: 3px;
}

/* === Loading === */
.loading-spinner {
  text-align: center;
  padding: var(--sp-12);
  color: var(--text-dim);
}
