html, body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif !important;
}

.drag_and_drop_area {
    width: 100%;
    height: 150px;
    border: 1px solid #9EA3A8;
}

.help-block-error {
    color: red;
    font-size: 15px;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 80%;
    color: #dc3545;
}

.disabled {
    pointer-events: none;
}
.disabled input{
    background-color: lightgray;
}
.disabled select{
    background-color: lightgray;
}
.disabled textarea{
    background-color: lightgray;
}
.disabled checkbox{
    background-color: lightgray;
}

.col-custom{
    max-width: 14%;
}

.toast{
    min-width: 350px;
}

.bigger-hint {
    font-size: 14px;
}

/* tooltip innen */
.tooltip-inner {
    max-width: 400px;
}
.tooltip-inner-html {
    text-align: left;
}
.tooltip-inner-html ul>li,
.tooltip-inner-html ol>li {
    font-size: 12px;
}
.tooltip-inner-html p {
    margin-bottom: 12px;
    font-size: 14px;
}

.select2-selection__choice__remove {
    color:red!important;
}

/* vili része */
.authorityids-select, .cadastre_id-select, .notificationchannelids-select {
    height: 38px !important;
}
.authorityids-select .select2-selection__choice,
.cadastre_id-select .select2-selection__choice,
.notificationchannelids-select .select2-selection__choice,
.userids-select .select2-selection__choice {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.max-height-select {
    height:31px!important;
}

.image-preview-container {
    position: relative;
    display: inline-block;
}

.delete-image-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    border: none;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    padding: 0;
}

.document-group-form.d-flex {
    flex-wrap: wrap;
    min-width: 0;
}
.menu-item-article .nav-icon::before { content: '' !important; }
.menu-item-article .nav-icon {
  width: 3rem;
  height: 3rem;
  background: url('/icons/article.svg') no-repeat center center;
  background-size: 30px 30px; /* bigger icon, same container */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.menu-item-archive .nav-icon::before { content: '' !important; }
.menu-item-archive .nav-icon {
  width: 3rem;
  height: 3rem;
  background: url('/icons/archive.svg') no-repeat center center;
  background-size: 30px 30px; /* bigger icon, same container */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.menu-item-settings .nav-icon::before { content: '' !important; }
.menu-item-settings .nav-icon {
  width: 3rem;
  height: 3rem;
  background: url('/icons/settings.svg') no-repeat center center;
  background-size: 30px 30px; /* bigger icon, same container */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.menu-item-users .nav-icon::before { content: '' !important; }
.menu-item-users .nav-icon {
  width: 3rem;
  height: 3rem;
  background: url('/icons/users.svg') no-repeat center center;
  background-size: 30px 30px; /* bigger icon, same container */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.menu-item-logout .nav-icon::before { content: '' !important; }
.menu-item-logout .nav-icon {
  width: 3rem;
  height: 3rem;
  background: url('/icons/logout.svg') no-repeat center center;
  background-size: 30px 30px; /* bigger icon, same container */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.even-row {
    background-color: #f9f9f9 !important;
}

.odd-row {
    background-color: #fff !important;
}

.main-sidebar {
    position: fixed!important;
}

.main-sidebar .sidebar {
  display: flex;
  flex-direction: column;
  min-height: 100vh; 
}
.main-sidebar .sidebar .sidebar-footer {
  margin-top: auto; 
  position: fixed;
  bottom: 10px;
  width: 100%; 
  align-self: center;
}

.nav-sidebar > li.menu-item-article > a.nav-link > .nav-icon {
  transform: translateY(2px);
}

.nav-sidebar .nav-link {
  display: flex;
  align-items: center;
  min-height: 48px; /* unify vertical size across all items */
}
.nav-sidebar .nav-link .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  line-height: 1;
  margin-left: 12px !important;
}
.nav-sidebar .nav-link p {
  margin: 0;
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .nav-sidebar .nav-link {
    display: flex;
    align-items: center;
    min-height: 44px; 
  }
  .nav-sidebar .nav-link .nav-icon {
    align-self: center; 
  }
  .nav-sidebar .nav-link p {
    display: flex;
    align-items: center;
    margin: 0; 
    line-height: 1.2;
  }
}

/* Show default sort icons on all sortable table headers */
th a:not(.asc):not(.desc)::after {
  content: "shuffle" !important;
  font-family: 'Material Symbols Outlined';
  font-size: 0.9em;
  color: #007bff;
  vertical-align: middle;
}

/* Active sort icons override the default */
a.asc::after {
    content: " ▲"!important;
    font-size: 1em;
    color: #007bff;
    vertical-align: middle;
}

a.desc::after {
    content: " ▼"!important;
    font-size: 1em;
    color: #007bff;
    vertical-align: middle;
}

.table .overriden-table-striped {
    td.text-right {
        min-width: 300px;
        max-width: 300px;
        width: 300px !important;
    }
}

.overriden-table-striped tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}
.overriden-table-striped tbody tr:nth-child(even) {
  background-color: #fff;
}

/* Vertically center text in config page tables */
.config-page .table td,
.config-page .table th,
.user-index .table td,
.user-index .table th,
.document-group-index .table td,
.document-group-index .table th {
    vertical-align: middle !important;
}

.table {
  margin-bottom: 0 !important;
}

/* // Login form */
#login-form {
    padding: 0px 24px;
}

/* Button */
.btn {
    font-size: 14px;
}

.btn-xl {
  padding: 0.6rem 1.2rem;
  font-size: 1.2rem;
  line-height: 1.5;
  border-radius: 0.3rem;
}

/* Grid */
tbody {
    .btn-primary, .btn-danger {
        width: 40px;
        height: 100%;
        margin-bottom: 6px;
    }
}

.pagination {
    justify-content: center;
}

/* Card */
.card-body {
    overflow-y: auto;
}

/* Document grid */
#documentgroup-form, #view-page-container {
    .modal-wrapper {
        align-items: center;

        .header-wrapper {
        display: flex;
        align-items: center;
        }
    }
}

.view-button {
    margin-bottom: 6px;
}

#document-group-grid td.text-right {
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  white-space: nowrap;
  vertical-align: middle;
}
#document-group-grid td.text-right .btn {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  margin-bottom: 0;
  padding: 0;
  box-sizing: border-box;
  vertical-align: middle;
}
#document-group-grid td.text-right .btn:last-child {
  margin-right: 0;
}
#document-group-grid td.text-right .btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
#document-group-grid td.text-right .btn i {
  width: 18px;
  height: 18px;
  font-size: 18px;
  line-height: 18px;
  display: inline-block;
}
#document-group-grid td.text-right .archive-btn {
  transform: none;
}
@media (min-width: 992px) {
  #document-group-grid td.text-right .archive-btn {
    transform: translateY(3px);
  }
}

#document-group-grid .detail-row {
    height: 35px !important;
}

#document-group-grid tbody tr:not(.detail-row) > td {
  padding-left: 0 !important;
}

#document-group-grid tbody tr:not(.detail-row) > td:first-child {
  padding-left: 25px !important;
}


#document-group-grid tbody tr.detail-row > td:first-child {
  padding-left: 32px !important;
}

#view-page-container table th:first-child,
#view-page-container table td:first-child {
  width: 250px !important;
  min-width: 250px !important;
  max-width: 250px !important;
}
#document-group-grid tbody tr:not(.detail-row) > td {
  font-weight: 500 !important;
}

/* Mobile-only DetailView 50/50 columns */
@media (max-width: 767.98px) {
  /* Make DetailView table columns 50/50 */
  .detail-view th,
  .detail-view td {
    width: 50% !important;
    max-width: 50% !important;
  }

  /* Override the 250px width rule for DetailView tables */
  #view-page-container .detail-view th:first-child,
  #view-page-container .detail-view td:first-child {
    width: 50% !important;
    min-width: 50% !important;
    max-width: 50% !important;
  }
  
  /* Fix horizontal scrolling in create/update forms on mobile */
  .document-group-create .card-body,
  .document-group-update .card-body {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
  
  .document-group-create .form-control,
  .document-group-update .form-control,
  .document-group-create .note-editor,
  .document-group-update .note-editor {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .document-group-create .note-toolbar,
  .document-group-update .note-toolbar {
    max-width: 100% !important;
    overflow-x: auto !important;
  }
  
  /* Mobile sidebar button text padding */
  .nav-sidebar .nav-link p {
    padding-top: 2px !important;
    padding-left: 4px !important;
  }
  
  /* Remove ml-3 margin from Új munkalap button on mobile */
  .content-header .btn.ml-3 {
    margin-left: 0 !important;
  }
}

.user-index table thead th:nth-child(3),
.user-index table tbody td:nth-child(3) {
  width: 160px !important;
  min-width: 160px !important;
  max-width: 160px !important;
  white-space: nowrap;
}
.user-index table thead th:nth-child(4),
.user-index table tbody td:nth-child(4) {
  width: 160px !important;
  min-width: 160px !important;
  max-width: 160px !important;
  white-space: nowrap;
}
.user-index table thead th:nth-child(5),
.user-index table tbody td:nth-child(5) {
  width: 160px !important;
  min-width: 160px !important;
  max-width: 160px !important;
  white-space: nowrap;
}

.select2-div select {
    display:none;
}

.select2-div .select2-container {
  width: 100% !important;
  display: block;
}
.select2-div .select2-container .select2-selection {
  width: 100% !important;
  box-sizing: border-box;
}

.address-select + .select2-container {
  width: 100% !important;
  display: block;
}
.address-select + .select2-container .select2-selection {
  width: 100% !important;
  box-sizing: border-box;
}

@media (max-width: 991.98px) {
   .content-header .breadcrumb,
   .breadcrumb {
     display: none !important;
   }
   .content-header h1 {
    display: none !important;
  }
  .content-header .col-sm-6.d-flex + .col-sm-6 .d-flex.align-items-center.mr-5 {
    display: none !important;
  }
  .page-title-mobile {
    display: block;
    max-width: 70vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    text-align: center;
  }

  .sidebar-user-mobile {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #fff;
  }
  .sidebar-dark-primary .sidebar-user-mobile { color: #fff; }
  .sidebar-user-mobile .material-symbols-outlined {
    font-size: 22px;
    line-height: 1;
  }
  .sidebar-user-mobile .sidebar-user-name {
    font-size: 14px;
    font-weight: 500;
  }
}

.config-page td.text-right .btn {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  margin-bottom: 0;
  padding: 0;
  box-sizing: border-box;
  vertical-align: middle;
}
.config-page td.text-right .btn:last-child {
  margin-right: 0;
}
.config-page td.text-right .btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.config-page td.text-right .btn i {
  width: 18px;
  height: 18px;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
}

.config-page td.text-right {
  text-align: center !important;
}

.user-index td.text-center .btn {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  margin-right: 8px;
  border-radius: 4px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  vertical-align: middle;
  transform: translateY(2px);
}
.user-index td.text-center .btn:last-child {
  margin-right: 0;
}
.user-index td.text-center .btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.user-index td.text-center .btn i {
  width: 18px;
  height: 18px;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
}

.user-index td.text-center {
  text-align: center !important;
  vertical-align: middle !important;
}

/* Make first two search fields match Select2 height in document-group search */
.document-group-search .form-control-sm,
.document-group-search .form-control {
  height: 38px !important;
  min-height: 38px !important;
}

/* Fix container padding asymmetry - match right padding to left padding */
.document-group-index .panel-body,
.user-index .panel-body {
  padding-right: 0.5rem !important;
}

/* Add top border to parent rows except the first one */
.document-group-index .table tbody tr:not(.detail-row):not(:first-child) {
  border-top: 1px solid #000;
}
.document-group-index .table td {
  border-top: 0;
}

#dataChangeModalLabel {
  font-weight: 500 !important;
}

/* Fix textarea horizontal scrolling in create/update forms */
.document-group-create .form-control,
.document-group-update .form-control,
.document-group-create .note-editor,
.document-group-update .note-editor {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

.document-group-create .note-editable,
.document-group-update .note-editable {
  max-width: 100% !important;
  overflow-x: auto !important;
  word-wrap: break-word !important;
}

/* Make search fields full width on mobile */
@media (max-width: 767.98px) {
  .document-group-search .form-group {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  
  /* Move export button to align with right edge of search fields */
  .document-group-search .form-group.ml-auto {
    position: absolute;
    top: -60px;
    right: 0px;
    margin: 0 !important;
  }
  
  .document-group-search .form-group.ml-auto .btn {
    font-size: 14px;
    padding: 0.375rem 0.75rem;
  }
  
  /* Align Új munkalap button with left edge of search fields */
  .document-group-index a[href*="create"].btn.btn-dark.ml-3 {
    margin-left: -16px !important;
    transform: translateX(-8px) !important;
  }
}

@media (min-width: 768px) {
  .config-page .panel-body .form-inline.pl-0 > .form-group:first-child {
    flex: 0 0 25% !important;   
    max-width: 25% !important;
  }
  .config-page .authority-search > form.form-inline.pl-0,
  .config-page .notification-channel-search > form.form-inline.pl-0 {
    display: flex;
    flex-wrap: nowrap;       
    align-items: flex-end;
  }
   
  .config-page .authority-search > form.form-inline.pl-0 > .col-11.form-inline.pl-0,
  .config-page .notification-channel-search > form.form-inline.pl-0 > .col-11.form-inline.pl-0,
  .config-page .notification-channel-search > form.form-inline.pl-0 > .col-10.form-inline.pl-0 {
    flex: 1 1 auto;
      min-width: 0;            
    }
   
  .config-page .authority-search .form-group.mb-2.mr-2,
  .config-page .notification-channel-search .form-group.mb-2.mr-2 {
    margin-right: .4rem !important; 
    }
   
  .config-page .authority-search > form.form-inline.pl-0 > .col-12.col-lg-auto,
    .config-page .notification-channel-search > form.form-inline.pl-0 > .col-12.col-lg-auto {
      flex: 0 0 auto;
      width: auto !important;
      max-width: none !important;
      white-space: nowrap;    
      margin-left: auto;       
    }
   
    .config-page .notification-channel-search > form.form-inline.pl-0 > .col-11.form-inline.pl-0,
    .config-page .notification-channel-search > form.form-inline.pl-0 > .col-10.form-inline.pl-0 {
      max-width: calc(100% - 130px); 
    }
}

@media (min-width: 992px) {
  .document-group-search .field-documentgroupsearch-address {
    flex: 0 0 calc(25% + 25% + 0.25rem) !important;
    max-width: calc(25% + 25% + 0.25rem) !important;
  }
}

.case-block .card-header .case-title-text::before {
  content: "Tárgy: ";
  font-weight: 500;
  margin-right: .25rem;
}

.case-block .card-header .case-title-text {
  font-weight: 500;
}

/* Make case header elements smaller on mobile to fit in container */
@media (max-width: 991.98px) {
  .case-block .header-wrapper .case-title-text {
    font-size: 0.9rem !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  .case-block .header-wrapper .form-group {
    min-width: 140px !important;
  }
  
  .case-block .header-wrapper .form-group label {
    font-size: 0.85rem !important;
    margin-right: 0.5rem !important;
  }
  
  .case-block .header-wrapper .form-group select {
    font-size: 0.8rem !important;
    padding: 0.25rem 0.5rem !important;
    height: auto !important;
  }
}

@media (max-width: 992.98px) {
  /* Use a 2-column grid: left = collapse button, right = title + status stacked */
  .case-block .card-header .header-wrapper {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    grid-auto-rows: auto !important;
    column-gap: 8px !important;
    row-gap: 6px !important;
    align-items: start !important;
  }
  .case-block .card-header .card-tools {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important; /* occupy left side vertically */
    margin-left: 0 !important;
    align-self: center !important;   /* center vertically within its grid area */
    display: flex !important;        /* ensure the button is centered within the tools area */
    align-items: center !important;
  }
  .case-block .card-header .case-title-text {
    grid-column: 2 !important;
    grid-row: 1 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
  }
  .case-block .card-header .form-group {
    grid-column: 2 !important;
    grid-row: 2 !important;
    margin: 0 !important;
    min-width: 0 !important; /* allow shrinking */
  }
}

/* Ensure form labels are not bolder than 500 on create/update forms */
.document-group-create .form-group label,
.document-group-update .form-group label,
.document-group-create .control-label,
.document-group-update .control-label,
.document-group-create .col-form-label,
.document-group-update .col-form-label,.table th,
.table thead th,
.content-wrapper table th,
.detail-view th {
  font-weight: 500 !important;
}

