/* =========================================================
   UFY PHONE — BIBLIOTECA PRIVADA: ARCHIVOS DEL DISPOSITIVO Y SUBIDA
   Parte 3 de camera-library.css (se carga justo después de la
   parte anterior, en el mismo orden). Cubre la previsualización de
   los archivos elegidos del celular (barra superior, panel inferior,
   texto, error y confirmación), el aviso central de subida y el
   círculo de progreso al subir un video.
   ========================================================= */

/* =========================================================
   PREVISUALIZACIÓN DE ARCHIVOS DEL DISPOSITIVO
   ========================================================= */

.ufy-phone-camera-device-review {
  position: absolute;

  inset: 0;

  z-index: 40;

  display: flex;

  flex-direction: column;

  min-width: 0;
  min-height: 0;

  overflow: hidden;

  color: #fff;

  background: #000;
}


.ufy-phone-camera-device-review-image {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;

  background: #000;

  user-select: none;

  -webkit-user-select: none;

  -webkit-user-drag: none;
}


/* BARRA SUPERIOR */

.ufy-phone-camera-device-review-topbar {
  position: relative;

  z-index: 2;

  display: grid;

  grid-template-columns:
    auto minmax(0, 1fr) auto;

  align-items: center;

  min-height: 64px;

  box-sizing: border-box;

  padding:
    10px 14px;

  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.82) 0%,
      rgba(0, 0, 0, 0) 100%
    );
}


.ufy-phone-camera-device-review-close {
  min-height: 36px;

  box-sizing: border-box;

  padding:
    0 12px;

  border:
    1px solid
    rgba(255, 255, 255, 0.18);

  border-radius: 999px;

  color: #fff;

  background:
    rgba(0, 0, 0, 0.48);

  backdrop-filter:
    blur(2px);

  -webkit-backdrop-filter:
    blur(2px);

  font: inherit;
  font-size: 11px;
  font-weight: 680;

  cursor: pointer;
}


.ufy-phone-camera-device-review-close:disabled {
  opacity: 0.44;

  cursor: default;
}


.ufy-phone-camera-device-review-title {
  grid-column: 2;

  margin: 0;

  color: #fff;

  font-size: 15px;
  font-weight: 720;
  line-height: 1.2;

  text-align: center;
}


/* PANEL INFERIOR */

.ufy-phone-camera-device-review-panel {
  position: relative;

  z-index: 2;

  margin-top: auto;

  box-sizing: border-box;

  padding:
    17px 14px 15px;

  border-top:
    1px solid
    rgba(255, 255, 255, 0.12);

  background:
    rgba(6, 6, 8, 0.92);

  backdrop-filter:
    blur(2px);

  -webkit-backdrop-filter:
    blur(2px);

  box-shadow:
    0 -16px 40px
    rgba(0, 0, 0, 0.42);
}


.ufy-phone-camera-device-review-question {
  margin:
    0 0 12px;

  color: #fff;

  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;

  text-align: center;
}


.ufy-phone-camera-device-review-options {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 6px;
}


.ufy-phone-camera-device-review-option {
  min-height: 42px;

  box-sizing: border-box;

  padding:
    0 7px;

  border:
    1px solid
    rgba(255, 255, 255, 0.14);

  border-radius: 13px;

  color:
    rgba(255, 255, 255, 0.72);

  background:
    rgba(255, 255, 255, 0.06);

  font: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;

  cursor: pointer;

  -webkit-tap-highlight-color:
    transparent;
}


.ufy-phone-camera-device-review-option.is-active {
  border-color: #fff;

  color: #050506;

  background: #fff;
}


.ufy-phone-camera-device-review-option:disabled {
  color:
    rgba(255, 255, 255, 0.24);

  background:
    rgba(255, 255, 255, 0.025);

  cursor: default;
}


/* CAPTION DE PUBLICACIÓN */

.ufy-phone-camera-device-review-caption-group {
  display: grid;

  gap: 7px;

  margin-top: 12px;
}


.ufy-phone-camera-device-review-caption-group[hidden] {
  display: none;
}


.ufy-phone-camera-device-review-caption-label {
  color:
    rgba(255, 255, 255, 0.58);

  font-size: 10px;
  font-weight: 650;
}


.ufy-phone-camera-device-review-caption {
  width: 100%;
  min-height: 70px;

  box-sizing: border-box;

  resize: vertical;

  padding:
    10px 11px;

  border:
    1px solid
    rgba(255, 255, 255, 0.13);

  border-radius: 12px;

  outline: none;

  color: #fff;

  background:
    rgba(255, 255, 255, 0.055);

  font: inherit;
  font-size: 12px;
  line-height: 1.4;
}


.ufy-phone-camera-device-review-caption:focus {
  border-color:
    rgba(255, 255, 255, 0.42);
}


.ufy-phone-camera-device-review-caption::placeholder {
  color:
    rgba(255, 255, 255, 0.28);
}


/* MENSAJE DE ERROR */

.ufy-phone-camera-device-review-error {
  margin:
    11px 0 0;

  padding:
    8px 10px;

  border:
    1px solid
    rgba(255, 110, 110, 0.20);

  border-radius: 11px;

  color:
    rgba(255, 165, 165, 0.96);

  background:
    rgba(130, 20, 20, 0.16);

  font-size: 10px;
  line-height: 1.4;

  text-align: center;
}


.ufy-phone-camera-device-review-error[hidden] {
  display: none;
}


/* CONFIRMACIÓN */

.ufy-phone-camera-device-review-confirm {
  width: 100%;
  min-height: 44px;

  box-sizing: border-box;

  margin-top: 13px;

  padding:
    0 16px;

  border:
    1px solid #fff;

  border-radius: 999px;

  color: #050506;

  background: #fff;

  font: inherit;
  font-size: 12px;
  font-weight: 760;

  cursor: pointer;
}


.ufy-phone-camera-device-review-confirm:disabled {
  border-color:
    rgba(255, 255, 255, 0.10);

  color:
    rgba(255, 255, 255, 0.28);

  background:
    rgba(255, 255, 255, 0.06);

  cursor: default;
}


@media (max-width: 360px) {
  .ufy-phone-camera-device-review-options {
    grid-template-columns: 1fr;
  }

  .ufy-phone-camera-device-review-option {
    min-height: 38px;
  }
}

/* =========================================================
   CONFIRMACIÓN CENTRAL DE SUBIDA
   ========================================================= */

.ufy-phone-camera-library-toast {
  position: absolute;

  left: 50%;
  top: 50%;

  z-index: 60;

  display: grid;

  width:
    min(
      calc(100% - 48px),
      330px
    );

  box-sizing: border-box;

  gap: 9px;

  justify-items: center;

  transform:
    translate(-50%, -50%)
    scale(0.94);

  padding:
    17px 18px;

  border:
    1px solid
    rgba(255, 255, 255, 0.18);

  border-radius: 18px;

  color: #fff;

  background:
    rgba(7, 7, 9, 0.94);

  backdrop-filter:
    blur(2px);

  -webkit-backdrop-filter:
    blur(2px);

  box-shadow:
    0 18px 50px
    rgba(0, 0, 0, 0.58);

  opacity: 0;

  font-size: 13px;
  font-weight: 680;
  line-height: 1.4;

  text-align: center;

  pointer-events: none;

  transition:
    opacity 180ms ease,
    transform 180ms ease;
}


.ufy-phone-camera-library-toast::before {
  display: grid;

  width: 30px;
  height: 30px;

  place-items: center;

  border-radius: 50%;

  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}


.ufy-phone-camera-library-toast.is-success::before {
  content: "✓";

  color: #050506;

  background: #fff;
}


.ufy-phone-camera-library-toast.is-error::before {
  content: "!";

  color: #fff;

  background:
    rgba(190, 35, 35, 0.96);
}


.ufy-phone-camera-library-toast.is-info::before {
  content: "×";

  color: #fff;

  background:
    linear-gradient(
      135deg,
      #20d9ff,
      #a946ff
    );
}

.ufy-phone-camera-library-toast.is-visible {
  transform:
    translate(-50%, -50%)
    scale(1);

  opacity: 1;
}


/* =========================================================
   PROGRESO DE SUBIDA DE VIDEO
   ========================================================= */

.ufy-phone-camera-device-upload-progress {
  position: absolute;

  top:
    max(
      68px,
      calc(
        env(safe-area-inset-top) +
        54px
      )
    );

  right: 16px;

  z-index: 30;

  display: flex;
  flex-direction: column;

  align-items: center;

  min-width: 68px;

  color: #fff;

  pointer-events: none;
}


.ufy-phone-camera-device-upload-progress[hidden] {
  display: none;
}


.ufy-phone-camera-device-upload-circle {
  position: relative;

  width: 62px;
  height: 62px;

  border-radius: 50%;

  background:
    rgba(6, 7, 12, 0.42);

  backdrop-filter:
    blur(2px);

  -webkit-backdrop-filter:
    blur(2px);

  box-shadow:
    0 8px 24px
      rgba(0, 0, 0, 0.32);
}


.ufy-phone-camera-device-upload-svg {
  display: block;

  width: 100%;
  height: 100%;

  overflow: visible;

  transform:
    rotate(-90deg);
}


.ufy-phone-camera-device-upload-track,
.ufy-phone-camera-device-upload-value {
  fill: none;

  stroke-width: 3.2;

  vector-effect:
    non-scaling-stroke;
}


.ufy-phone-camera-device-upload-track {
  stroke:
    rgba(255, 255, 255, 0.18);
}


.ufy-phone-camera-device-upload-value {
  stroke:
    url(
      #ufy-phone-camera-upload-gradient
    );

  stroke-linecap: round;

  filter:
    drop-shadow(
      0 0 3px
      rgba(32, 217, 255, 0.62)
    )
    drop-shadow(
      0 0 5px
      rgba(169, 70, 255, 0.48)
    );

  transition:
    stroke-dashoffset 180ms linear;
}


.ufy-phone-camera-device-upload-cancel {
  appearance: none;

  position: absolute;

  inset: 9px;

  display: grid;

  width: 44px;
  height: 44px;

  padding: 0;

  place-items: center;

  border: 0;
  border-radius: 50%;

  color: #fff;

  background:
    transparent;

  font-family:
    Arial,
    sans-serif;

  font-size: 27px;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;

  pointer-events: auto;

  text-shadow:
    0 1px 5px
    rgba(0, 0, 0, 0.72);
}


.ufy-phone-camera-device-upload-cancel:hover {
  background:
    rgba(255, 255, 255, 0.08);
}


.ufy-phone-camera-device-upload-cancel:active {
  transform:
    scale(0.92);
}


.ufy-phone-camera-device-upload-cancel:disabled {
  cursor: default;

  opacity: 0.55;
}


.ufy-phone-camera-device-upload-percentage {
  margin-top: 5px;

  color:
    rgba(255, 255, 255, 0.96);

  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}


.ufy-phone-camera-device-upload-time {
  margin-top: 4px;

  color:
    rgba(255, 255, 255, 0.72);

  font-size: 10px;
  font-weight: 500;
  line-height: 1;

  white-space: nowrap;
}