/* CSS RESET*/
 *:where(:not(html, iframe, canvas, img, svg, video, audio):not(svg *, symbol *)) {
  all: unset;
  display: revert;
}

/* Preferred box-sizing value */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Fix mobile Safari increase font-size on landscape mode */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Reapply the pointer cursor for anchor tags */
a,
button {
  cursor: pointer;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px auto -webkit-focus-ring-color;
  outline-offset: 3px;
}

/* Remove list styles (bullets/numbers) */
ol,
ul,
menu,
summary {
  list-style: none;
}

/* For images to not be able to exceed their container */
img {
  max-inline-size: 100%;
  max-block-size: 100%;
}

/* removes spacing between cells in tables */
table {
  border-collapse: collapse;
}

/* Safari - solving issue when using user-select:none on the <body> text input doesn't working */
input,
textarea {
  -webkit-user-select: auto;
}

/* revert the 'white-space' property for textarea elements on Safari */
textarea {
  white-space: revert;
}

/* minimum style to allow to style meter element */
meter {
  -webkit-appearance: revert;
  appearance: revert;
}

/* preformatted text - use only for this feature */
:where(pre) {
  all: revert;
  box-sizing: border-box;
}

/* reset default text opacity of input placeholder */
::placeholder {
  color: unset;
}

/* fix the feature of 'hidden' attribute.
 display:revert; revert to element instead of attribute */
:where([hidden]) {
  display: none;
}

/* revert for bug in Chromium browsers
 - fix for the content editable attribute will work properly.
 - webkit-user-select: auto; added for Safari in case of using user-select:none on wrapper element*/
:where([contenteditable]:not([contenteditable='false'])) {
  -moz-user-modify: read-write;
  -webkit-user-modify: read-write;
  overflow-wrap: break-word;
  -webkit-line-break: after-white-space;
  -webkit-user-select: auto;
}

/* apply back the draggable feature - exist only in Chromium and Safari */
:where([draggable='true']) {
  -webkit-user-drag: element;
}

/* Revert Modal native behavior */
:where(dialog:modal) {
  all: revert;
  box-sizing: border-box;
}

/* Remove details summary webkit styles */
::-webkit-details-marker {
  display: none;
}

/* Global variables */
:root {
  --base-font-size: 1rem;
  --body-line-height: 1.5;
  --heading-line-height: 1.25;
  --ui-line-height: 1.25;

  --heading-01: 2.027rem;
  --heading-02: 1.802rem;
  --heading-03: 1.602rem;
  --heading-04: 1.424rem;
  --heading-05: 1.266rem;
  --heading-06: 1.125rem;
  --body-01: 1rem;
  --body-02: 0.889rem;
  --caption: 0.79rem;
  --footnote: 0.702rem;
  --legal: 0.624rem;
  --fineprint: 0.555rem;

  --spacing-2xs: 0.125rem; 
  --spacing-xs: 0.25rem; 
  --spacing-sm: 0.5rem; 
  --spacing-md: 0.75rem; 
  --spacing-lg: 1rem; 
  --spacing-xl: 1.5rem; 
  --spacing-2xl: 2rem;
  --spacing-3xl: 2.5rem;
  --spacing-4xl: 3rem;

  --border-radius: 0.5rem;
  --border-radius-large: 0.75rem;

  --c-black: #000;
  --c-white: #fff;
  --c-gray-100: #f8f9fa;
  --c-gray-200: #e9ecef;
  --c-gray-300: #dee2e6;
  --c-gray-400: #ced4da;
  --c-gray-500: #adb5bd;
  --c-gray-600: #6c757d;
  --c-gray-700: #495057;
  --c-gray-800: #343a40;
  --c-gray-900: #212529;
  --c-primary: #0d6efd;
  --c-primary-hover: #0b5ed7;
  --c-secondary: #6c757d;
  --c-success: #198754;
  --c-success-text: #0f5132;
  --c-success-bg: #d3ede1;
  --c-info: #0dcaf0;
  --c-info-text: #087990;
  --c-info-bg: #d6ecf0;
  --c-warning: #ffc107;
  --c-warning-text: #997404;
  --c-warning-bg: #fff3cd;
  --c-danger: #dc3545;
  --c-danger-text: #842029;
  --c-danger-bg: #f8d7da;
  --c-background: #f8f9fa;
  --c-text: #212529;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  font-weight: 400;
  user-select: none;
  font-family: 'Helvetica Neue', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  background-color: var(--c-background);
  color: var(--c-text);
}

main {
  position: relative;
  width: 100%;
  max-width: 768px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
  padding: var(--spacing-lg);
  padding-top: var(--spacing-2xl);
}

.card {
  position: relative;
  width: 100%;
  max-width: 576px;
  background: var(--c-white);
  border-radius: var(--border-radius-large);
  padding: var(--spacing-xl);
  border: 1px solid var(--c-gray-200);
}

.card__header {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--spacing-lg);
}

.byte-logo {
  position: relative ;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 64px;
  border-radius: 6px;
  color: var(--c-info-text);
  overflow: hidden;

  svg {
    position: relative;
    height: 100%;
    width: auto;
  }
  margin-bottom: var(--spacing-md);
}

.card__title {
  position: relative;
  font-size: var(--heading-05);
  font-weight: 600;
  margin: 0;
  margin-bottom: var(--spacing-md);
}

.card__description {
  position: relative;
  font-size: var(--body-02);
  text-align: center;
}

.card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: var(--spacing-lg) 0;
}

.card__footer {
  position: relative;
  width: 100%;
  margin-top: var(--spacing-md);
}

.card-wrapper {
  position: relative;
  width: 100%;
  max-width: 576px;
}

.card-wrapper ~ .card-wrapper {
  margin-top: var(--spacing-2xl);
}

.form-control {
  position: relative;
  label {
    font-size: var(--body-02);
    font-weight: 500;
  }
  select, input, input[type="file"] {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid var(--c-gray-400);
    min-height: 32px;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    font-size: var(--body-02);
  }

  select::placeholder, input::placeholder {
    color: var(--c-gray-500);
  }

  label ~ select, label ~ input, label ~ .form-select, label ~ .form-password {
    margin-top: var(--spacing-xs);
  }

  input[type="file"] {
    padding: var(--spacing-sm);
  }
  input::file-selector-button {
    background-color: transparent;
    border: 1px solid var(--c-gray-400);
    background-color: var(--c-gray-200);
    border-radius: 0.25rem;
    min-height: 32px;
    font-size: var(--body-02);
    padding: var(--spacing-xs) var(--spacing-md);
    margin-right: var(--spacing-lg);
  }

  input.error, select.error {
    outline: 3px auto var(--c-danger);
    outline-offset: 3px;
  }
}

.progress-bar {
  position: relative;
  width: 100%;
  display: none;

  progress[value] {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    width: 100%;
    height: 12px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-top: var(--spacing-sm);
  }
  
  progress[value]::-webkit-progress-bar {
    background-color: var(--c-success-bg);
    border-radius: var(--border-radius);
  }
  
  progress[value]::-webkit-progress-value {
    background-color: var(--c-success);
    border-radius: var(--border-radius);
  }

}

.progress-bar__status {
  position: relative;
  font-size: var(--body-02);
  margin-top: var(--spacing-2xs);
  font-weight: 500;
  color: var(--c-success-text);
}


.form-control ~ .form-control {
  margin-top: var(--spacing-md);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  background-color: var(--c-gray-700);
  border-radius: var(--border-radius);
  border: 1px solid transparent;
  color: var(--c-white);
  font-size: var(--body-01);
}

.btn.btn-disabled {
  background-color: var(--c-gray-400);
  color: var(--c-gray-500);
  cursor: default;
}

.btn.btn-primary {
  background-color: var(--c-primary);
  color: var(--c-white);
}

.btn.btn-primary:active, .btn.btn-primary:hover {
  background-color: var(--c-primary-hover);
}

.btn.btn-muted {
  background-color: var(--c-gray-500);
  color: var(--c-gray-800);
}

.btn.btn-muted:active, .btn.btn-muted:hover {
  background-color: var(--c-gray-600);
  color: var(--c-gray-300);
}

.btn-group {
  position: relative;
  display: flex;
  align-items: center;
  .btn ~ .btn {
    margin-right: var(--spacing-md);
  }

  .btn:last-child, .btn:last-of-type {
    margin-right: 0;
  }
}

.form-password, .form-select {
  position: relative;
  display: flex;
  align-items: center;
}

.form-select {
  svg {
    position: absolute;
    right: var(--spacing-sm);
    width: 22px;
    height: 22px;
  }
}

.password-toggle {
  position: absolute;
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  right: var(--spacing-xs);
  background-color: transparent;
  border-radius: var(--border-radius);
  svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }
  svg:last-child {
    display: none;
  }
}

.section-title {
  font-weight: 500;
  font-size: var(--body-01);
  margin-bottom: var(--spacing-sm);
  color: var(--c-gray-600);
}

.status-notification {
  position: relative;
  width: 100%;
  display: none;
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--c-gray-200);
  min-height: 32px;
  font-size: var(--body-02);
  border-radius: var(--border-radius);
}

.status-notification__icon {
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: var(--spacing-sm);

  svg {
    width: 100%;
    height: 100%;
  }

}

.status-notification.status-notice {
  display: flex;
  background-color: var(--c-info-bg);
  color: var(--c-info-text);
}


.status-notification.status-danger {
  background-color: var(--c-danger-bg);
  color: var(--c-danger-text);
}

.status-notification.status-warning {
  background-color: var(--c-warning-bg);
  color: var(--c-warning-text);
}

.status-notification.status-success {
  background-color: var(--c-success-bg);
  color: var(--c-success-text);
}

.card__footer ~ .status-notification {
  margin-top: var(--spacing-lg);
}

#disconnectBtn {
  display: none;
}