/* --- Ajuste scroll: solo vertical, nunca horizontal --- */
html,
body {
  overflow-x: hidden;
  width: 100vw;
  max-width: 100vw;
}

body {
  background: #e5e5e5;
  color: #17034d;
}

.container-admin {
  max-width: 1485px;
}
.soundboard-grid {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.sound-card,
.card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: 2px 1px 11px 0px #ffffff8c;
}

.row,
.col-12,
.d-flex,
.align-items-center,
.justify-content-center,
.flex-wrap,
.gap-4 {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

.card-header,
.card-body {
  overflow-wrap: break-word;
}

/* Custom Toasts (top-right) */
.custom-toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  min-width: 240px;
  max-width: 350px;
  z-index: 9999;
  color: #fff;
  background: #2196f3;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-30px);
  transition: opacity 0.3s, transform 0.3s;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.custom-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.edit-mode {
  background: #130d29 !important;
  border: 10px solid #ff0000 !important;
}

.sound-card.edit-draggable {
  outline: 3px dashed #ffc107;
  cursor: grab !important;
  opacity: 0.85;
  transition: all 0.2s ease;
}

.sound-card.edit-selected {
  box-shadow: 0 0 0 3px #ffc107;
  transform: rotate(3deg);
  z-index: 1000;
}

/* Indicadores de drop */
.sound-card.drop-target-left {
  border-left: 24px solid #0dff00 !important;
  box-shadow: -8px 0 15px rgba(40, 167, 69, 0.5);
  transform: translateX(8px);
  transition: all 0.2s ease;
}

.sound-card.drop-target-right {
  border-right: 24px solid #0dff00 !important;
  box-shadow: 8px 0 15px rgba(40, 167, 69, 0.5);
  transform: translateX(-8px);
  transition: all 0.2s ease;
}

body:not(.admin-page) {
  background: #181a1b;
  color: #e0e0e0;
  border: 10px solid #41aa2900 !important;
  height: 100vh;
}

/* Modo oscuro para cards y elementos principales */
.sound-card,
.card {
  box-shadow: 2px 1px 11px 0px #ffffff8c;

}


/* Fade-in for .chargin */
.chargin {
  opacity: 0;
  transition: opacity 0.01s ease;
  pointer-events: none;
}

.chargin.show,
.chargin.visible {
  opacity: 1;
  pointer-events: auto;
}

/* 
.sound-card .card-header, .card-header {
  background: #23272b !important;
  color: #f8f9fa !important;
  border-bottom: 1px solid #343a40;
}

.sound-card .card-footer, .card-footer {
  background: #23272b !important;
  color: #bdbdbd !important;
  border-top: 1px solid #343a40;
}*/

body:not(.admin-page) .form-control,
body:not(.admin-page) .form-select,
body:not(.admin-page) .form-range {
  background: #23272b00 !important;
  color: #e0e0e0 !important;
  border-color: #343a40 !important;
}

body:not(.admin-page) .form-control:focus,
body:not(.admin-page) .form-select:focus,
body:not(.admin-page) .form-range:focus {
  background: #23272b !important;
  color: #fff !important;
  border-color: #198754 !important;
}

body:not(.admin-page) .btn,
body:not(.admin-page) .btn:focus,
body:not(.admin-page) .btn:active {
  color: #fff !important;
  border-color: #343a40 !important;
}

.btn-success {
  background-color: #198754 !important;
}

.btn-info {
  background-color: #0dcaf0 !important;
}

.btn-warning {
  background-color: #ffc107 !important;
  color: #23272b !important;
}

.btn-danger {
  background-color: #dc3545 !important;
}

.progress-bar {
  background-color: #198754 !important;
}

body:not(.admin-page) ::-webkit-scrollbar {
  width: 10px;
  background: #23272b;
}

body:not(.admin-page) ::-webkit-scrollbar-thumb {
  background: #343a40;
  border-radius: 5px;
}

.sound-btn:active,
.sound-btn.playing {
  animation: pulse 0.3s;
  background-color: #198754 !important;
  color: #fff;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 #198754;
  }

  70% {
    box-shadow: 0 0 10px 10px #19875433;
  }

  100% {
    box-shadow: 0 0 0 0 #198754;
  }
}

/* Card header: menos padding y más alto para dos líneas */
.sound-card .card-header {
  padding-top: 4px;
  padding-bottom: 4px;
  min-height: 44px;
  font-size: 1.05em;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
}

/* Icono más grande */
.sound-card .card-body span {
  font-size: 3.2em !important;
  line-height: 1.1;
}

/* Range de volumen ocupa el 90% del ancho del card */
.sound-card .soundboard-volume {
  width: 90% !important;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
  display: block;
  height: 18px !important;
  min-height: 12px;

}

/* El progress-bar siempre visible y pegado al bottom del card */
.sound-card .progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin-bottom: 0;
  height: 5px !important;
  min-height: 3px;
  z-index: 2;
}

.sound-card .progress-bar {
  background-color: #8f0707 !important;
}

.sound-card {
  position: relative;
  overflow: hidden;
}


.rangeAltoAncho {
  width: 50px;
}

/* Card footer: menos alto y menos padding */
.sound-card .card-footer {
  padding-top: 2px;
  padding-bottom: 2px;
  min-height: 28px;
  font-size: 0.9em;
  line-height: 1.1;
}





.sound-card.playing {
  border: 5.5px solid #198754;
  /* box-shadow: 0 0 18px 2px #19875488, 0 0 0 4px #19875422 inset; */
  animation: playingGlow 0.8s infinite alternate, playingScale 0.5s infinite ease-in-out;
  transition: border-color 1.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
  background: #04bb65 !important;
  color: #fff;
}

/* @keyframes playingGlow {
  0% {
    box-shadow: 0 0 18px 2px #19875488, 0 0 0 4px #19875422 inset;
    border-color: #198754;
  }
  100% {
    box-shadow: 0 0 28px 8px #198754ef, 0 0 0 8px #19875433 inset;
    border-color: #28a745;
  }
} */

@keyframes playingScale {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.10);
  }

  100% {
    transform: scale(1);
  }
}

.card-footer {
  margin-bottom: 3px;
}

/* Card con dispositivo de salida personalizado: borde naranja */
.card-custom-device {
  border: 5px solid orange !important;
}

.form-range {
  background-color: #04bb6600 !important;
}

/* Split.js gutter visual */
.gutter {
  background: #bdbdbd;
  border-radius: 6px;
  box-shadow: 0 0 6px #0002;
  transition: background 0.2s;
  cursor: col-resize !important;
  width: 12px !important;
  min-width: 12px;
  height: 100%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gutter:hover {
  background: #888;
}

.gutter.gutter-horizontal {
  cursor: col-resize !important;
}

.gutter.gutter-vertical {
  cursor: row-resize !important;
}