.month-picker-trigger {
  min-height: 44px;
  background-color: var(--bs-body-bg);
}

.month-picker-trigger:hover,
.month-picker-trigger[aria-expanded="true"] {
  border-color: var(--bs-primary);
}

.month-picker-menu {
  width: min(310px, calc(100vw - 3rem));
}

.month-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.month-picker-month {
  min-height: 38px;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.month-picker-month:not(:disabled):hover {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.month-picker-month.active {
  background: var(--bs-primary);
  color: var(--bs-white);
}

.month-picker-month:disabled {
  color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg);
  opacity: 0.55;
}
body {
  min-height: 100vh;
}

.savings-suggestions-scroll {
  max-height: 720px;
  overflow: auto;
}

.savings-new-form {
  width: min(1040px, 100%);
  margin-inline: auto;
}

.savings-searchable-select .dropdown-menu {
  max-height: 320px;
  overflow: hidden;
}

.savings-searchable-options {
  max-height: 245px;
  overflow-y: auto;
}

.savings-suggestions-table {
  min-width: 980px;
  table-layout: fixed;
}

.savings-suggestions-table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.75rem 1rem;
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bs-tertiary-bg);
}

.savings-suggestions-table > thead > tr > th:nth-child(1) { width: 31%; }
.savings-suggestions-table > thead > tr > th:nth-child(2) { width: 14%; }
.savings-suggestions-table > thead > tr > th:nth-child(3) { width: 10%; }
.savings-suggestions-table > thead > tr > th:nth-child(4) { width: 22%; }
.savings-suggestions-table > thead > tr > th:nth-child(5) { width: 10%; }
.savings-suggestions-table > thead > tr > th:nth-child(6) { width: 13%; }

.savings-suggestions-table > tbody > tr:first-child > td {
  padding: 0.7rem 1rem;
}

.savings-grid-filter {
  border: 1px solid transparent;
  cursor: pointer;
}

.savings-grid-filter.active {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.savings-grid-filter:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.savings-suggestion-title {
  min-width: 0;
}

.savings-detail-panel {
  background: var(--bs-tertiary-bg);
}

.savings-selection-details summary {
  color: var(--bs-primary);
  cursor: pointer;
  font-weight: 600;
}

.savings-selection-details ul {
  max-height: 180px;
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.75rem 0.5rem 1.75rem;
  overflow-y: auto;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
}

.savings-selection-details li {
  margin-bottom: 0.25rem;
  overflow-wrap: anywhere;
}

.savings-detail-toggle .bi-chevron-down {
  display: inline-block;
  transition: transform 160ms ease;
}

.savings-detail-toggle[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

.advisor-recommendations-scroll {
  max-height: 720px;
  overflow: auto;
}

.advisor-recommendations-table {
  min-width: 1100px;
  table-layout: fixed;
}

.advisor-recommendations-table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.75rem 1rem;
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bs-tertiary-bg);
}

.advisor-recommendations-table > thead > tr > th:nth-child(1) { width: 34%; }
.advisor-recommendations-table > thead > tr > th:nth-child(2) { width: 10%; }
.advisor-recommendations-table > thead > tr > th:nth-child(3) { width: 14%; }
.advisor-recommendations-table > thead > tr > th:nth-child(4) { width: 16%; }
.advisor-recommendations-table > thead > tr > th:nth-child(5) { width: 14%; }
.advisor-recommendations-table > thead > tr > th:nth-child(6) { width: 12%; }

.advisor-recommendation-group > tr:first-child > td {
  padding: 0.8rem 1rem;
}

.advisor-impact {
  display: inline-block;
  min-width: 5.5rem;
  padding: 0.35rem 0.5rem;
  border-left: 4px solid var(--bs-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
}

.advisor-impact--danger { border-left-color: var(--bs-danger); }
.advisor-impact--warning { border-left-color: var(--bs-warning); }
.advisor-impact--info { border-left-color: var(--bs-info); }

.advisor-detail-toggle .bi-chevron-down {
  display: inline-block;
  transition: transform 160ms ease;
}

.advisor-detail-toggle[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

.advisor-resource-table {
  min-width: 980px;
}

.advisor-import-preview-scroll {
  max-height: 340px;
}

.trend-chart {
  width: 100%;
  height: auto;
  background: linear-gradient(180deg, rgba(13, 110, 253, 0.08), rgba(13, 110, 253, 0));
  border-radius: 1rem;
}

.area-chart {
  width: 100%;
  height: auto;
  border-radius: 1rem;
}

.area-chart--green {
  background: linear-gradient(180deg, rgba(25, 135, 84, 0.06), rgba(25, 135, 84, 0));
}

.chart-tooltip {
  position: absolute;
  background: #1e293b;
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  pointer-events: none;
  z-index: 1050;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: none;
}

.chart-tooltip-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
}

.chart-tooltip-value {
  font-weight: 600;
}

.chart-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.chart-tooltip-key {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
}

.chart-tooltip-val {
  font-weight: 600;
}

.cost-progress {
  height: 0.85rem;
  border-radius: 999px;
}

.cost-progress .progress-bar {
  border-radius: 999px;
}

/* Cost Management: keep the add-filter actions inside the viewport even when
   Azure returns long resource, product, or meter names. */
.acm-add-filter-panel {
  width: 560px;
  max-width: calc(100vw - 1rem);
}

.acm-add-filter-body {
  min-height: 280px;
  min-width: 0;
  overflow: hidden;
}

.acm-add-filter-fields {
  flex: 0 0 215px;
  min-width: 0;
}

.acm-add-filter-values {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.acm-add-filter-value-list {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 290px;
  overflow-x: hidden;
  overflow-y: auto;
}

.acm-add-filter-value-list .af-value-item {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.acm-add-filter-value-list .af-value-item.af-value-item--hidden {
  display: none !important;
}

.acm-add-filter-value-list .af-value-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acm-add-filter-footer,
.acm-add-filter-actions {
  flex-shrink: 0;
}

.ov2-date-picker .min-w-0 {
  min-width: 0;
}

.ov2-date-menu {
  min-width: 360px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.ov2-date-menu-heading {
  color: #555;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ov2-date-range-label {
  font-size: 0.75rem;
  white-space: nowrap;
}

.ov2-date-menu .btn-link:disabled {
  color: var(--bs-secondary-color);
  text-decoration: none;
}

.fp-date-tree {
  max-height: 300px;
  overflow-y: auto;
}

.fp-date-tree summary {
  cursor: pointer;
  list-style-position: outside;
  user-select: none;
}

.fp-date-tree summary:hover {
  background: var(--bs-tertiary-bg);
}

.fp-tree-chevron {
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}

.fp-date-tree details[open] > summary > .fp-tree-chevron {
  transform: rotate(90deg);
}

.fp-date-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(32px, 1fr));
  gap: 0.25rem;
}

.fp-date-day-label {
  align-items: center;
  border-radius: var(--bs-border-radius-sm);
  cursor: pointer;
  display: flex;
  font-size: 0.75rem;
  gap: 0.25rem;
  padding: 0.2rem;
}

.fp-date-day-label:hover {
  background: var(--bs-tertiary-bg);
}

/* Cost Management smart view: Resources */
.smart-resources-search {
  width: min(320px, 100%);
}

.smart-resources-scroll {
  max-height: 650px;
  overflow: auto;
}

.smart-resources-table {
  width: 100%;
  min-width: 1240px;
  table-layout: fixed;
  font-size: 0.8rem;
}

.smart-resource-col-name { width: 250px; }
.smart-resource-col-type { width: 155px; }
.smart-resource-col-group { width: 205px; }
.smart-resource-col-location { width: 115px; }
.smart-resource-col-subscription { width: 235px; }
.smart-resource-col-tags { width: 170px; }
.smart-resource-col-total { width: 110px; }

.smart-resources-table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0.65rem 0.55rem;
  color: #495057;
  background: #fff;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.smart-resizable-column {
  padding-right: 0.9rem !important;
}

.smart-column-resizer {
  position: absolute;
  top: 0;
  right: -0.2rem;
  bottom: 0;
  width: 0.65rem;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}

.smart-column-resizer::after {
  position: absolute;
  top: 20%;
  right: 0.28rem;
  bottom: 20%;
  width: 1px;
  content: '';
  background: transparent;
}

.smart-column-resizer:hover::after,
.smart-column-resizer:focus-visible::after,
.smart-column-resizer.is-resizing::after {
  width: 2px;
  background: #0d6efd;
}

.smart-column-resizing {
  cursor: col-resize !important;
  user-select: none;
}

.smart-resources-table > tbody > tr.smart-resource-row > td {
  max-width: 260px;
  padding: 0.42rem 0.55rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-resources-table > thead > tr > th:last-child {
  right: 0;
  z-index: 5;
  background: #fff;
  box-shadow: -5px 0 7px -7px rgba(0, 0, 0, 0.65);
}

.smart-resources-table > tbody > tr.smart-resource-row > td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -5px 0 7px -7px rgba(0, 0, 0, 0.65);
}

.smart-resource-name-cell {
  min-width: 285px;
}

.smart-resource-name-content {
  display: flex;
  min-width: 0;
  align-items: center;
}

.smart-resource-name-content > .smart-resource-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-resource-name-content > .smart-resource-toggle,
.smart-resource-name-content > .smart-resource-icon,
.smart-resource-name-content > .azure-portal-link {
  flex: 0 0 auto;
}

.local-tag-resource-name-details {
  min-width: 0;
  overflow: hidden;
  flex: 1 1 auto;
}

.local-tag-resources-table > tbody > tr.smart-resource-row > td {
  min-width: 0;
}

.smart-resource-tag.local-tag-missing-required {
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f1aeb5;
}

.local-tag-required-tags {
  max-width: none;
  flex-wrap: wrap;
  white-space: normal;
}

.local-tag-resource-tags-expanded {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  white-space: normal;
}

.local-tag-resource-tags-expanded .smart-resource-tag {
  max-width: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.smart-resource-toggle {
  display: inline-flex;
  width: 1.4rem;
  height: 1.4rem;
  margin-right: 0.15rem;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: #0878d1;
  text-decoration: none;
  vertical-align: middle;
}

.smart-resource-toggle-symbol {
  display: inline-flex;
  width: 0.85rem;
  height: 0.85rem;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.smart-resource-icon {
  margin-right: 0.35rem;
  color: #249be8;
}

.smart-resource-name {
  color: #0878d1;
}

.smart-resource-tags {
  display: flex;
  width: 100%;
  max-width: 155px;
  gap: 0.22rem;
  overflow: hidden;
  white-space: nowrap;
}

.smart-resource-tag {
  display: inline-block;
  max-width: 170px;
  padding: 0.08rem 0.3rem;
  overflow: hidden;
  color: #24435a;
  background: #d8ecfa;
  border-radius: 0.12rem;
  text-overflow: ellipsis;
}

.smart-resource-detail-row > td {
  padding: 0.7rem 1.75rem !important;
  background: #fafbfc;
}

.smart-resource-inner-table {
  min-width: 1000px;
  font-size: 0.78rem;
  border: 1px solid #dfe4e8;
}

.smart-resource-inner-table thead th {
  padding: 0.5rem;
  color: #495057;
  background: #f4f5f6;
  white-space: nowrap;
}

.smart-resource-inner-table tbody td {
  padding: 0.42rem 0.5rem;
}

.smart-resource-selected-chip {
  color: #17384d;
  background: #e5f2fa;
}

.smart-resource-services-table {
  width: 100%;
  min-width: 1050px;
  table-layout: fixed;
  font-size: 0.82rem;
}

.smart-resource-services-table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0.65rem 0.55rem;
  color: #343a40;
  background: #fff;
  white-space: nowrap;
}

.smart-resource-services-table > thead > tr > th:first-child { width: 28%; }
.smart-resource-services-table > thead > tr > th:nth-child(2) { width: 25%; }
.smart-resource-services-table > thead > tr > th:nth-child(3) { width: 20%; }
.smart-resource-services-table > thead > tr > th:nth-child(4) { width: 19%; }
.smart-resource-services-table > thead > tr > th:last-child { width: 8%; }

.smart-resource-services-table > tbody > tr.smart-resource-service-row > td {
  padding: 0.46rem 0.55rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-resource-services-table > thead > tr > th:last-child,
.smart-resource-services-table > tbody > tr.smart-resource-service-row > td:last-child {
  position: sticky;
  right: 0;
  z-index: 4;
  background: #fff;
  box-shadow: -5px 0 7px -7px rgba(0, 0, 0, 0.65);
}

.smart-resource-service-detail-table {
  min-width: 900px;
}

.smart-resource-final-table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  font-size: 0.82rem;
}

.smart-resource-final-table > thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0.65rem 0.55rem;
  color: #343a40;
  background: #fff;
  white-space: nowrap;
}

.smart-resource-final-table > thead > tr > th:last-child {
  width: 120px;
}

.smart-resource-final-table > tbody > tr.smart-resource-level-row > td {
  padding: 0.46rem 0.55rem;
}

.smart-resource-final-table > thead > tr > th:last-child,
.smart-resource-final-table > tbody > tr.smart-resource-level-row > td:last-child {
  position: sticky;
  right: 0;
  z-index: 4;
  background: #fff;
  box-shadow: -5px 0 7px -7px rgba(0, 0, 0, 0.65);
}

.smart-resource-final-detail-table {
  min-width: 980px;
}

.local-tags-heading-copy {
  position: relative;
  padding-left: 1.5rem;
}

.local-tags-heading-copy > .bi {
  position: absolute;
  top: 0.45rem;
  left: 0;
}

.local-tags-aligned-copy {
  position: relative;
  padding-left: 1.5rem;
}

.local-tags-aligned-copy > .bi:first-child {
  position: absolute;
  top: 50%;
  left: 0.5rem;
  transform: translateY(-50%);
}

@media (min-width: 992px) {
  .local-tag-remove-panel {
    position: relative;
  }

  .local-tag-remove-panel::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    border-left: 1px solid var(--bs-border-color);
  }

  .local-tag-remove-panel::after {
    content: "O";
    position: absolute;
    top: 50%;
    left: 0;
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 1px solid var(--bs-border-color);
    border-radius: 50%;
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    font-size: 0.7rem;
    font-weight: 700;
  }
}

.local-tag-mobile-separator {
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  color: var(--bs-secondary-color);
  font-size: 0.7rem;
  font-weight: 700;
}

.local-tag-mobile-separator::before,
.local-tag-mobile-separator::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--bs-border-color);
}

.local-tag-mobile-separator span {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid var(--bs-border-color);
  border-radius: 50%;
  background: var(--bs-body-bg);
}

@media (max-width: 575.98px) {
  .acm-add-filter-fields {
    flex-basis: 40%;
  }

  .acm-add-filter-footer {
    flex-wrap: wrap;
  }

  .acm-add-filter-actions {
    margin-left: auto;
  }

  .ov2-date-menu {
    min-width: min(360px, calc(100vw - 2rem));
  }
}
