/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import url("/assets/vendor/bootstrap@5.3.7.min-32b6274f.css");
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');
@import url("/assets/lexxy-7120afd6.css");

/* UCB approved font: https://brand.berkeley.edu/visual-identity/typography/ */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

html {
  scrollbar-gutter: stable;
}

:root {
  /* UCB colors */
  --ucb-blue: 0, 38, 118;
  --ucb-gold: 253, 181, 21;

  /* override default Bootstrap variables - !important is needed here */
  --bs-dark-rgb: var(--ucb-blue) !important;
  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
}

.navbar .navbar-brand {
  font-size: 1rem;
}

/* UCB branded navbar - use this class instead of bg-dark for consistent branding */
.navbar-ucb {
  --bs-bg-opacity: 1;
  background-color: rgb(var(--ucb-blue)) !important;
}

@media (min-width: 1200px) {
  body .h1, body h1 {
    font-size: 1.5rem;
    font-weight: bold;
  }
}

@media (min-width: 1200px) {
  body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  #main {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  #main .container {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
}

#site-footer {
  background-color: rgb(var(--ucb-blue)) !important;
  color: white;
  padding: 2rem 1rem;
  font-size: 0.9rem;

  img {
    height: 45px;
  }
}

.wifi-access-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

@media screen and (min-width: 768px) {
  .wifi-access-header {
    flex-direction: row;
    justify-content: space-between;
  }
}

.wifi-access-table {
  margin-top: 8px;

  th {
    white-space: nowrap;
  }

  td {
    padding-right: 24px;
    vertical-align: middle;
    white-space: nowrap;
  }
}

/* Mobile responsive layout for eduroam account display */
/* Shows three rows on narrow screens: Username, Status, Buttons */
@media screen and (max-width: 575px) {
  .wifi-access-table.eduroam-account-table {
    thead {
      display: none;
    }

    tbody tr {
      display: flex;
      flex-direction: column;
    }

    tbody td {
      display: block;
      padding: 8px 0;

      &:before {
        font-weight: bold;
        display: block;
        margin-bottom: 4px;
      }

      &:first-child:before {
        content: "User";
      }

      &:last-child:before {
        content: "Status";
      }
    }
  }
}

.loading-indicator {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid rgb(var(--ucb-blue));
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Mobile responsive layout for Berkeley-IoT device display (Scope 4 - T8, T16) */
/* Shows three rows on narrow screens: MAC+Name, Status, Buttons */
@media screen and (max-width: 575px) {
  .wifi-access-table {
    thead {
      display: none;
    }

    tbody tr {
      display: flex;
      flex-direction: column;
      margin-bottom: 1rem;
      border: 1px solid #dee2e6;
      border-radius: 0.25rem;
      padding: 0.5rem;
    }

    tbody td {
      display: block;
      padding: 4px 0;
      border: none;

      &:before {
        font-weight: bold;
        display: inline;
        margin-right: 8px;
      }

      &:nth-child(1):before {
        content: "MAC:";
      }

      &:nth-child(2):before {
        content: "Name:";
      }

      &:nth-child(3):before {
        content: "Status:";
      }

      &:nth-child(4):before {
        content: "Actions:";
      }
    }
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.wifi-access-summary {
  margin-left: 2rem;
  margin-bottom: 2rem;
  line-height: 2.0;
}

input.wifi-access-password-input {
  border: 2px solid #6c757d;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input.wifi-access-password-input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.wifi-account-username-field {
  font-weight: bold;
  border: none;
}

.wifi-password-change-fields {
  display: flex;
  flex-direction: column;
}

.wifi-password-change-fields input {
  margin-bottom: 16px;
}

@media screen and (min-width: 768px) {
  .wifi-password-change-fields {
    flex-direction: row;
  }

  .wifi-password-change-fields .form-group {
    align-items: center;
  }

  .wifi-password-change-fields input {
    margin-bottom: 0;
  }
}

.wifi-access-form-info {
  margin-left: 1.5rem;
}

.password-alert {
  margin-top: 30px;
  border: solid 1px #eee;
}

/* Required field indicator (red asterisk) */
.required-indicator {
  color: red;
  margin-left: 2px;
  font-weight: bold;
}

.global-notice {
  background: #3c7ea1;
  color: #fff;
  font-size: 120%;
  padding: 20px;
  padding-left: 81px;
}

.sub-header-title {
  font-size: 2.25rem;
  font-weight: 300;
  color: rgb(var(--ucb-blue));
  letter-spacing: 0.02em;
}

.sub-header-nav {
  border-bottom: 1px solid #dee2e6;
}

.sub-header-nav .nav {
  gap: 0.5rem;
}

.sub-header-nav .nav-link {
  color: rgb(var(--ucb-blue));
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.sub-header-nav .nav-link:hover {
  color: rgb(var(--ucb-blue));
  border-bottom-color: rgb(var(--ucb-blue));
}

.sub-header-nav .nav-link.active {
  font-weight: 600;
  border-bottom-color: rgb(var(--ucb-blue));
}

/* Required field indicator (red asterisk) */
.required-indicator {
  color: red;
  margin-left: 2px;
  font-weight: bold;
}
