/* =========================================================
   UFY PHONE — REDES SOCIALES: FORMULARIOS, ESTADOS Y MODAL
   Parte 3 de social-links.css (se carga justo después de la
   parte anterior, en el mismo orden). Formulario de añadir y editar
   red, estados (vacío, cargando, error), mensaje central, pantallas
   pequeñas y el modal de vidrio de la app de redes sociales.
   ========================================================= */

/* =========================================================
   FORMULARIOS
   ========================================================= */

.ufy-phone-social-edit-identity {
  margin:
    16px 0
    13px;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 7px;
}


.ufy-phone-social-logo.is-edit {
  width: 54px;
  height: 54px;

  border-radius: 16px;
}


.ufy-phone-social-logo.is-edit::before {
  inset: 10px;
}


.ufy-phone-social-edit-identity strong {
  color:
    rgba(var(--ufy-rgb-255,255,255,255),0.96);

  font-size:calc(12px * var(--ufy-font-scale,1));
  font-weight: 680;
}


.ufy-phone-social-form {
  margin-top: 17px;

  display: flex;
  flex-direction: column;

  gap: 13px;
}


.ufy-phone-social-edit-identity +
.ufy-phone-social-form {
  margin-top: 0;
}


.ufy-phone-social-field {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 6px;
}


.ufy-phone-social-field > span {
  color:
    rgba(var(--ufy-rgb-255,255,255,255),0.60);

  font-size:calc(9px * var(--ufy-font-scale,1));
  font-weight: 610;
}


.ufy-phone-social-field input,
.ufy-phone-social-field select {
  appearance: none;

  width: 100%;
  min-height: 40px;

  box-sizing: border-box;

  padding:
    9px
    11px;

  border:
    1px solid
    rgba(var(--ufy-rgb-255,255,255,255),0.14);

  border-radius: 12px;

  outline: 0;

  background:
    rgba(var(--ufy-rgb-0,0,0,0),0.34);

  color:
    rgba(var(--ufy-rgb-255,255,255,255),0.96);

  font: inherit;
  font-size:calc(10px * var(--ufy-font-scale,1));
}


.ufy-phone-social-field select option {
  background: #11121a;
  color: var(--ufy-tone-255,#fff);
}


.ufy-phone-social-field input:focus,
.ufy-phone-social-field select:focus {
  border-color:
    rgba(187, 123, 255, 0.80);

  box-shadow:
    0 0 0 2px
    rgba(157, 77, 255, 0.14);
}


.ufy-phone-social-form-visibility {
  min-height: 38px;

  box-sizing: border-box;

  padding:
    8px
    10px;

  border:
    1px solid
    rgba(var(--ufy-rgb-255,255,255,255),0.10);

  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background:
    rgba(var(--ufy-rgb-255,255,255,255),0.045);

  color:
    rgba(var(--ufy-rgb-255,255,255,255),0.82);

  font-size:calc(9px * var(--ufy-font-scale,1));
  font-weight: 570;

  cursor: pointer;
}


.ufy-phone-social-form-visibility input {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;

  pointer-events: none;
}


.ufy-phone-social-form-visibility i {
  position: relative;

  width: 31px;
  height: 18px;

  border-radius: 999px;

  background:
    rgba(var(--ufy-rgb-255,255,255,255),0.18);
}


.ufy-phone-social-form-visibility i::after {
  content: "";

  position: absolute;

  left: 2px;
  top: 2px;

  width: 14px;
  height: 14px;

  border-radius: 50%;

  background: var(--ufy-tone-255,#fff);

  transition:
    transform 160ms ease;
}


.ufy-phone-social-form-visibility
input:checked + i {
  background:
    rgba(157, 77, 255, 0.88);
}


.ufy-phone-social-form-visibility
input:checked + i::after {
  transform:
    translateX(13px);
}


.ufy-phone-social-form-actions {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 8px;
}


.ufy-phone-social-form-actions button {
  appearance: none;

  min-height: 38px;

  padding:
    8px
    10px;

  border-radius: 12px;

  font: inherit;
  font-size:calc(9px * var(--ufy-font-scale,1));
  font-weight: 670;

  cursor: pointer;
}


.ufy-phone-social-form-actions .is-secondary {
  border:
    1px solid
    rgba(var(--ufy-rgb-255,255,255,255),0.13);

  background:
    rgba(var(--ufy-rgb-255,255,255,255),0.06);

  color:
    rgba(var(--ufy-rgb-255,255,255,255),0.78);
}


.ufy-phone-social-form-actions .is-primary {
  border:
    1px solid
    rgba(211, 173, 255, 0.38);

  background:
    linear-gradient(
      145deg,
      #a65bff,
      #7034bd
    );

  color: var(--ufy-tone-255,#fff);
}


.ufy-phone-social-delete {
  appearance: none;

  min-height: 35px;

  padding:
    8px
    12px;

  border:
    1px solid
    rgba(255, 105, 125, 0.24);

  border-radius: 12px;

  background:
    rgba(151, 35, 52, 0.12);

  color:
    rgba(255, 126, 143, 0.90);

  font: inherit;
  font-size:calc(9px * var(--ufy-font-scale,1));
  font-weight: 650;

  cursor: pointer;
}


/* =========================================================
   ESTADOS
   ========================================================= */

.ufy-phone-social-empty {
  grid-column:
    1 / -1;

  min-height: 120px;

  display: grid;
  place-items: center;

  color:
    rgba(var(--ufy-rgb-255,255,255,255),0.48);

  font-size:calc(10px * var(--ufy-font-scale,1));
  line-height: 1.45;

  text-align: center;
}


.ufy-phone-social-empty.is-management {
  min-height: 90px;
}


.ufy-phone-social-loading,
.ufy-phone-social-error {
  width: 100%;
  height: 100%;

  min-height: 190px;

  box-sizing: border-box;

  padding: 25px;

  display: grid;
  place-items: center;

  color:
    rgba(var(--ufy-rgb-255,255,255,255),0.66);

  font-size:calc(11px * var(--ufy-font-scale,1));
  line-height: 1.45;

  text-align: center;
}


.ufy-phone-social-error {
  color:
    rgba(255, 132, 148, 0.92);
}


/* =========================================================
   MENSAJE CENTRAL
   ========================================================= */

.ufy-phone-social-toast {
  position: absolute;

  left: 50%;
  top: 50%;

  z-index: 50;

  max-width:
    calc(
      100% - 42px
    );

  box-sizing: border-box;

  padding:
    11px
    15px;

  border:
    1px solid
    rgba(var(--ufy-rgb-255,255,255,255),0.17);

  border-radius: 13px;

  opacity: 0;

  transform:
    translate(-50%, -50%)
    scale(0.94);

  background:
    rgba(5, 6, 11, 0.90);

  box-shadow:
    0 12px 30px
    rgba(var(--ufy-rgb-0,0,0,0),0.46);

  backdrop-filter:
    blur(3px);

  -webkit-backdrop-filter:
    blur(3px);

  color: var(--ufy-tone-255,#fff);

  font-size:calc(10px * var(--ufy-font-scale,1));
  font-weight: 620;
  line-height: 1.35;

  text-align: center;

  pointer-events: none;

  transition:
    opacity 180ms ease,
    transform 180ms ease;
}


.ufy-phone-social-toast.is-visible {
  opacity: 1;

  transform:
    translate(-50%, -50%)
    scale(1);
}


/* =========================================================
   PANTALLAS PEQUEÑAS
   ========================================================= */

@media (max-width: 360px) {
  .ufy-phone-social-panel {
    padding:
      15px
      11px
      16px;
  }


  .ufy-phone-social-logo.is-public {
    width: 51px;
    height: 51px;
  }


  .ufy-phone-social-management-text span {
    max-width: 96px;
  }


  .ufy-phone-social-visibility > span {
    display: none;
  }
}


/* =========================================================
   REDES SOCIALES — MODAL DE VIDRIO
   ========================================================= */

#ufyPhoneAppScreen[data-ufy-active-app="social"] {
  background:
    rgba(3, 4, 9, 0.16);

  backdrop-filter:
    blur(7px);

  -webkit-backdrop-filter:
    blur(7px);
}


#ufyPhoneAppScreen[data-ufy-active-app="social"]
.ufy-phone-app-screen-header {
  display: none;
}


#ufyPhoneAppScreen[data-ufy-active-app="social"]
.ufy-phone-app-screen-content {
  padding: 0;

  overflow: hidden;

  background:
    transparent;
}


#ufyPhoneAppScreen[data-ufy-active-app="social"]
.ufy-phone-social-panel {
  background:
    linear-gradient(
      145deg,
      rgba(7, 8, 14, 0.38),
      rgba(3, 4, 9, 0.27)
    );

  box-shadow:
    0 18px 42px
    rgba(var(--ufy-rgb-0,0,0,0),0.24);

  backdrop-filter:
    blur(5px);

  -webkit-backdrop-filter:
    blur(5px);
}