.user-page-with-menu{
  margin-top: 25px;
}

.user-page-without-menu{
  margin-top: 60px;
}

.user-page-block-img{
  box-shadow: 0 0 0 1px #DBDBDB !important;
  border-radius: 50% !important;
  display: inline-block !important;
  overflow: hidden !important;
  vertical-align: middle !important;
  position: relative!important;
  float: left;
  margin-right: 15px;
  margin-bottom: 15px;
  width: 200px !important;
  height: 200px !important;
}

.user-page-img{
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.user-page-block-img .user-page-text-on-img{
  position: absolute;
  top: 45%;
  left: 10%;
  background-color: #ffffff;
  padding: 5px;
  display: none;
}

.user-page-block-img:hover .user-page-text-on-img{
  display: block;
}

.user-page-text-empty-img{
  position: absolute;
  top: 45%;
  left: 9%;
}

.user-page-text-on-img svg,
.user-page-text-empty-img svg{
  fill: #337ab7;
  margin-top: -7px;
}

/* Agent catalogue (templates/agents/): cards in the style of the agent profile, two columns from 992px. */
.agent-page {
  --ag-text: #1f2328;
  --ag-muted: #5f6672;
  --ag-border: #eef0f3;
  --ag-pill-border: #e3e6ea;
  --ag-accent: #2f63c4;
  --ag-shadow: 0 6px 24px rgba(16, 24, 40, .06);
  --ag-shadow-hover: 0 10px 32px rgba(16, 24, 40, .12);
  /* The global main navigation is absolutely positioned and 50px high. */
  padding-top: 60px;
  color: var(--ag-text);
}

/* base.css gives every svg a grey fill and a 24px size; the outline icons here use their own attributes. */
.agent-page svg[fill="none"] {
  width: auto;
  height: auto;
  fill: none;
}

.agent-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 28px;
}

.agent-list-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.agent-list-count {
  margin: 6px 0 0;
  color: var(--ag-muted);
  font-size: 15px;
}

/* Filters (list.html.twig): small pills, each opening a panel of option pills. */
.agent-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-pill {
  position: relative;
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: var(--ag-text);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
}

.agent-pill:hover,
.agent-pill[aria-expanded="true"],
.agent-pill.is-active {
  border-color: #222;
}

.agent-pill.is-active {
  font-weight: 500;
}

.agent-pill[aria-expanded="true"] .agent-pill-chevron {
  transform: rotate(180deg);
}

/* The panel opens under the bar, not the pill: from its right edge on desktop, from its left edge on a phone,
   where the bar takes the full width. */
.agent-filter {
  position: relative;
}

.agent-filter .dropdown {
  position: static;
}

.agent-filter-panel {
  top: 100%;
  right: 0;
  left: auto;
  width: min(440px, calc(100vw - 32px));
  margin-top: 8px !important;
  padding: 18px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
}

.agent-filter-panel.show {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-option {
  min-height: 34px;
  margin: 0;
  padding: 0 14px;
  color: var(--ag-text);
  text-decoration: none;
  border: 1px solid #ddd;
  border-radius: 999px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.agent-option:hover,
.agent-option.is-selected {
  color: var(--ag-text);
  text-decoration: none;
  border-color: #222;
}

.agent-option.is-selected {
  box-shadow: inset 0 0 0 1px #222;
}

.agent-option:focus-visible {
  outline: 2px solid var(--ag-accent);
  outline-offset: 2px;
}

/* Search by name or phone (as on the agent profile): a round button that opens into a field */
.agent-search {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
}

.agent-search-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--ag-text);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.agent-search-btn:hover {
  border-color: #222;
}

.agent-search-input,
.agent-search-close {
  display: none;
}

.agent-filter.is-searching .agent-search {
  flex: 1 1 220px; /* the open search fills the rest of the row (or wraps to its own row) */
  min-width: 220px;
}

.agent-filter.is-searching .agent-search-btn {
  position: absolute;
  left: 0;
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.agent-filter.is-searching .agent-search-input {
  display: block;
  width: 100%;
  height: 32px;
  padding: 0 32px;
  color: var(--ag-text);
  border: 1px solid #222;
  border-radius: 999px;
  font-size: 13px;
  outline: none;
}

.agent-search-input::-webkit-search-cancel-button {
  display: none;
}

.agent-filter.is-searching .agent-search-close {
  position: absolute;
  right: 3px;
  width: 26px;
  height: 26px;
  padding: 0;
  color: var(--ag-text);
  background: transparent;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.agent-filter.is-searching .agent-search-close:hover {
  background: #f2f2f2;
}

.agent-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

@media (min-width: 992px) {
  .agent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The whole card is the link to the profile. */
.agent-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  color: var(--ag-text);
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: 22px;
  box-shadow: var(--ag-shadow);
  text-decoration: none;
  transition: box-shadow .15s ease, transform .15s ease;
}

.agent-card:hover,
.agent-card:focus-visible {
  color: var(--ag-text);
  text-decoration: none;
  box-shadow: var(--ag-shadow-hover);
  transform: translateY(-2px);
}

.agent-card:hover .agent-card-name,
.agent-card:focus-visible .agent-card-name {
  color: var(--ag-accent);
}

.agent-card-head {
  display: flex;
  align-items: center;
  gap: 24px;
}

.agent-card-photo {
  position: relative;
  flex: none;
}

.agent-card-avatar {
  width: 172px;
  height: 172px;
  border: 5px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d4f9c;
  background: #e9f0fb;
  box-shadow: 0 4px 16px rgba(16, 24, 40, .14);
  font-size: 48px;
  font-weight: 600;
}

.agent-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* "Топ" / "Віп" on the top left corner of the card */
.agent-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  color: #b4510f;
  background: #fff3e8;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .1);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.agent-card-badge--vip {
  color: #1d4f9c;
  background: #e9f0fb;
}

.agent-card-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agent-card-name {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
  transition: color .15s ease;
}

.agent-card-job {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.agent-card-company {
  color: var(--ag-muted);
  font-size: 15px;
}

/* experience and years on the site, under the company, right of the photo */
.agent-card-chips {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agent-card-chip {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--ag-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

/* the icon stays on the first line when the text wraps */
.agent-card-chip svg {
  flex: none;
  margin-top: 3px;
}

.agent-card-chip--orange svg { color: #b4501e; }
.agent-card-chip--teal svg { color: #0f6e72; }
.agent-card-chip--green svg { color: #1d9e75; }

.agent-pagination .pagination {
  flex-wrap: wrap;
  gap: 5px;
}

.agent-pagination .list__pagination-custom .page-link {
  margin-right: 0;
  color: var(--ag-accent);
  background-color: #fff;
}

.agent-pagination .list__pagination-custom .page-link:hover,
.agent-pagination .list__pagination-custom .page-link:focus {
  color: #174a96;
  background-color: #f3f5f8;
}

.agent-pagination .list__pagination-custom .active .page-link {
  color: var(--ag-muted);
  background-color: #fff;
  border-color: #c9d8f2 !important;
}

.agent-pagination .pagination-ellipsis {
  width: 28px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#application_userbundle_userimagetype_file{
  height: 33.6px;
}

@media (max-width: 768px) {
  .add-menu-agent-list.add-menu-obj-detail .nav.navbar-nav li{
    width: 22%;
  }

  .user-page-with-menu{
    margin-top: 75px;
  }
}

@media (max-width: 767.98px) {
  .agent-filter-panel {
    right: auto;
    left: 0;
  }
}

@media (max-width: 575.98px) {
  .agent-page {
    padding-top: 65px;
  }

  .agent-list-head {
    align-items: center;
    margin-bottom: 20px;
  }

  .agent-list-title {
    font-size: 21px;
  }

  .agent-grid {
    gap: 14px;
  }

  .agent-card {
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
  }

  .agent-card-head {
    gap: 14px;
  }

  .agent-card-avatar {
    width: 128px;
    height: 128px;
    border-width: 4px;
    font-size: 36px;
  }

  .agent-card-name {
    font-size: 19px;
  }

  .agent-card-job,
  .agent-card-company {
    font-size: 14px;
  }
}
