/* Transmitter — оформление по образцу onetime.j0ker.site (Bootstrap 3.3.7 + main.css).
   Значения сняты с оригинала: шрифт, цвета, отступы, радиусы. */
:root {
  --text: #333333;
  --input-text: #555555;
  --muted: #777777;
  --line: #cccccc;
  --line-soft: #e5e5e5;
  --bg: #ffffff;
  --well: #f5f5f5;
  --brand: #0063c7;          /* цвет логотипа 1T */
  --success: #5cb85c;        /* btn-success */
  --success-border: #4cae4c;
  --success-hover: #449d44;
  --success-hover-border: #398439;
  --danger: #d9534f;
  --danger-text: #a94442;
  --focus: #66afe9;
  --font: "Open Sans", sans-serif;
  --mono: Menlo, Monaco, Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 10px; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.42857143;
}

/* логотип по центру, как на onetime */
.logocentered { width: 72px; margin: 0 auto; text-align: center; }
.logocentered a { display: inline-block; line-height: 0; }
.logocentered img { width: 36px; height: 36px; }

/* колонка 600px с отступами Bootstrap .container */
main { max-width: 600px; margin: 10px auto; padding: 0 15px; }
@media (min-width: 630px) { main { padding: 0; } }

.label-title { display: block; font-weight: 700; margin: 0 0 5px; word-break: break-word; }
h1 { font-size: 16px; font-weight: 700; margin: 0 0 5px; font-family: var(--font); }
.sub, .small { font-size: 85%; }
.sub { margin: 0 0 15px; }
.who { color: var(--muted); font-weight: 400; font-size: 85%; }
.mt { margin-top: 15px; }
.sub.tight { margin: 7px 0 0; }

hr { display: block; height: 1px; border: 0; border-top: 1px solid var(--line); margin: 1em 0; padding: 0; }
footer { max-width: 600px; margin: 0 auto 20px; padding: 0 15px; font-size: 85%; color: var(--muted); }
@media (min-width: 630px) { footer { padding: 0; } }

/* ---------- кнопки: .btn = btn-success, .ghost = btn-default */
.btn {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  font: inherit; font-size: 18px; line-height: 1.3333333; font-weight: 400;
  padding: 10px 16px; border-radius: 6px; border: 1px solid var(--success-border);
  background: var(--success); color: #fff; cursor: pointer; text-decoration: none;
  white-space: nowrap; user-select: none; touch-action: manipulation;
}
.btn:hover, .btn:focus-visible { background: var(--success-hover); border-color: var(--success-hover-border); color: #fff; }
.btn:active { box-shadow: inset 0 3px 5px rgba(0,0,0,.125); }
.btn.ghost, .btn.danger { background: #fff; border-color: var(--line); color: var(--text); }
.btn.ghost:hover, .btn.ghost:focus-visible { background: #e6e6e6; border-color: #adadad; color: var(--text); }
.btn.danger { color: var(--danger-text); }
.btn.danger:hover, .btn.danger:focus-visible { background: var(--danger); border-color: #d43f3a; color: #fff; }
.btn.small { font-size: 14px; line-height: 20px; padding: 6px 12px; border-radius: 4px; }
.btn[disabled], .btn[disabled]:hover { opacity: .65; cursor: not-allowed; box-shadow: none; background: var(--success); border-color: var(--success-border); color: #fff; }
.btn.ghost[disabled], .btn.ghost[disabled]:hover { background: #fff; border-color: var(--line); color: var(--text); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.small svg { width: 14px; height: 14px; }
:focus-visible { outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; }

/* ---------- панель кнопок */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 15px; }
.meta { margin-left: auto; color: var(--muted); font-size: 85%; }

/* ---------- поля ввода: form-control / form-group-lg */
textarea, input[type="text"], input[type="password"] {
  display: block; width: 100%; font: inherit; color: var(--input-text); background: #fff;
  border: 1px solid var(--line); border-radius: 4px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143;
  height: 34px; box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
textarea { height: auto; min-height: 118px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; resize: vertical; }
textarea::placeholder, input::placeholder { color: #999; }
textarea:focus, input:focus {
  border-color: var(--focus); outline: 0;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}
label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: 700; font-size: 16px; }

/* ---------- окно новой вставки */
.composer { margin-bottom: 15px; }
.tabs { display: flex; border-bottom: 1px solid #ddd; margin-bottom: 15px; }
.tab {
  appearance: none; font: inherit; font-size: 14px; color: #337ab7; background: none; cursor: pointer;
  border: 1px solid transparent; border-radius: 4px 4px 0 0; padding: 8px 15px; margin: 0 2px -1px 0;
}
.tab:hover { background: #eee; border-color: #eee #eee #ddd; }
.tab[aria-selected="true"] { color: var(--input-text); background: #fff; border-color: #ddd #ddd transparent; cursor: default; }
.drop {
  border: 2px dashed var(--line); border-radius: 6px; padding: 30px 16px; text-align: center;
  color: var(--muted); cursor: pointer; font-size: 14px;
}
.drop.over, .drop:hover { border-color: var(--focus); color: var(--text); }
.drop strong { color: var(--text); }
.drop .picked { color: var(--text); font-weight: 700; word-break: break-all; font-size: 16px; }
.composer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 15px; }
.composer-foot .btn:first-child { order: 2; margin-left: auto; }   /* «Отправить» справа, как «Get a link» */
.hint { flex-basis: 100%; order: 3; font-size: 85%; color: var(--muted); }
.progress { height: 20px; margin-top: 15px; background: var(--well); border-radius: 4px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.1); }
.progress > i { display: block; height: 100%; width: 0; background: var(--success); transition: width .15s linear; }

/* ---------- содержимое */
.viewer pre {
  margin: 0; padding: 10px 16px; font: 14px/1.5 var(--mono); color: var(--input-text);
  white-space: pre-wrap; word-break: break-word; tab-size: 4;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075); max-height: 70vh; overflow: auto;
}
.file-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 6px; }
.file-icon {
  width: 36px; height: 36px; border-radius: 4px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font: 700 10px var(--font); text-transform: uppercase; flex: none; overflow: hidden;
}
.file-name { color: #337ab7; word-break: break-all; text-decoration: none; }
.file-name:hover { color: #23527c; text-decoration: underline; }
.file-size { color: var(--muted); font-size: 85%; }
.preview { margin-top: 10px; text-align: center; padding: 4px; border: 1px solid #ddd; border-radius: 4px; background: #fff; }
.preview img { max-width: 100%; max-height: 70vh; display: inline-block; vertical-align: middle; }
.empty { text-align: center; color: var(--muted); padding: 30px 16px; border: 1px solid var(--line-soft); border-radius: 6px; font-size: 14px; }
.empty p { margin: 0 0 15px; }
.empty h1 { color: var(--text); }

/* ---------- всплывающее сообщение */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 10px); opacity: 0;
  max-width: calc(100% - 30px); padding: 10px 15px; border-radius: 4px; font-size: 14px; pointer-events: none;
  color: #3c763d; background: #dff0d8; border: 1px solid #d6e9c6; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { color: var(--danger-text); background: #f2dede; border-color: #ebccd1; }

/* ---------- админка */
.admin-head { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.admin-head h1 { margin: 0; }
.admin-head .btn { margin-left: auto; }
.panel-pad { padding: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 15px; }
.form-row .btn { grid-column: 1 / -1; justify-self: end; }
.url-preview { color: var(--muted); font-size: 85%; margin-top: 7px; word-break: break-all; }
.error-text { color: var(--danger-text); font-size: 85%; margin-top: 7px; min-height: 1.2em; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-top: 1px solid #ddd; vertical-align: middle; line-height: 1.42857143; }
thead th { border-top: 0; border-bottom: 2px solid #ddd; font-weight: 700; }
td a { color: #337ab7; text-decoration: none; }
td a:hover { text-decoration: underline; }
td .muted, td.muted { color: var(--muted); font-size: 85%; }
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn + .btn { margin-left: 4px; }
.login { max-width: 320px; margin: 20px auto 0; }
.login input { margin-bottom: 10px; }
.login .btn { width: 100%; justify-content: center; }

@media (max-width: 479px) {
  .meta { margin-left: 0; width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .form-row .btn { justify-self: stretch; justify-content: center; }
  td.actions .btn { margin: 2px 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
td.actions .btn.small { font-size: 12px; line-height: 1.5; padding: 3px 8px; border-radius: 3px; }
td:first-child { white-space: nowrap; }
