/* ===== CUSTOM KEYCLOAK ACCOUNT THEME ===== */
/* Frosted glass design with dynamic background */
/* Logo and background are set dynamically in index.ftl using realm name */

/* ===== HEADER/MASTHEAD - Dark semi-transparent ===== */
.pf-v5-c-masthead {
  background-color: rgba(0, 0, 0, 0.7) !important;
  border-bottom: none !important;
}

.pf-v5-c-masthead * {
  background-color: transparent !important;
}

.pf-v5-c-page__header {
  background-color: rgba(0, 0, 0, 0.7) !important;
}

.pf-v5-c-page__header * {
  background-color: transparent !important;
}

[class*="brand"] {
  background-color: transparent !important;
}

[class*="toggle"] {
  background-color: transparent !important;
}

.pf-v5-c-brand {
  background-color: transparent !important;
}

/* ===== SIDEBAR - Dark semi-transparent ===== */
.pf-v5-c-page__sidebar {
  background-color: rgba(0, 0, 0, 0.7) !important;
  border-right: none !important;
}

.pf-v5-c-nav {
  background-color: transparent !important;
}

.pf-v5-c-nav__link {
  color: #e0e0e0 !important;
  padding-left: 16px !important;
}

.pf-v5-c-nav__link:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Active nav item with white left border indicator */
.pf-v5-c-nav__item.pf-m-current .pf-v5-c-nav__link,
.pf-v5-c-nav__link.pf-m-current {
  background-color: transparent !important;
  color: #e0e0e0 !important;
  border-left: 3px solid #e0e0e0 !important;
  padding-left: 13px !important;
}

.pf-v5-c-nav__link::after {
  display: none !important;
}

/* ===== HIDE SPECIFIC MENU ITEMS ===== */
.pf-v5-c-nav__item a[href*="/myPage"],
.pf-v5-c-nav__item a[href*="/resources"],
.pf-v5-c-nav__item a[href*="/applications"],
.pf-v5-c-nav__item a[href*="/groups"] {
  display: none !important;
}

.pf-v5-c-nav__item:has(a[href*="/myPage"]),
.pf-v5-c-nav__item:has(a[href*="/resources"]),
.pf-v5-c-nav__item:has(a[href*="/applications"]),
.pf-v5-c-nav__item:has(a[href*="/groups"]) {
  display: none !important;
}

/* ===== MAIN CONTENT AREA ===== */
.pf-v5-c-page__main {
  background-color: transparent !important;
}

.pf-v5-c-page__main-container {
  background-color: transparent !important;
}

.pf-v5-c-page__main-section {
  background-color: transparent !important;
  padding: 24px !important;
}

/* ===== CARD - Frosted glass effect ===== */
.pf-v5-c-card {
  background-color: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  color: #e0e0e0 !important;
  padding: 32px !important;
}

/* ===== MAIN CONTENT WRAPPER - Add card-like container ===== */
.pf-v5-c-page__main-section > *:first-child,
.pf-v5-c-page__main-group,
.pf-v5-l-stack,
[class*="page-content"],
[class*="PageContent"] {
  background-color: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 32px !important;
}

/* Target the form container directly */
.pf-v5-c-form {
  background-color: rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  padding: 24px !important;
}

/* Remove nested backgrounds */
.pf-v5-c-form * {
  background-color: transparent !important;
  backdrop-filter: none !important;
}

/* Re-apply input backgrounds */
.pf-v5-c-form .pf-v5-c-form-control,
.pf-v5-c-form input,
.pf-v5-c-form .pf-v5-c-text-input-group__text-input {
  background-color: rgba(128, 128, 128, 0.4) !important;
}

/* ===== TEXT - All softer white ===== */
.pf-v5-c-card *,
.pf-v5-c-page__main-section * {
  color: #e0e0e0 !important;
}

.pf-v5-c-title {
  color: #e0e0e0 !important;
}

.pf-v5-c-form__label {
  color: #e0e0e0 !important;
}

.pf-v5-c-form__label-text {
  color: #e0e0e0 !important;
}

.pf-v5-c-content {
  color: #e0e0e0 !important;
}

.pf-v5-c-description-list__term,
.pf-v5-c-description-list__description {
  color: #e0e0e0 !important;
}

/* ===== FORM INPUTS - Semi-transparent grey ===== */
.pf-v5-c-form-control {
  background-color: rgba(128, 128, 128, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #e0e0e0 !important;
  border-radius: 4px !important;
}

.pf-v5-c-form-control input,
.pf-v5-c-form-control textarea,
.pf-v5-c-text-input-group__text-input,
input.pf-v5-c-form-control {
  background-color: rgba(128, 128, 128, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #e0e0e0 !important;
}

.pf-v5-c-form-control::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* ===== BUTTONS ===== */
.pf-v5-c-button.pf-m-primary {
  background-color: #0d6e5b !important;
  border-color: #0d6e5b !important;
  color: white !important;
}

.pf-v5-c-button.pf-m-link,
.pf-v5-c-button.pf-m-secondary {
  background-color: transparent !important;
  color: #e0e0e0 !important;
}

/* ===== DROPDOWN/USER MENU ===== */
.pf-v5-c-dropdown__toggle,
.pf-v5-c-menu-toggle {
  background-color: transparent !important;
  color: #e0e0e0 !important;
}

.pf-v5-c-dropdown__toggle-text,
.pf-v5-c-menu-toggle__text {
  color: #e0e0e0 !important;
}

/* Dropdown menu panel */
.pf-v5-c-dropdown__menu,
.pf-v5-c-menu,
.pf-v5-c-menu__content {
  background-color: rgba(0, 0, 0, 0.9) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px !important;
}

.pf-v5-c-dropdown__menu-item,
.pf-v5-c-menu__item,
.pf-v5-c-menu__list-item {
  color: #e0e0e0 !important;
  background-color: transparent !important;
}

.pf-v5-c-dropdown__menu-item:hover,
.pf-v5-c-menu__item:hover,
.pf-v5-c-menu__list-item:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.pf-v5-c-menu__item-text {
  color: #e0e0e0 !important;
}

/* ===== JUMP TO SECTION - Align to top of main content ===== */
.pf-v5-c-jump-links {
  margin-top: 0 !important;
  position: relative !important;
  top: 95px !important;
}

/* Hide jump links on smaller screens to prevent overlap */
@media (max-width: 1200px) {
  .pf-v5-c-jump-links {
    display: none !important;
  }
}

.pf-v5-c-sidebar__panel {
  align-self: flex-start !important;
  margin-top: 0 !important;
}

.pf-v5-c-sidebar {
  align-items: flex-start !important;
}

.pf-v5-c-sidebar__content {
  align-self: flex-start !important;
}

/* ===== TABLES & DATA LISTS - For Device Activity and similar pages ===== */
.pf-v5-c-table {
  background-color: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  color: #e0e0e0 !important;
  overflow: hidden !important;
}

.pf-v5-c-table tr,
.pf-v5-c-table th,
.pf-v5-c-table td {
  background-color: transparent !important;
  color: #e0e0e0 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.pf-v5-c-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Data List - Frosted glass with rounded edges */
.pf-v5-c-data-list {
  background-color: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  padding: 16px !important;
}

.pf-v5-c-data-list__item {
  background-color: transparent !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e0e0e0 !important;
  margin-bottom: 8px !important;
}

.pf-v5-c-data-list__item-row {
  background-color: transparent !important;
}

.pf-v5-c-data-list__cell {
  color: #e0e0e0 !important;
}

/* Session/Device items - individual frosted containers */
.pf-v5-c-data-list__item,
[class*="session"],
[class*="device"] {
  background-color: rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  padding: 16px !important;
  margin-bottom: 12px !important;
}

/* Page main section content wrapper for device activity */
.pf-v5-c-page__main-section > div,
.pf-v5-c-page__main-section > section {
  background-color: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 24px !important;
}

/* Expandable sections */
.pf-v5-c-expandable-section__content {
  background-color: rgba(0, 0, 0, 0.3) !important;
  color: #e0e0e0 !important;
}

.pf-v5-c-expandable-section__toggle {
  color: #e0e0e0 !important;
}

/* Panel and drawer */
.pf-v5-c-panel {
  background-color: rgba(0, 0, 0, 0.5) !important;
  color: #e0e0e0 !important;
}

.pf-v5-c-drawer__content {
  background-color: transparent !important;
}

.pf-v5-c-drawer__panel {
  background-color: rgba(0, 0, 0, 0.7) !important;
}

/* Empty state */
.pf-v5-c-empty-state {
  background-color: transparent !important;
  color: #e0e0e0 !important;
}

/* Labels and badges */
.pf-v5-c-label {
  background-color: rgba(128, 128, 128, 0.4) !important;
  color: #e0e0e0 !important;
}

.pf-v5-c-badge {
  background-color: rgba(128, 128, 128, 0.4) !important;
  color: #e0e0e0 !important;
}

/* Alert boxes */
.pf-v5-c-alert {
  background-color: rgba(0, 0, 0, 0.5) !important;
  color: #e0e0e0 !important;
}

/* Accordion */
.pf-v5-c-accordion {
  background-color: transparent !important;
}

.pf-v5-c-accordion__toggle {
  background-color: rgba(0, 0, 0, 0.3) !important;
  color: #e0e0e0 !important;
}

.pf-v5-c-accordion__expanded-content {
  background-color: rgba(0, 0, 0, 0.4) !important;
  color: #e0e0e0 !important;
}

/* List items */
.pf-v5-c-list {
  color: #e0e0e0 !important;
}

/* Dividers */
.pf-v5-c-divider {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Modal/Dialog - in case any popups */
.pf-v5-c-modal-box {
  background-color: rgba(0, 0, 0, 0.9) !important;
  color: #e0e0e0 !important;
}

/* Chip/Tag */
.pf-v5-c-chip {
  background-color: rgba(128, 128, 128, 0.4) !important;
  color: #e0e0e0 !important;
}

/* Description list for device info */
.pf-v5-c-description-list {
  color: #e0e0e0 !important;
}

/* Generic white background override */
[style*="background-color: white"],
[style*="background-color: #fff"],
[style*="background: white"],
[style*="background: #fff"] {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

/* ===== PAGE HEADER TITLE ===== */
.pf-v5-c-page__main-breadcrumb,
.pf-v5-c-breadcrumb {
  background-color: transparent !important;
}

.pf-v5-c-breadcrumb__link {
  color: #e0e0e0 !important;
}

/* ===== ICONS ===== */
.pf-v5-c-nav__link .pf-v5-c-icon,
.pf-v5-c-nav__link svg,
.pf-v5-c-masthead .pf-v5-c-icon,
.pf-v5-c-masthead svg {
  color: #e0e0e0 !important;
  fill: #e0e0e0 !important;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}
