/* =========================================
   BIVA WI-FI LOCATIONS ADMIN PAGE
========================================= */


/* =========================================
   LOCATION LIST
========================================= */

.wifi-locations-list {
  display: grid;

  gap: 18px;

  padding:
    clamp(
      18px,
      2.5vw,
      30px
    );
}


.wifi-location-count {
  flex: 0 0 auto;

  padding:
    8px 12px;

  border:
    1px solid
    var(
      --biva-line,
      #e2e8f0
    );

  border-radius:
    999px;

  color:
    var(
      --biva-blue-700,
      #1d4ed8
    );

  background:
    var(
      --biva-blue-50,
      #eff6ff
    );

  font-size:
    0.7rem;

  font-weight:
    850;

  white-space:
    nowrap;
}


/* =========================================
   LOCATION CARD
========================================= */

.wifi-location-card {
  width: 100%;
  min-width: 0;

  padding: 22px;

  border:
    1px solid
    var(
      --biva-line,
      #e2e8f0
    );

  border-radius:
    var(
      --biva-radius-lg,
      22px
    );

  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(
        53,
        112,
        243,
        0.06
      ),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      #ffffff,
      var(
        --biva-surface-soft,
        #f8fafc
      )
    );

  box-shadow:
    0 14px 38px
    rgba(
      15,
      23,
      42,
      0.06
    );
}


.wifi-location-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 22px;
}


.wifi-location-card__identity {
  min-width: 0;

  display: flex;
  align-items: flex-start;

  gap: 14px;
}


.wifi-location-card__icon {
  width: 48px;
  height: 48px;

  flex: 0 0 48px;

  display: grid;
  place-items: center;

  border-radius: 15px;

  color:
    var(
      --biva-blue-700,
      #1d4ed8
    );

  background:
    var(
      --biva-blue-50,
      #eff6ff
    );
}


.wifi-location-card__icon svg {
  width: 22px;
  height: 22px;

  fill: none;

  stroke:
    currentColor;

  stroke-width: 1.9;

  stroke-linecap: round;
  stroke-linejoin: round;
}


.wifi-location-card__identity > div {
  min-width: 0;
}


.wifi-location-card__name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 9px;
}


.wifi-location-card__name-row h3 {
  margin: 0;

  color:
    var(
      --biva-ink,
      #0f172a
    );

  font-size: 1rem;
  font-weight: 900;
}


.wifi-location-card__identity p {
  margin:
    6px 0 0;

  color:
    var(
      --biva-muted,
      #64748b
    );

  font-size: 0.75rem;
  line-height: 1.55;
}


.wifi-location-card__identity small {
  display: block;

  margin-top: 6px;

  color:
    var(
      --biva-subtle,
      #94a3b8
    );

  font-size: 0.66rem;
  line-height: 1.45;
}


.wifi-location-card__featured {
  padding:
    5px 8px;

  border:
    1px solid
    rgba(
      242,
      183,
      5,
      0.2
    );

  border-radius:
    999px;

  color:
    #805800;

  background:
    var(
      --biva-yellow-50,
      #fff9db
    );

  font-size: 0.58rem;
  font-weight: 900;

  text-transform:
    uppercase;
}


/* =========================================
   LOCATION STATUSES
========================================= */

.wifi-location-card__statuses {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;

  gap: 8px;
}


.wifi-location-status {
  min-height: 28px;

  display: inline-flex;
  align-items: center;

  gap: 7px;

  padding:
    5px 9px;

  border:
    1px solid
    transparent;

  border-radius:
    999px;

  font-size: 0.62rem;
  font-weight: 850;

  white-space:
    nowrap;
}


.wifi-location-status > span {
  width: 7px;
  height: 7px;

  border-radius: 50%;
}


.wifi-location-status.is-success {
  color:
    var(
      --biva-success,
      #079455
    );

  border-color:
    rgba(
      7,
      148,
      85,
      0.14
    );

  background:
    var(
      --biva-success-soft,
      #ecfdf3
    );
}


.wifi-location-status.is-success > span {
  background:
    var(
      --biva-success,
      #079455
    );
}


.wifi-location-status.is-warning {
  color:
    #805800;

  border-color:
    rgba(
      242,
      183,
      5,
      0.18
    );

  background:
    var(
      --biva-yellow-50,
      #fff9db
    );
}


.wifi-location-status.is-warning > span {
  background:
    var(
      --biva-yellow-500,
      #f2b705
    );
}


.wifi-location-status.is-danger {
  color:
    var(
      --biva-danger,
      #d92d20
    );

  border-color:
    rgba(
      217,
      45,
      32,
      0.14
    );

  background:
    var(
      --biva-danger-soft,
      #fff1f0
    );
}


.wifi-location-status.is-danger > span {
  background:
    var(
      --biva-danger,
      #d92d20
    );
}


.wifi-location-status.is-blue {
  color:
    var(
      --biva-blue-700,
      #1d4ed8
    );

  border-color:
    rgba(
      53,
      112,
      243,
      0.16
    );

  background:
    var(
      --biva-blue-50,
      #eff6ff
    );
}


.wifi-location-status.is-blue > span {
  background:
    var(
      --biva-blue-500,
      #3570f3
    );
}


.wifi-location-status.is-neutral {
  color:
    var(
      --biva-muted,
      #64748b
    );

  border-color:
    var(
      --biva-line,
      #e2e8f0
    );

  background:
    var(
      --biva-surface-muted,
      #f1f5f9
    );
}


.wifi-location-status.is-neutral > span {
  background:
    var(
      --biva-subtle,
      #94a3b8
    );
}


/* =========================================
   DETAILS GRID
========================================= */

.wifi-location-card__details {
  margin-top: 22px;

  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(
        0,
        1fr
      )
    );

  gap: 12px;
}


.wifi-location-card__details > div {
  min-width: 0;

  padding: 14px;

  border:
    1px solid
    var(
      --biva-line,
      #e2e8f0
    );

  border-radius: 14px;

  background:
    rgba(
      255,
      255,
      255,
      0.78
    );
}


.wifi-location-card__details span {
  display: block;

  margin-bottom: 5px;

  color:
    var(
      --biva-muted,
      #64748b
    );

  font-size: 0.62rem;
  font-weight: 750;

  text-transform:
    uppercase;
}


.wifi-location-card__details strong {
  display: block;

  overflow: hidden;

  color:
    var(
      --biva-ink,
      #0f172a
    );

  font-size: 0.73rem;
  font-weight: 820;

  text-overflow:
    ellipsis;

  white-space:
    nowrap;
}


/* =========================================
   FLAGS
========================================= */

.wifi-location-card__flags {
  margin-top: 15px;

  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 8px;
}


.wifi-location-flag {
  min-height: 27px;

  display: inline-flex;
  align-items: center;

  padding:
    5px 9px;

  border:
    1px solid
    transparent;

  border-radius:
    999px;

  font-size: 0.61rem;
  font-weight: 820;
}


.wifi-location-flag.is-enabled {
  color:
    var(
      --biva-success,
      #079455
    );

  border-color:
    rgba(
      7,
      148,
      85,
      0.14
    );

  background:
    var(
      --biva-success-soft,
      #ecfdf3
    );
}


.wifi-location-flag.is-disabled {
  color:
    var(
      --biva-muted,
      #64748b
    );

  border-color:
    var(
      --biva-line,
      #e2e8f0
    );

  background:
    var(
      --biva-surface-muted,
      #f1f5f9
    );
}


/* =========================================
   ERROR MESSAGE
========================================= */

.wifi-location-card__error {
  margin-top: 14px;

  padding: 14px;

  border:
    1px solid
    rgba(
      217,
      45,
      32,
      0.14
    );

  border-radius: 14px;

  background:
    var(
      --biva-danger-soft,
      #fff1f0
    );
}


.wifi-location-card__error strong {
  display: block;

  color:
    var(
      --biva-danger,
      #d92d20
    );

  font-size: 0.68rem;
  font-weight: 900;
}


.wifi-location-card__error p {
  margin:
    5px 0 0;

  color:
    var(
      --biva-danger,
      #d92d20
    );

  font-size: 0.71rem;
  line-height: 1.5;
}


/* =========================================
   CARD ACTIONS
========================================= */

.wifi-location-card__actions {
  margin-top: 18px;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;

  gap: 9px;
}


/* =========================================
   EMPTY STATE
========================================= */

.wifi-locations-empty {
  min-height: 330px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding:
    38px 22px;

  text-align: center;
}


.wifi-locations-empty > span {
  width: 62px;
  height: 62px;

  display: grid;
  place-items: center;

  border-radius: 20px;

  color:
    var(
      --biva-blue-700,
      #1d4ed8
    );

  background:
    var(
      --biva-blue-50,
      #eff6ff
    );
}


.wifi-locations-empty > span svg {
  width: 28px;
  height: 28px;

  fill: none;

  stroke:
    currentColor;

  stroke-width: 1.9;

  stroke-linecap: round;
  stroke-linejoin: round;
}


.wifi-locations-empty h3 {
  margin:
    18px 0 0;

  color:
    var(
      --biva-ink,
      #0f172a
    );

  font-size: 1rem;
  font-weight: 900;
}


.wifi-locations-empty p {
  max-width: 520px;

  margin:
    8px 0 20px;

  color:
    var(
      --biva-muted,
      #64748b
    );

  font-size: 0.76rem;
  line-height: 1.6;
}


/* =========================================
   MODAL
========================================= */

body.wifi-location-modal-open {
  overflow: hidden;
}


.wifi-location-modal {
  position: fixed;

  inset: 0;

  z-index: 3000;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 22px;

  background:
    rgba(
      7,
      11,
      20,
      0.72
    );

  backdrop-filter:
    blur(
      8px
    );
}


.wifi-location-modal.is-open {
  display: flex;
}


.wifi-location-modal__dialog {
  width:
    min(
      980px,
      100%
    );

  max-height:
    calc(
      100vh -
      44px
    );

  display: flex;
  flex-direction: column;

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.08
    );

  border-radius: 26px;

  background:
    #ffffff;

  box-shadow:
    0 34px 90px
    rgba(
      7,
      11,
      20,
      0.32
    );

  overflow: hidden;
}


.wifi-location-modal__header {
  flex: 0 0 auto;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 22px;

  padding:
    24px 26px;

  color:
    #ffffff;

  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(
        53,
        112,
        243,
        0.38
      ),
      transparent 36%
    ),
    linear-gradient(
      145deg,
      var(
        --biva-black,
        #070b14
      ),
      var(
        --biva-black-soft,
        #0d1729
      ),
      #173675
    );
}


.wifi-location-modal__header span {
  display: block;

  margin-bottom: 7px;

  color:
    var(
      --biva-yellow-400,
      #ffcc33
    );

  font-size: 0.65rem;
  font-weight: 850;

  letter-spacing: 0.12em;

  text-transform:
    uppercase;
}


.wifi-location-modal__header h2 {
  margin: 0;

  color:
    #ffffff;

  font-size: 1.5rem;
  font-weight: 900;
}


.wifi-location-modal__header p {
  max-width: 680px;

  margin:
    8px 0 0;

  color:
    rgba(
      255,
      255,
      255,
      0.63
    );

  font-size: 0.74rem;
  line-height: 1.55;
}


.wifi-location-modal__close {
  width: 38px;
  height: 38px;

  flex: 0 0 38px;

  display: grid;
  place-items: center;

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.1
    );

  border-radius: 12px;

  color:
    #ffffff;

  background:
    rgba(
      255,
      255,
      255,
      0.06
    );

  font-size: 1.4rem;

  cursor: pointer;
}


/* =========================================
   FORM
========================================= */

.wifi-location-form {
  min-height: 0;

  flex: 1;

  padding:
    24px 26px 26px;

  overflow-y: auto;
}


.wifi-location-form__section {
  margin-top: 26px;

  padding-top: 24px;

  border-top:
    1px solid
    var(
      --biva-line,
      #e2e8f0
    );
}


.wifi-location-form__section:first-child {
  margin-top: 0;

  padding-top: 0;

  border-top: 0;
}


.wifi-location-form__section > header {
  margin-bottom: 16px;
}


.wifi-location-form__section h3 {
  margin: 0;

  color:
    var(
      --biva-ink,
      #0f172a
    );

  font-size: 0.9rem;
  font-weight: 900;
}


.wifi-location-form__grid {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(
        0,
        1fr
      )
    );

  gap: 16px;
}


.wifi-location-field {
  min-width: 0;

  display: grid;

  gap: 7px;
}


.wifi-location-field--full {
  grid-column:
    1 /
    -1;
}


.wifi-location-field > span {
  color:
    var(
      --biva-ink,
      #0f172a
    );

  font-size: 0.69rem;
  font-weight: 800;
}


.wifi-location-field input,
.wifi-location-field select,
.wifi-location-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;

  padding:
    10px 12px;

  border:
    1px solid
    var(
      --biva-line,
      #e2e8f0
    );

  border-radius: 12px;

  outline: none;

  color:
    var(
      --biva-ink,
      #0f172a
    );

  background:
    #ffffff;

  font: inherit;
  font-size: 0.75rem;

  transition:
    border-color
    160ms ease,
    box-shadow
    160ms ease;
}


.wifi-location-field textarea {
  min-height: 92px;

  resize: vertical;
}


.wifi-location-field input:focus,
.wifi-location-field select:focus,
.wifi-location-field textarea:focus {
  border-color:
    var(
      --biva-blue-500,
      #3570f3
    );

  box-shadow:
    0 0 0 4px
    rgba(
      53,
      112,
      243,
      0.1
    );
}


.wifi-location-form__switches {
  margin-top: 18px;

  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(
        0,
        1fr
      )
    );

  gap: 12px;
}


.wifi-location-form__switches label {
  min-height: 42px;

  display: flex;
  align-items: center;

  gap: 9px;

  padding:
    9px 12px;

  border:
    1px solid
    var(
      --biva-line,
      #e2e8f0
    );

  border-radius: 12px;

  color:
    var(
      --biva-text,
      #334155
    );

  background:
    var(
      --biva-surface-soft,
      #f8fafc
    );

  font-size: 0.72rem;
  font-weight: 750;
}


.wifi-location-form__switches input {
  width: 17px;
  height: 17px;

  accent-color:
    var(
      --biva-blue-500,
      #3570f3
    );
}


.wifi-location-form__message {
  min-height: 20px;

  margin:
    18px 0 0;

  font-size: 0.72rem;
  font-weight: 750;
}


.wifi-location-form__message[
  data-type="error"
] {
  color:
    var(
      --biva-danger,
      #d92d20
    );
}


.wifi-location-form__actions {
  margin-top: 20px;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 10px;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (
  max-width:
  1250px
) {

  .wifi-location-card__details {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }

}


@media (
  max-width:
  760px
) {

  .wifi-location-card {
    padding: 18px;
  }


  .wifi-location-card__header {
    flex-direction: column;
  }


  .wifi-location-card__statuses {
    justify-content: flex-start;
  }


  .wifi-location-card__details {
    grid-template-columns:
      1fr;
  }


  .wifi-location-card__actions {
    align-items: stretch;

    flex-direction: column;
  }


  .wifi-location-card__actions
    > * {
    width: 100%;
  }


  .wifi-location-modal {
    align-items: flex-end;

    padding: 0;
  }


  .wifi-location-modal__dialog {
    width: 100%;

    max-height: 94vh;

    border-radius:
      24px 24px 0 0;
  }


  .wifi-location-modal__header {
    padding:
      21px 18px;
  }


  .wifi-location-form {
    padding:
      20px 18px 24px;
  }


  .wifi-location-form__grid {
    grid-template-columns:
      1fr;
  }


  .wifi-location-field--full {
    grid-column:
      auto;
  }


  .wifi-location-form__switches {
    grid-template-columns:
      1fr;
  }


  .wifi-location-form__actions {
    flex-direction:
      column-reverse;
  }


  .wifi-location-form__actions
    > * {
    width: 100%;
  }

}


/* =========================================
   REDUCED MOTION
========================================= */

@media (
  prefers-reduced-motion:
  reduce
) {

  .wifi-location-card,
  .wifi-location-field input,
  .wifi-location-field select,
  .wifi-location-field textarea {
    transition: none;
  }

}