/*
  Shared base styles for SIP.js demos
  Inspired by coturn weiyuai.cn inline page styles
*/

:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #333333;
  --muted: #666666;
  --accent: #2196f3;
  --border: #e6e8ef;
  --code-bg: #f4f6f8;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  padding: 0;
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.container {
  max-width: 920px;
  margin: 40px auto;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 28px 32px;
}

h1 {
  margin: 0 0 10px;
  font-size: 28px;
  color: var(--text);
}

h2 {
  margin-top: 28px;
  color: var(--muted);
}

p, ol, ul { color: var(--text); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

pre {
  background: var(--code-bg);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 14px 16px;
  overflow: auto;
}

hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.info, .warning {
  padding: 12px 14px;
  border-radius: 8px;
  margin: 14px 0;
  border: 1px solid var(--border);
}
.info { background: #f0f7ff; }
.warning { background: #fff8e6; }

button, input, select {
  font: inherit;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: #fafbfe;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.02s ease;
}
button:hover { background: #f2f5ff; }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.backlink { margin-bottom: 10px; display: inline-block; }

/* Utility spacing for inline controls */
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Demo specific helpers */
.panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
}

.kbd {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  font-family: ui-monospace, Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 0.9em;
}
