/*
  styles.css — RunLog
  Componentes reutilizables que complementan Tailwind.
  Todo lo que se repite en varios templates va acá.
*/

/* ── Inputs ── */
.input-field {
  display: block;
  width: 100%;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: .625rem;
  padding: .55rem .8rem;
  font-size: .875rem;
  color: white;
  font-family: 'DM Sans', sans-serif;
  transition: border-color .15s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.input-field::placeholder { color: #8b949e; }
.input-field:focus { border-color: #2dd4bf; }
.input-field:hover:not(:focus) { border-color: #484f58; }

/* select flecha */
select.input-field {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}
select.input-field option { background: #161b22; color: rgb(255, 255, 255); }

/* ── Botones ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2dd4bf;
  color: #0d1117;
  font-weight: 600;
  font-size: .875rem;
  padding: .65rem 1.25rem;
  border-radius: .75rem;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
  font-family: 'DM Sans', sans-serif;
}
.btn-primary:hover { background: #14b8a6; }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { background: #1c2333; color: #484f58; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #8b949e;
  font-size: .875rem;
  padding: .6rem 1.2rem;
  border-radius: .75rem;
  border: 1px solid #30363d;
  cursor: pointer;
  transition: all .15s;
  font-family: 'DM Sans', sans-serif;
}
.btn-secondary:hover { color: white; border-color: #484f58; background: #1c2333; }

/* ── Textarea ── */
textarea.input-field { line-height: 1.5; }

/* ── Animaciones extra ── */
@keyframes pulse-teal {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, .4); }
  50%       { box-shadow: 0 0 0 6px rgba(45, 212, 191, 0); }
}
.pulse-teal { animation: pulse-teal 2s infinite; }

/* ── Line clamp ── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Scrollable horizontal para tablas ── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }



/* register functions */
.input-valid   { border-color: #22c55e !important; }
.input-invalid { border-color: #ef4444 !important; }

.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .85rem;
  pointer-events: none;
}

.strength-bar {
  height: 3px;
  border-radius: 2px;
  margin-top: 5px;
  background: #30363d;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .3s, background .3s;
}


/* remove arrows in input type number */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}