/*
  Google Material theme színpaletták/témák.
  Ha valamely komponensnek egyedi stílus kell és azt egy színnel el kell látni,
  akkor SZIGORÚAN TILOS ad-hoc, egyedi színeket alkalmazni!

  A színplattából kell választani egy rendszer színt. Ha olyan szín nincsen, akkor
  az üsszes színplattába fel kell venni az új színt, ugyanazt a rendszer változót hozzárendelni
  minden szín plaettába és itt már lehet kötni a komponenshez.

  Új témát is fel lehet venni, ekkor az alábbi "import" szekcióban hivatkozni kell az új téma css-ekre.
  A témában levő szín változók nevei kötöttek! (Egy meglévőből  érdemes kiindulni)
  Az új témának lennie kell egy világos és sötét verziójának!

  A téma stílus név konvenció:

    .<szín>-theme-light
    .<szín>-theme-dark

  Az új témát be kell regisztrálni:
  A "styles-framework.xml"-be el kell készíteni az új téma bejegyzését, pl.:

  <style>
    <id>green</id>
    <name>Zöld</name>
    <defaultStyle>false</defaultStyle>
    <path/>
  </style>

  Ezek után az új témát már kezelni fogja a rendszer.
*/

@import "blue_light.css";
@import "blue_dark.css";
@import "brown_light.css";
@import "brown_dark.css";
@import "green_light.css";
@import "green_dark.css";
@import "orange_light.css";
@import "orange_dark.css";

html {
    --lumo-base-color: var(--md-sys-color-background);

    --lumo-primary-color: var(--md-sys-color-primary);
    --lumo-primary-color-50pct: var(--md-sys-color-primary-50pct);
    --lumo-primary-color-10pct: var(--md-sys-color-primary-10pct);
    --lumo-primary-contrast-color: var(--md-sys-color-inverse-primary, var(--md-sys-color-primary-high));
    --lumo-primary-text-color: var(--md-sys-color-primary);

    --lumo-text-color: var(--md-sys-color-on-surface);
    --lumo-body-text-color: var(--md-sys-color-on-background);
    --lumo-disabled-text-color: var(--md-sys-color-surface-tint-10pct);
    --lumo-header-text-color: var(--md-sys-color-inverse-surface);
    --lumo-button-text-color: var(--md-sys-color-primary);
    --lumo-button-background: var(--md-sys-color-primary);

    --lumo-secondary-color: var(--md-sys-color-secondary);
    --lumo-secondary-color-50pct: var(--md-sys-color-secondary-50pct);
    --lumo-secondary-color-10pct: var(--md-sys-color-secondary-10pct);
    --lumo-secondary-contrast-color: var(--md-sys-color-secondary-container);
    --lumo-secondary-text-color: var(--md-sys-color-secondary);

    --lumo-tertiary-color: var(--md-sys-color-tertiary);
    --lumo-tertiary-color-10pct: var(--md-sys-color-tertiary-10pct);
    --lumo-tertiary-color-20pct: var(--md-sys-color-tertiary-20pct);
    --lumo-tertiary-color-30pct: var(--md-sys-color-tertiary-30pct);
    --lumo-tertiary-color-40pct: var(--md-sys-color-tertiary-40pct);
    --lumo-tertiary-color-50pct: var(--md-sys-color-tertiary-50pct);
    --lumo-tertiary-color-60pct: var(--md-sys-color-tertiary-60pct);
    --lumo-tertiary-color-70pct: var(--md-sys-color-tertiary-70pct);
    --lumo-tertiary-color-80pct: var(--md-sys-color-tertiary-80pct);
    --lumo-tertiary-color-90pct: var(--md-sys-color-tertiary-90pct);
    --lumo-tertiary-contrast-color: var(--md-sys-color-tertiary-container);
    --lumo-tertiary-text-color: var(--md-sys-color-tertiary);

    --lumo-error-color: var(--md-sys-color-error);
    --lumo-error-color-50pct: var(--md-sys-color-error-50pct);
    --lumo-error-color-10pct: var(--md-sys-color-error-10pct);
    --lumo-error-contrast-color: var(--md-sys-color-on-error);
    --lumo-error-text-color: var(--md-sys-color-on-error-container);

    --lumo-success-color: var(--md-sys-color-success);
    --lumo-success-color-50pct: var(--md-sys-color-success-50pct);
    --lumo-success-color-10pct: var(--md-sys-color-success-10pct);
    --lumo-success-contrast-color: var(--md-sys-color-on-success);
    --lumo-success-text-color: var(--md-sys-color-on-success-container);

    --lumo-warning-color: var(--md-sys-color-warning);
    --lumo-warning-color-10pct: var(--md-sys-color-warning-10pct);
    --lumo-warning-color-50pct: var(--md-sys-color-warning-50pct);
    --lumo-warning-contrast-color: var(--md-sys-color-warning-container);
    --lumo-warning-text-color: var(--md-sys-color-on-warning-container);

    --lumo-shade: var(--md-sys-color-shadow);
    --lumo-shade-5pct: var(--md-sys-color-shadow-5pct);
    --lumo-shade-10pct: var(--md-sys-color-shadow-10pct);
    --lumo-shade-20pct: var(--md-sys-color-shadow-20pct);
    --lumo-shade-30pct: var(--md-sys-color-shadow-30pct);
    --lumo-shade-40pct: var(--md-sys-color-shadow-40pct);
    --lumo-shade-50pct: var(--md-sys-color-shadow-50pct);
    --lumo-shade-60pct: var(--md-sys-color-shadow-60pct);
    --lumo-shade-70pct: var(--md-sys-color-shadow-70pct);
    --lumo-shade-80pct: var(--md-sys-color-shadow-80pct);
    --lumo-shade-90pct: var(--md-sys-color-shadow-90pct);

    --lumo-tint: var(--md-sys-color-surface-tint);
    --lumo-tint-5pct: var(--md-sys-color-surface-tint-5pct);
    --lumo-tint-10pct: var(--md-sys-color-surface-tint-10pct);
    --lumo-tint-20pct: var(--md-sys-color-surface-tint-20pct);
    --lumo-tint-30pct: var(--md-sys-color-surface-tint-30pct);
    --lumo-tint-40pct: var(--md-sys-color-surface-tint-40pct);
    --lumo-tint-50pct: var(--md-sys-color-surface-tint-50pct);
    --lumo-tint-60pct: var(--md-sys-color-surface-tint-60pct);
    --lumo-tint-70pct: var(--md-sys-color-surface-tint-70pct);
    --lumo-tint-80pct: var(--md-sys-color-surface-tint-80pct);
    --lumo-tint-90pct: var(--md-sys-color-surface-tint-90pct);

    --lumo-contrast: var(--md-sys-color-surface-tint);
    --lumo-contrast-5pct: var(--md-sys-color-surface-tint-5pct);
    --lumo-contrast-10pct: var(--md-sys-color-surface-tint-10pct);
    --lumo-contrast-20pct: var(--md-sys-color-surface-tint-20pct);
    --lumo-contrast-30pct: var(--md-sys-color-surface-tint-30pct);
    --lumo-contrast-40pct: var(--md-sys-color-surface-tint-40pct);
    --lumo-contrast-50pct: var(--md-sys-color-surface-tint-50pct);
    --lumo-contrast-60pct: var(--md-sys-color-surface-tint-60pct);
    --lumo-contrast-70pct: var(--md-sys-color-surface-tint-70pct);
    --lumo-contrast-80pct: var(--md-sys-color-surface-tint-80pct);
    --lumo-contrast-90pct: var(--md-sys-color-surface-tint-90pct);

    --vaadin-grid-cell-background: var(--md-sys-color-surface-container);
    --vaadin-grid-selected-cell-background: linear-gradient(var(--lumo-tint-20pct), var(--lumo-tint-50pct));
    --vaadin-grid-header-cell-background: linear-gradient(var(--md-sys-color-primary-high), var(--md-sys-color-primary-low));

    --button-primary-background: linear-gradient(var(--lumo-tint-50pct), var(--lumo-button-background));
    --button-primary-disabled-background: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-10pct));
    --button-success-background: linear-gradient(var(--lumo-success-color-50pct), var(--md-sys-color-success));
    --button-success-disabled-background: linear-gradient(var(--md-sys-color-success-10pct), var(--lumo-success-color-50pct));
    --button-error-background: linear-gradient(var(--md-sys-color-error-50pct), var(--md-sys-color-error));
    --button-error-disabled-background: linear-gradient(var(--md-sys-color-error-10pct), var(--md-sys-color-error-50pct));
    --context-menu-item-background : linear-gradient(var(--md-sys-color-tertiary-50pct), var(--md-sys-color-tertiary-90pct));
    --context-menu-item-active-background : linear-gradient(var(--md-sys-color-tertiary-60pct), var(--md-sys-color-tertiary));
    --cttabsheet-active-tab-background : linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-30pct));
}

[theme~='dark'] {
    --lumo-base-color: var(--md-sys-color-background);

    --lumo-primary-color: var(--md-sys-color-primary);
    --lumo-primary-color-50pct: var(--md-sys-color-primary-50pct);
    --lumo-primary-color-10pct: var(--md-sys-color-primary-10pct);
    --lumo-primary-contrast-color: var(--md-sys-color-inverse-primary, var(--md-sys-color-primary-high));
    --lumo-primary-text-color: var(--md-sys-color-primary);

    --lumo-text-color: var(--md-sys-color-on-surface);
    --lumo-body-text-color: var(--md-sys-color-on-background);
    --lumo-disabled-text-color: var(--md-sys-color-surface-tint-10pct);
    --lumo-header-text-color: var(--md-sys-color-inverse-surface);
    --lumo-button-text-color: var(--md-sys-color-primary);
    --lumo-button-background: var(--md-sys-color-primary);

    --lumo-secondary-color: var(--md-sys-color-secondary);
    --lumo-secondary-color-50pct: var(--md-sys-color-secondary-50pct);
    --lumo-secondary-color-10pct: var(--md-sys-color-secondary-10pct);
    --lumo-secondary-contrast-color: var(--md-sys-color-secondary-container);
    --lumo-secondary-text-color: var(--md-sys-color-secondary);

    --lumo-tertiary-color: var(--md-sys-color-tertiary);
    --lumo-tertiary-color-10pct: var(--md-sys-color-tertiary-10pct);
    --lumo-tertiary-color-20pct: var(--md-sys-color-tertiary-20pct);
    --lumo-tertiary-color-30pct: var(--md-sys-color-tertiary-30pct);
    --lumo-tertiary-color-40pct: var(--md-sys-color-tertiary-40pct);
    --lumo-tertiary-color-50pct: var(--md-sys-color-tertiary-50pct);
    --lumo-tertiary-color-60pct: var(--md-sys-color-tertiary-60pct);
    --lumo-tertiary-color-70pct: var(--md-sys-color-tertiary-70pct);
    --lumo-tertiary-color-80pct: var(--md-sys-color-tertiary-80pct);
    --lumo-tertiary-color-90pct: var(--md-sys-color-tertiary-90pct);
    --lumo-tertiary-contrast-color: var(--md-sys-color-tertiary-container);
    --lumo-tertiary-text-color: var(--md-sys-color-tertiary);

    --lumo-error-color: var(--md-sys-color-error);
    --lumo-error-color-50pct: var(--md-sys-color-error-50pct);
    --lumo-error-color-10pct: var(--md-sys-color-error-10pct);
    --lumo-error-contrast-color: var(--md-sys-color-on-error);
    --lumo-error-text-color: var(--md-sys-color-on-error-container);

    --lumo-success-color: var(--md-sys-color-success);
    --lumo-success-color-50pct: var(--md-sys-color-success-50pct);
    --lumo-success-color-10pct: var(--md-sys-color-success-10pct);
    --lumo-success-contrast-color: var(--md-sys-color-on-success);
    --lumo-success-text-color: var(--md-sys-color-on-success-container);

    --lumo-warning-color: var(--md-sys-color-warning);
    --lumo-warning-color-10pct: var(--md-sys-color-warning-10pct);
    --lumo-warning-color-50pct: var(--md-sys-color-warning-50pct);
    --lumo-warning-contrast-color: var(--md-sys-color-warning-container);
    --lumo-warning-text-color: var(--md-sys-color-on-warning-container);

    --lumo-shade: var(--md-sys-color-shadow);
    --lumo-shade-5pct: var(--md-sys-color-shadow-5pct);
    --lumo-shade-10pct: var(--md-sys-color-shadow-10pct);
    --lumo-shade-20pct: var(--md-sys-color-shadow-20pct);
    --lumo-shade-30pct: var(--md-sys-color-shadow-30pct);
    --lumo-shade-40pct: var(--md-sys-color-shadow-40pct);
    --lumo-shade-50pct: var(--md-sys-color-shadow-50pct);
    --lumo-shade-60pct: var(--md-sys-color-shadow-60pct);
    --lumo-shade-70pct: var(--md-sys-color-shadow-70pct);
    --lumo-shade-80pct: var(--md-sys-color-shadow-80pct);
    --lumo-shade-90pct: var(--md-sys-color-shadow-90pct);

    --lumo-tint: var(--md-sys-color-surface-tint);
    --lumo-tint-5pct: var(--md-sys-color-surface-tint-5pct);
    --lumo-tint-10pct: var(--md-sys-color-surface-tint-10pct);
    --lumo-tint-20pct: var(--md-sys-color-surface-tint-20pct);
    --lumo-tint-30pct: var(--md-sys-color-surface-tint-30pct);
    --lumo-tint-40pct: var(--md-sys-color-surface-tint-40pct);
    --lumo-tint-50pct: var(--md-sys-color-surface-tint-50pct);
    --lumo-tint-60pct: var(--md-sys-color-surface-tint-60pct);
    --lumo-tint-70pct: var(--md-sys-color-surface-tint-70pct);
    --lumo-tint-80pct: var(--md-sys-color-surface-tint-80pct);
    --lumo-tint-90pct: var(--md-sys-color-surface-tint-90pct);

    --lumo-contrast: var(--md-sys-color-surface-tint);
    --lumo-contrast-5pct: var(--md-sys-color-surface-tint-5pct);
    --lumo-contrast-10pct: var(--md-sys-color-surface-tint-10pct);
    --lumo-contrast-20pct: var(--md-sys-color-surface-tint-20pct);
    --lumo-contrast-30pct: var(--md-sys-color-surface-tint-30pct);
    --lumo-contrast-40pct: var(--md-sys-color-surface-tint-40pct);
    --lumo-contrast-50pct: var(--md-sys-color-surface-tint-50pct);
    --lumo-contrast-60pct: var(--md-sys-color-surface-tint-60pct);
    --lumo-contrast-70pct: var(--md-sys-color-surface-tint-70pct);
    --lumo-contrast-80pct: var(--md-sys-color-surface-tint-80pct);
    --lumo-contrast-90pct: var(--md-sys-color-surface-tint-90pct);

    --vaadin-grid-cell-background: var(--md-sys-color-surface-container);
    --vaadin-grid-selected-cell-background: linear-gradient(var(--lumo-tint-50pct),var(--lumo-tint-20pct));
    --vaadin-grid-header-cell-background: linear-gradient(var(--md-sys-color-primary-low), var(--md-sys-color-primary-high));

    --button-primary-background: linear-gradient(var(--lumo-button-background), var(--lumo-tint-50pct));
    --button-primary-disabled-background: linear-gradient(var(--lumo-tint-10pct), var(--lumo-tint-5pct));
    --button-success-background: linear-gradient(var(--md-sys-color-success), var(--lumo-success-color-50pct));
    --button-success-disabled-background: linear-gradient(var(--lumo-success-color-50pct), var(--md-sys-color-success-10pct));
    --button-error-background: linear-gradient(var(--md-sys-color-error), var(--md-sys-color-error-50pct));
    --button-error-disabled-background: linear-gradient(var(--md-sys-color-error-50pct), var(--md-sys-color-error-10pct));
    --context-menu-item-background : linear-gradient(var(--md-sys-color-tertiary-90pct), var(--md-sys-color-tertiary-50pct));
    --context-menu-item-active-background : linear-gradient(var(--md-sys-color-tertiary), var(--md-sys-color-tertiary-60pct));
    --cttabsheet-active-tab-background : linear-gradient(var(--lumo-tint-30pct), var(--lumo-tint-5pct));

}
/* ---------- Google Material theme színpaletták/témák vége --------- */




/* Alapértelmezett keret minden mezőre */
:where([theme~="custom-input"])::part(input-field) {
    border: 2px solid var(--lumo-contrast-10pct);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Fókusz esetén kiemelt keret */
:where([theme~="custom-input"][focused])::part(input-field) {
    border-color: var(--lumo-primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lumo-primary-color) 25%, transparent);
}




/* --------- CtGrid beállítások  ---------  */
vaadin-grid-sorter {
    width: 100%;
    text-align: center;
}

vaadin-grid::part(odd-row-cell) {
    background: var(--lumo-primary-color-10pct);
}

vaadin-grid::part(selected-row-cell){
    background: var(--vaadin-grid-selected-cell-background);
    color: var(--md-sys-color-on-primary);
}

vaadin-grid::part(header-cell) {
    background: var(--vaadin-grid-header-cell-background);
    color: var(--md-sys-color-on-primary-container);
}

vaadin-grid-sorter[direction] {
    color: var(--md-sys-color-on-primary-low-high);
    font-weight: bold;
}

vaadin-grid::part(row-italic) {
    font-style: italic;
}

vaadin-grid::part(row-bold) {
    font-weight: bold;
}

vaadin-grid::part(row-strike) {
    text-decoration: line-through;
}

vaadin-grid::part(row-disabled) {
    opacity: 0.5;
}

vaadin-grid::part(row-error) {
    color: var(--md-sys-color-on-error-row);
}

vaadin-grid::part(row-warning) {
    color: var(--md-sys-color-on-warning-row);
}

vaadin-grid::part(row-highlight) {
    color: var(--md-sys-color-on-highlight-row);
}


/* --------- CtGrid beéllítások  vége ---------  */





/* --------- CtButton beállítások  ---------  */
vaadin-button:not([theme]) {
    background-image: linear-gradient(var(--md-sys-color-secondary-container-5pct), var(--lumo-shade-5pct));
}

vaadin-button[theme~="primary"] {
    background: var(--button-primary-background);
    color: var(--md-sys-color-on-primary);
    text-shadow:0 -1px 0 var(--lumo-shade-20pct);
}

vaadin-button[theme~="primary"][disabled] {
    background: var(--button-primary-disabled-background);
    color: var(--md-sys-color-secondary-50pct);
}

vaadin-button:not([theme~="tertiary"]) {
    box-shadow:inset 0 0 0 1px var(--lumo-contrast-20pct);
}

vaadin-button[theme~="success"] {
    background: var(--button-success-background);
    color: var(--md-sys-color-on-success);
}

vaadin-button[theme~="success"][disabled] {
    background: var(--button-success-disabled-background);
    color: var(--md-sys-color-outline);
}

vaadin-button[theme~="error"] {
    background: var(--button-error-background);
    color: var(--md-sys-color-on-error);
}

vaadin-button[theme~="error"][disabled] {
    background: var(--button-error-disabled-background);
    color: var(--md-sys-color-outline);
}
/* --------- CtButton beállítások vége  ---------  */




/* --------- CtToggleButton beállítások  ---------  */
/* Engedélyezett UNCHECKED Toggle button */
vaadin-checkbox[theme~="toggle-button"]::part(checkbox) {
    position: relative;
    height: 1.5em;
    align-self: center;
    border-radius: 9999px;  /*0.75em;*/
    width: calc(var(--lumo-size-l) * 1.05);
    background-color: var(--lumo-contrast-30pct);
    transition: all 150ms ease-in-out;
}

/* Engedélyezett, UNCHECKED csúszaka alap értékek */
vaadin-checkbox[theme~="toggle-button"]::part(checkbox)::after {
    content: "";
    height: calc(var(--lumo-size-l) / 2.6);
    width: calc(var(--lumo-size-l) / 2.6);
    margin: calc(var(--lumo-size-l) / 12);
    border-radius: 9999px;
    opacity: 1;
    background-color: var(--md-sys-color-on-primary-container);
}

/* Engedélyezett, CHECKED háttérszin*/
vaadin-checkbox[theme~="toggle-button"][checked]::part(checkbox) {
    background-color: var(--lumo-primary-color);
}

/* Engedélyezett CHECKED csuszka */
vaadin-checkbox[theme~="toggle-button"][checked]:not([indeterminate])::part(checkbox)::after {
    position: absolute;
    top: 0;
    left: calc(100% - (var(--lumo-size-l) / 2.6) - (var(--lumo-size-l) / 6));
    opacity: 1;
    background-color: var(--lumo-primary-contrast-color);
}

/* Engedélyezett UNCHECKED csuszka */
vaadin-checkbox[theme~="toggle-button"]:not([checked]):not([indeterminate])::part(checkbox)::after {
    position: absolute;
    top: 0;
    left: 0.0%;
    opacity: 1;
    background-color: var(--lumo-primary-contrast-color);
}

/* Letiltott, UNCHECKED háttérszin*/
vaadin-checkbox[theme~="toggle-button"][disabled]::part(checkbox){
    background-color: var(--lumo-contrast-10pct);
    pointer-events: none;
    opacity: 0.6;
}

/* Letiltott, UNCHECKED, csuszka háttérszin*/
vaadin-checkbox[theme~="toggle-button"][disabled]::part(checkbox)::after {
    background-color: var(--lumo-contrast-50pct);
    pointer-events: none;
    opacity: 0.6;
}

/* Letiltott, CHECKED háttérszin*/
vaadin-checkbox[theme~="toggle-button"][checked][disabled]::part(checkbox){
    background-color: var(--lumo-primary-color-50pct);
}

/* Letiltott, CHECKED csuszka háttérszin*/
vaadin-checkbox[theme~="toggle-button"][checked][disabled]::part(checkbox)::after {
    background-color: var(--md-sys-color-primary-high);
}

/* Enmgedélyezett INDETERMINATE csuszka középen*/
vaadin-checkbox[theme~="toggle-button"][indeterminate]::part(checkbox)::before {
    display: none; /* elrejti az eredeti csúszkát */
}

/* Enmgedélyezett INDETERMINATE csuszka középen */
vaadin-checkbox[theme~="toggle-button"][indeterminate]::part(checkbox)::after {
    content: "";
    position: absolute;
    top: 0;
    left: 25%;
    height: calc(var(--lumo-size-l) / 2.6);
    width: calc(var(--lumo-size-l) / 2.6);
    margin: calc(var(--lumo-size-l) / 12);
    border-radius: 9999px;
    opacity: 1;
    background-color: var(--md-sys-color-on-primary-container);
    transition: opacity 150ms ease-in-out;
}

/* Enmgedélyezett INDETERMINATE csuszka eltüntetés, ha kikapcsolják */
vaadin-checkbox[theme~="toggle-button"]:not([indeterminate])::part(checkbox)::after {
    opacity: 0;
    pointer-events: none;
}

vaadin-checkbox[theme~="toggle-button"][indeterminate][disabled]::part(checkbox)::after {
    background-color: var(--md-sys-color-primary-low);
}

/* --------- CtToggleButton beállítások vége ---------  */




/* --------- CtPoupMenu beállítások ---------  */

vaadin-context-menu-item {
    gap: var(--lumo-space-xs);
    padding: 0.5em 1em 0.5em 0.2em;
    border-radius: 6px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

vaadin-context-menu-item::part(content) {
    color: var(--lumo-primary-color);
}

vaadin-context-menu-item[focused]{
    background: var(--context-menu-item-background);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--lumo-primary-color);
}

vaadin-context-menu-item[disabled]::part(content) {
    color: var(--lumo-tint-20pct);
}

vaadin-context-menu-item:hover {
    background: var(--context-menu-item-background);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

vaadin-context-menu-item:hover::part(content),
vaadin-context-menu-item[focused]::part(content) {
    color: var(--md-sys-color-on-tertiary);
    background: transparent;
    outline: none;
    box-shadow: none;
}

vaadin-context-menu-item:active {
    background: var(--context-menu-item-active-background);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

vaadin-context-menu-item[theme~="menu-item-bold"]::part(content) {
    font-weight: bold !important;
}

/* --------- CtPoupMenu beállítások vége ---------  */





/* --------- CtMainMenu beállítások ---------  */

vaadin-menu-bar-button::part(label) {
    color: var(--lumo-primary-color);
}

vaadin-menu-bar-button[disabled]::part(label) {
    color: var(--lumo-tint-20pct);
}

vaadin-menu-bar-button:hover::part(label) {
    color: var(--md-sys-color-on-tertiary);
}

vaadin-menu-bar-button[focused]::part(label) {
    color: var(--md-sys-color-on-tertiary);
}

/* Fő gombok a menüsoron */
vaadin-menu-bar-button {
    padding: 0.5em 1em;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

/* Fókusz */
vaadin-menu-bar-button[focused]{
    /*background: var(--context-menu-item-background);*/ /* Vaadin 25.0.7 */
    /* According to the Vaadin team following by my issue ticket, this is the official resolve :
       https://github.com/vaadin/web-components/issues/11438 */
    --vaadin-button-tertiary-background: var(--context-menu-item-background); /* Vaadin 25.1.0 + */
    border-color: var(--lumo-primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Hover */
vaadin-menu-bar-button:hover {
    /*background: var(--context-menu-item-background);*/ /* Vaadin 25.0.7 */
    /* According to the Vaadin team following by my issue ticket, this is the official resolve :
       https://github.com/vaadin/web-components/issues/11438 */
    --vaadin-button-tertiary-background: var(--context-menu-item-background); /* Vaadin 25.1.0 + */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Aktív állapot */
vaadin-menu-bar-button:active {
    background: var(--context-menu-item-active-background);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Kapcsoljuk ki a vaadin-menu-bar-item ACTÍV állapotának belső sötétítését */
vaadin-menu-bar > vaadin-menu-bar-button vaadin-menu-bar-item:active,
vaadin-menu-bar > vaadin-menu-bar-button vaadin-menu-bar-item[active] {
    background: transparent !important;
}


/* Kizárólag Almenü elemek */
vaadin-menu-bar-submenu vaadin-menu-bar-item[role="menuitem"] {
    gap: var(--lumo-space-xs);
    padding: 0.5em 1em 0.5em 0.2em;
    border-radius: 6px;
    rder: 1px solid transparent;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    ox-sizing: border-box;}

/* Szövegszín — kizárólag az almenüben */
vaadin-menu-bar-submenu vaadin-menu-bar-item[role="menuitem"]::part(content){
    color: var(--lumo-primary-color);
}

/* Billentyűzet fókusz — kizárólag az almenüben */
vaadin-menu-bar-submenu vaadin-menu-bar-item[role="menuitem"][focused] {
    background: var(--context-menu-item-background);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: var(--lumo-primary-color);
}

/*  Hover háttér és árnyék — kizárólag az almenüben */
vaadin-menu-bar-submenu vaadin-menu-bar-item[role="menuitem"]:hover {
    background: var(--context-menu-item-background);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Hover v. fókusz szövegszín — kizárólag az almenüben */
vaadin-menu-bar-submenu vaadin-menu-bar-item[role="menuitem"]:hover::part(content),
vaadin-menu-bar-submenu vaadin-menu-bar-item[role="menuitem"][focused]::part(content) {
    color: var(--md-sys-color-on-tertiary);
}

/* Letiltott szövegszín — kizárólag az almenüben */
vaadin-menu-bar-submenu vaadin-menu-bar-item[role="menuitem"][disabled] {
    color: var(--lumo-tint-20pct);
}

/* Menüre kattintás — kizárólag az almenüben */
vaadin-menu-bar-submenu vaadin-menu-bar-item[role="menuitem"]:active {
    background: var(--context-menu-item-active-background);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Banner az overlay hátterén — kizárólag az almenüben */
vaadin-menu-bar-submenu::part(overlay) {
    position: relative;
    background-color: var(--lumo-base-color);
    background-image: linear-gradient(to right, var(--lumo-tint-5pct) 0%, transparent 100%), linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
    background-repeat: no-repeat, no-repeat;
    background-size: 54px 100%, 100% 100%;
}

vaadin-menu-bar-item[theme~="menu-item-bold"]::part(content) {
    font-weight: bold !important;
}

/* --------- CtMainMenu beállítások vége ---------  */





/* -----------  CtTabSheet  egyedi beállítások ------------- */

vaadin-tab{
    padding: 0.1em 0.5em 0.1em 0.8em;
    margin: 0.1em 0.4em 0.4em 0.1em;
}

.cttabsheet-topicon-tab{
    padding: 0.6em 0.5em 0.6em 0.8em;
}

.ct-tabsheet::part(loader) {
    display: none;
}

.cttabsheet-active-tab {
    background: var(--cttabsheet-active-tab-background);
    color: var(--lumo-contrast);
    font-weight: bold;
    box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-s);
    border-radius: 8px;
}

div[id^="tabsheet-panel-"] {
    width: 100% !important;
    height: 100% !important;
    display: flex;
    flex-direction: column;
}

div[id^="tabsheet-panel-"] > * {
    flex: 1 1 auto;
}

/* -----------  CtTabSheet  egyedi beállítások vége ------------- */





/* -----------  CtLookupField beállítások ------------- */

vaadin-combo-box.lookup-field::part(clear-button) {
    order: 1;
}

vaadin-combo-box.lookup-field::part(toggle-button) {
    display: none;
}

.lookup-search-btn {
    cursor: pointer;
    padding: 0;
}

vaadin-combo-box.lookup-field [slot="prefix"] {
    order: 10;
    margin-left: auto;
}

vaadin-combo-box[readonly] .lookup-search-btn,
vaadin-combo-box[disabled] .lookup-search-btn {
    pointer-events: none;
    opacity: 0.3;
}

/* -----------  CtLookupField beállítások vége------------- */



/* ------------  CtBadgedButton beállítások ----------------- */
.ct-badged-button {
    position: relative;
    display: inline-block;
}

.ct-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    transform: translate(0%, 0%);
    z-index: 10;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    animation: badge-pulse 0.4s ease;
}

/* Ha fix kört szeretnél minden esetben (pl. 1-2 számjegy): */
.ct-badge:not(.ct-badge--dot) {
    /* ha 2 számjegy, maradjon „pill”; ha 1 számjegy, kvázi kör */
}

/* Dot mód: fix kis kör */
.ct-badge.ct-badge--dot {
    width: 10px;
    min-width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 50%;
}

@keyframes badge-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}
/* ------------  CtBadgedButton beállítások vége ----------------- */



/* ------------  Vaadin loader és saját loader  */

.v-loading-indicator {
    display: none;
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2147483647;
    opacity: 0;
    will-change: opacity;
    transition: opacity 0.15s ease;
}

.v-status-message {
    display: none !important;
}

.v-loading-indicator.first,
.v-loading-indicator.second,
.v-loading-indicator.third,
body.ct-manual-loading .v-loading-indicator {
    display: block !important;
    opacity: 1 !important;
}

body.ct-manual-loading .v-loading-indicator,
body.ct-auto-loading .v-loading-indicator {
    backdrop-filter: none !important; /*blur(1px);*/ /* kell-e homályosított háttér? */
    pointer-events: auto; /* ez blokkolja a UI-t. Meglátjuk, kell-e? */
}

.v-loading-indicator .ct-loader-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ------------  Vaadin loader és saját loader vége */



/* ------------  CtDialog  ------- */

.ct-dialog-content-expand::part(content) {
    padding: var(--lumo-space-s);
}

/* ------------  CtDialog  vége ------- */
/* ------------  Címke a mező mellett (CtBaseForm, CtFormLayoutLabelPosition.BEFORE_FIELD) ----------------- */
/* A mező FormItem-be kerül, a címkét a FormItem mutatja; a mező saját címkéjét (és kötelező-jelét) elrejtjük. */
.ct-label-aside::part(label) {
    display: none;
}
/* a mező saját (címke fölötti) felső/alsó belső margója nem kell */
.ct-label-aside {
    padding-top: 0;
    padding-bottom: 0;
}
/* sortávolság: V7-szerűen sűrű */
vaadin-form-layout[labels-aside] {
    --vaadin-form-layout-row-spacing: var(--lumo-space-xs);
    --vaadin-form-item-row-spacing: var(--lumo-space-xs);
}
/* címke és mező egy vonalban (élő oldalon mérve):
   - a Lumo a címkés mező elé egy ::before "alapvonal-segédet" tesz margin-top-pal -> a mező magasabb lesz;
   - a FormItem címkéje alapból baseline/center igazítású és margin-top-ot kap -> lejjebb csúszik.
   A címke a mező tetejéhez igazodik, a beviteli mező (size-m + 2x2px keret) közepére tolva. */
.ct-label-aside::before {
    margin-top: 0 !important;
}
vaadin-form-item {
    align-items: flex-start !important;
    --vaadin-form-item-row-spacing: var(--lumo-space-xs);
}
vaadin-form-item::part(label) {
    align-self: flex-start !important;
    margin: 0 !important;
    padding-top: calc((var(--lumo-size-m) + 4px - 1.333 * var(--lumo-font-size-s)) / 2) !important;
    padding-bottom: 0 !important;
    line-height: 1.333 !important;
}
vaadin-form-item > [slot="label"] {
    font-size: var(--lumo-font-size-s);
    color: var(--lumo-secondary-text-color);
}
/* ------------  Címke a mező mellett vége ----------------- */
