/* General */

@import url('./Styles.min.css');
.hybridMenu {
	position: relative;
    overflow: hidden;
	z-index: 1;
}

.hybridMenu .paddingTopContent {
	padding-top: 10px !important;
}

.hmContentBox {
    overflow: auto;
    padding-top: 10px !important;
}

.hmNotificationCenter vaadin-button, .hmLeftMenu vaadin-button, .hmTopMenu vaadin-button {
    border-radius: 0;
    cursor: pointer;
}


/* Top Menu */
.hmTopMenu {
	position: fixed;
	top: 0;
	right: 100px;
	z-index: 1000;
}


/* Left Menu */
.hmLeftMenu {
	background: var(--main-bg-color) !important; /* #367761;  /*var(--hybridmenu-secondary-background-color);*/
    -webkit-transition: width 0.5s ease-in-out, min-width 0.5s ease-in-out, max-width 0.5s ease-in-out;
	-moz-transition: width 0.5s ease-in-out, min-width 0.5s ease-in-out, max-width 0.5s ease-in-out;
	-ms-transition: width 0.5s ease-in-out, min-width 0.5s ease-in-out, max-width 0.5s ease-in-out;
	-o-transition: width 0.5s ease-in-out, min-width 0.5s ease-in-out, max-width 0.5s ease-in-out;
	transition: width 0.5s ease-in-out, min-width 0.5s ease-in-out, max-width 0.5s ease-in-out;
    border-right: 1px solid rgba(0,0,0,0.1);
    overflow-y: visible;
    overflow-x: auto;
}

.hmLeftMenu vaadin-vertical-layout.subMenu {
    width: 100%;
    margin: 0;
}

.hmLeftMenu vaadin-vertical-layout.subMenu > vaadin-vertical-layout {
    -webkit-transition: max-height 0.5s ease-in-out;
	-moz-transition: max-height 0.5s ease-in-out;
	-ms-transition: max-height 0.5s ease-in-out;
	-o-transition: max-height 0.5s ease-in-out;
	transition: max-height 0.5s ease-in-out;
	width: calc(100% - 24px) !important;
	border-left: 1px solid var(--hybridmenu-left-menu-border-color);
	position: relative;
	margin-left: 24px;
	overflow: hidden;
	display: block;
	max-height: 0;
}

.hmLeftMenu vaadin-vertical-layout.subMenu.open > vaadin-vertical-layout {
	max-height: 500px;
}

.hmLeftMenu vaadin-vertical-layout.subMenu.open > vaadin-button div.vaadin-button[part="label"] iron-icon.buttonOtherIcon {
    -webkit-transform: rotate(-180deg);
	-moz-transform: rotate(-180deg);
	-ms-transform: rotate(-180deg);
	-o-transform: rotate(-180deg);
	transform: rotate(-180deg);
}

.hmLeftMenu > label {
    border-bottom: 1px solid var(--hybridmenu-left-menu-border-color);
    text-align: center;
    position: relative;
    font-size: 17px;
    padding: 8px 0;
    width: 100%;
    margin: 0;
}

.hmLeftMenu > label img {
    vertical-align: middle;
    margin-right: 5px;
    height: 32px;
    width: 32px;
}

.hmLeftMenu > label > p {
    vertical-align: middle;
    display: inline-block;
    margin: 0 0 0 5px;
}


/* Notification Center */
.hmNotificationCenter {
	background: var(--hybridmenu-notification-center-background-color);
    -webkit-transition: right 0.5s cubic-bezier(0.77, 0, 0.18, 1);
	-moz-transition: right 0.5s cubic-bezier(0.77, 0, 0.18, 1);
	-ms-transition: right 0.5s cubic-bezier(0.77, 0, 0.18, 1);
	-o-transition: right 0.5s cubic-bezier(0.77, 0, 0.18, 1);
	transition: right 0.5s cubic-bezier(0.77, 0, 0.18, 1);
    width: 350px !important;
    position: fixed;
    z-index: 100000;
    right: -350px;
    top: 0;
}

.hmNotificationCenter vaadin-button {
	background: var(--hybridmenu-notification-center-button-background-color);
	color: var(--hybridmenu-text-color);
}

.hmNotificationCenter .notification {
	box-shadow: 0px 0px 2px var(--hybridmenu-notification-center-notification-shadow-color);
	background: var(--hybridmenu-notification-center-notification-background-color);
    width: calc(100% - 36px);
	position: relative;
	margin: 8px 8px 0;
	display: block;
	padding: 10px;
}

.hmNotificationCenter .notification > iron-icon {
    height: calc(100% - 16px);
    border-right: 1px solid;
    vertical-align: middle;
    position: absolute;
    padding: 0 8px 0 0;
    font-size: 28px;
    display: block;
    margin: 8px;
    width: 34px;
    left: 0;
    top: 0;
}

.hmNotificationCenter .notification.withIcon .content, .hmNotificationCenter .notification.withIcon .title {
    padding-left: 50px;
}

.hmNotificationCenter .notification .title {
    line-height: 12px;
    font-size: 18px;
    height: 24px;
}

.hmNotificationCenter .notification .timeAgo {
    margin: 4px 0 0 8px;
    position: absolute;
    font-size: 10px;
}

.hmNotificationCenter .notification .timeAgo:before {
    display: inline-block;
    margin: 0 7px 1px 0;
    border-radius: 50%;
    content: '';
    height: 4px;
    width: 4px;
}

.hmNotificationCenter .notification .content {
    font-size: 14px;
    display: block;
}

.hmNotificationCenter .notification vaadin-button {
	transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
	background: transparent;
    position: absolute;
    margin: 0;
    right: 0;
    top: 0;
}

.hmNotificationCenter .notification vaadin-button:hover {
	background: var(--hybridmenu-notification-center-notification-remove-background-color);
	color: var(--hybridmenu-notification-center-notification-remove-color);
}

.hmNotificationCenter .footer {
    text-align: center;
    position: relative;
    display: block;
    width: 100%;
}

.hmNotificationCenter .footer vaadin-button {
	transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
    display: inline-block;
    position: relative;
    margin: 5px;
}

.hmNotificationCenter .lastNotification {
	transition: right 1s cubic-bezier(0.79, 0.14, 0.15, 0.86), opacity 0.3s ease-in-out;
    height: auto !important;
    pointer-events: none;
    position: absolute;
    margin: 10px 5px;
    right: -350px;
    opacity: 0;
    bottom: 0;
}

.hmNotificationCenter .lastNotification.top {
    margin-top: 2px;
    bottom: unset;
    top: 0;
}

.hmNotificationCenter .lastNotification.show {
    pointer-events: auto;
    right: 350px;
    opacity: 1;
}

.hmNotificationCenter .lastNotification.show:hover {
    opacity: 0.1;
}

.hmNotificationCenter .lastNotification .notification {
    width: 300px;
}


/* breadcrumbs */
.hmBreadcrumbs {
    padding: 3px 20px;
    background-color: var(--header-bg-color) !important; /*      antiquewhite;*/ 
    color:var(--header-text-color) !important; /* black; */
}


.hmBreadcrumbs vaadin-button {
    background-color: var(--header-bg-color) !important; /*      antiquewhite;*/ 
    color:var(--header-text-color) !important; /* black; */
    background: transparent;
}

.hmBreadcrumbs vaadin-button:not(.clickable):before, .hmBreadcrumbs vaadin-button:not(.clickable):hover:before {
    background: transparent !important;
}

.hmBreadcrumbs vaadin-button.clickable {
    cursor: pointer;
}

.hmBreadcrumbs vaadin-select {
    margin-top: 0;
    margin-bottom: 0;
    /*margin-left: auto; /* Pushes the selector to the right side */
    /*width: 150px;*/
}

.hmBreadcrumbs vaadin-select::part(toggle-button) {
    background-color: var(--header-bg-color) !important; /*      antiquewhite;*/ 
    color:var(--header-text-color) !important; /* black; */
}

.hmBreadcrumbs label > iron-icon {
/*    height: 100% !important; */
    height: 1.2em !important; /* Fixed: prevents vertical stretching */
    width: 1.2em;
    margin: 0 4px;}


/* Others */
.hmLeftMenu.minimal {
    
}
.hmBreadcrumbs .user-profile-menu {
    margin-left: 15px; /* Space between language selector and user menu */
    background-color: var(--header-bg-color) !important; /*      antiquewhite;*/ 
    color:var(--header-text-color) !important; /* black; */
}

/* Ensure the button inside the user menu is also black */
.hmBreadcrumbs .user-profile-menu vaadin-button {
    background-color: var(--header-bg-color) !important; /*      antiquewhite;*/ 
    color:var(--header-text-color) !important; /* black; */
}

.hmNotificationCenter.open {
    right: 0;
}
@media all and (max-width: 1100px) {
	 .hmTopMenu,
  .list-view.editing .toolbar,
   .list-view.editing .contact-grid {
    display: none;
  }
  /* Optional: Ensure the Left Menu is accessible if the Top Menu is hidden */
  .hmLeftMenu {
     width: 100% !important;
     position: absolute;
     z-index: 100;
  }
}
a[highlight] {
    font-weight: bold;
    text-decoration: underline;
}

.v-loading-indicator {
    position: fixed !important;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999;
    background-color: rgba(255, 255, 255, 0.5); /* Dims the UI */
    background-image: url('./images/loading.gif'); 
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60px;
    display: none;
    cursor: wait;
}

/* Only show it when the 'first' delay has passed */
.v-loading-indicator.first,
.v-loading-indicator.second,
.v-loading-indicator.third {
    display: block !important; 
}

.manual-loader-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: wait;
}

/* Target the internal container for the focus highlight */
vaadin-text-field[focus-within]::part(input-field),
vaadin-password-field[focus-within]::part(input-field),
vaadin-number-field[focus-within]::part(input-field),
vaadin-select[focus-within]::part(input-field),
vaadin-date-picker[focus-within]::part(input-field),
vaadin-text-area[focus-within]::part(input-field) {
    /* This forces the border to show the theme color (Green or Blue) */
    outline: 2px solid var(--main-bg-color) !important;
    outline-offset: -2px; /* Keeps the border inside the box */
    
    /* Optional: Add a subtle glow */
    box-shadow: 0 0 4px var(--main-bg-color) !important;
}

vaadin-text-field[focus-within], 
vaadin-select[focus-within] {
    --lumo-primary-color: var(--main-bg-color) !important;
}

/* 3. Optional: Match the label text color to the theme color */
vaadin-text-field::part(label),
vaadin-select::part(label),
vaadin-date-picker::part(label) {
    color: var(--main-bg-color);
    font-weight: 500;
}


:root {
  --main-bg-color: #367761; 
  --lumo-primary-color: #367761;
  --header-bg-color:  antiquewhite !important;
  --header-text-color: black !important;
  --gridhd-bg-color: #a5e6d7 !important;
  --gridhd-text-color: black !important;

}

/* 2. Green Theme Variant */
[theme~="green-theme"] {
  --main-bg-color: #367761 !important;
  --lumo-primary-color: #367761 !important;
  --lumo-primary-color-50pct: rgba(54, 119, 97, 0.5) !important;
  --lumo-primary-text-color: #367761 !important;
  --lumo-primary-contrast-color: #ffffff !important;
  --menu-hover-color: hsla(0, 0%, 100%, 0.2) !important;
  --hybridmenu-left-menu-button-background-color: #367761 !important;
  --hybridmenu-primary-color: #ffffff !important; 
  /* Header Colors */
  --header-bg-color: antiquewhite !important;
  --header-text-color: black !important;
  --gridhd-bg-color: #a5e6d7 !important;
  --gridhd-text-color: black !important;
}

/* 3. Blue Theme Variant */
[theme~="blue-theme"] {
  --main-bg-color:#034082 !important; /* #0056b3 !important; */
  --lumo-primary-color: #034082 !important;
  --lumo-primary-color-50pct: rgba(3, 64, 130, 0.5) !important; /* rgba(0, 86, 179, 0.5) !important;*/
  --lumo-primary-text-color: #034082 !important;
  --lumo-primary-color-10pct: rgba(3, 64, 130, 0.1) !important;
  --lumo-primary-contrast-color: #ffffff !important;
  --menu-hover-color: hsla(0, 0%, 100%, 0.2) !important;
  --hybridmenu-left-menu-button-background-color: #034082 !important; /* #0056b3 !important;*/
  --hybridmenu-primary-color: #ffffff !important;
  --hybridmenu-left-menu-button-hover-background-color: rgba(255, 255, 255, 0.15) !important;
  --hybridmenu-left-menu-active-color: #ffffff !important;
  /* Header Colors (Changed to light blue tint for contrast) */
  --header-bg-color: #e3f2fd !important;
  --header-text-color: #0d47a1 !important;
  --gridhd-bg-color: #add5ff !important;
  --gridhd-text-color: black !important;
}

[theme~="green-theme"], :root {
    --lumo-primary-color: #367761 !important;
}
[theme~="blue-theme"] {
    --lumo-primary-color: #034082 !important;
}

/* 2. Apply the highlight only ON FOCUS using the box-shadow method */
vaadin-text-field:focus-within::part(input-field),
vaadin-password-field:focus-within::part(input-field),
vaadin-number-field:focus-within::part(input-field),
vaadin-select:focus-within::part(input-field),
vaadin-date-picker:focus-within::part(input-field),
vaadin-combo-box:focus-within::part(input-field),
vaadin-text-area:focus-within::part(input-field) {
    /* This uses the box-shadow trick you confirmed works */
    box-shadow: 0 0 0 1px var(--lumo-primary-color) !important;
}

vaadin-grid::part(auto-matched-row) {
    background-color: rgba(0, 255, 0, 0.1) !important; /* Light Green */
    color: #2e7d32 !important; /* Dark Green Text */
}
vaadin-grid::part(matched-row) {
    background-color: #d4edda !important; /* Light green */
    color: #155724 !important;            /* Dark green text */
}
vaadin-grid::part(matched-row selected) {
    background-color: #d4edda !important;
}

vaadin-grid::part(success-row) {
    background-color: #d4edda !important; /* Green for Matches */
}
vaadin-grid::part(warning-row) {
    background-color: #fff3cd !important; /* Yellow for Exceptions */
}