@import "./tailwind.css";
@import "./mudblazor.css";
@import "./table.css";
@import "./infinite-scroll.css";
@import "./news-detail.css";

:root {
  --t-primary: 39 38 36;
  /* #272624; */
  --t-primary-light: 74 73 71;
  /* #4A4947 */
  --t-primary-dark: 33 32 30;
  /* #21201e */

  /* FluenUI  */
  --accent-base-color: #272624 !important;

  /* Layout */
  --t-padding-page: 1.25vw;
  --t-padding-paper: 2rem;
  --t-spacing: 1rem;
  --t-letter-spacing: 0.01rem;
  text-underline-position: under;
  --t-header-height: var(--header-height);
  --t-footer-height: 4rem;
}

:deep(.fluent-data-grid) {
  overflow: visible !important;
}

h1:focus {
  outline: none;
}

.invalid {
  outline: 1px solid #e50000;
}

.validation-message {
  color: #e50000;
}

.outline {
  outline: transparent !important;
}

.blazor-error-boundary {
  background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5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3.7rem;
  color: white;
}

.blazor-error-boundary::after {
  content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
  border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Trimco Global Page Layout */
.body-content {
  align-self: stretch;
  height: calc(
    100svh - var(--t-header-height) - var(--t-footer-height)
  ) !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  background-color: #EFEFEC;
}

.t-page-heading {
  width: 100%;
  padding: var(--t-padding-page);
  background-color: var(--neutral-layer-floating);

  & .t-page-heading-actions {
    display: flex;
    justify-content: space-between;
    flex-grow: 1;
    gap: 1rem;
    margin-top: calc(var(--t-padding-page) / 2);

    & *:only-child {
      margin-left: auto;
    }
  }
}

.paginator {
  margin-top: 0 !important;
  padding: 1rem 1.25rem !important;
}

.t-body-stack {
  align-self: stretch;
}

.t-page {
  background-color: white;
  height: 100%;
  width: 100%;
}

.t-page-content {
  padding: var(--t-padding-page);
  position: relative;
  align-self: stretch;
}

.t-full-width {
  width: 100%;
  flex-grow: 1;
}

.t-page-content.t-full-width {
  padding: 0;
}

.t-page-content.t-full-height {
  height: calc(100vh - var(--t-header-height) - 4rem);
}

.t-section-width-medium {
  max-width: 1200px;
  margin: 0 auto;
}

/* Scrollbar */
* {
  &::-webkit-scrollbar {
    background-color: #e0e0dd;
    transition-duration: 300ms;
    width: 5px;
    height: 5px;
    border-radius: 12px;
  }

  &::-webkit-scrollbar-thumb {
    background-color: var(--accent-base-color);
    border-radius: 12px;
  }
}

/* Fluent Grid */
.fluent-grid > div {
  /*
    TODO: This breaks the Brand overview page, but was inplemented for another reason. 🤷‍♂️ @anand
    width: inherit; */
}

.t-grid-item-middle {
  display: flex;
  align-items: center;
}

fluent-design-system-provider {
  background-color: var(--neutral-layer-1);
  min-height: calc(100svh);
  /* - var(--t-footer-height) */
  display: flex;
}

/* TrimcoHeader.razor.css */
header.t-header {
  color: var(--neutral-layer-1);
  z-index: 20 !important;
  margin-bottom: 0 !important;
  position: sticky;
  top: 0;

  & .header-gutters {
    margin: 0 !important;
  }
}

fluent-button.t-header-menu-toggle::part(control) {
  background: transparent;
  color: white;
  padding: 0.5rem 1rem;
}

.t-header-menu-toggle-content {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
}

.t-header-menu-toggle-content .selection {
  font-size: 18px;
  font-weight: 600;
}

fluent-anchored-region .t-header-menu fluent-menu {
  padding: 16px;
  box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);
  max-height: 400px;
}

fluent-anchored-region .t-header-menu fluent-menu fluent-menu-item {
  font-size: 16px;
  margin: 8px;
  line-height: normal;
}

/* TrimcoFooter */
.t-footer {
  position: relative;
  z-index: 999;
  border-top: 1px solid var(--neutral-stroke-rest);
  background-color: var(--neutral-layer-floating);
  display: flex;
  padding-left: var(--t-padding-paper);
  padding-right: var(--t-padding-paper);
  margin-top: auto;
  font-size: 0.875rem;
  line-height: 1.25rem;
  justify-content: space-between;
  align-items: center;
  height: var(--t-footer-height);
}

.t-footer_right {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.t-footer-link {
  color: var(--t-color-text);
}

.t-footer a {
  font-size: 0.875rem;
}

.t-footer span {
  color: var(--t-base-500);
}

/* FluentTab customization */
fluent-tab {
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 0.75rem;
}

.pill-blue {
  background: #A8C6FF33;
  color: #0057FF;
}

.pill-green {
  background: #75F95C33;
  color: #1DB001;
}

.pill-purple {
  background: #E8A6FF33;
  color: #B836E5;
}

.pill-orange {
  background: #FFAC9533;
  color: #F14C09;
}

.pill-red {
  background: #feecec;
  color: #ff211d;
}

/* btn custom styling */
.primary-btn {
  background-color: black;
  color: white;
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  height: auto;
}

.secondary-btn {
  background-color: white;
  color: black;
  border: 1px solid #cccbca;
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  height: auto;
}

.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.edit-btn {
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  height: auto;
}

fluent-button::part(control) {
  --neutral-fill-stealth-hover: transparent;
  --neutral-fill-stealth-rest: transparent;
  --neutral-fill-stealth-active: transparent;
  --disabled-opacity: 1;
}

/* Fluent Checkbox styling change */
fluent-checkbox.header-checkbox::part(control) {
  border: #EBEBEB;
  --neutral-fill-input-alt-rest: white;
  --neutral-fill-input-alt-hover: white;
  --neutral-fill-input-alt-active: white;
}


/* Fluent search styling */
fluent-search, fluent-text-field, fluent-text-area{
    --neutral-stroke-input-rest: var(--neutral-stroke-rest);
    --neutral-stroke-input-hover: var(--neutral-stroke-hover);
}

fluent-search:focus,
fluent-text-field:focus {
    --neutral-stroke-input-rest: var(--accent-base-color);
}

fluent-search::part(root),
fluent-text-field::part(root) {
  height: 2.75rem;
}

.search-box {
  width: 35%;
}

.variant-search-input {
  width: 100%;
}

fluent-option::before {
  background-color: transparent !important;
}

fluent-button::part(control) {
  --neutral-fill-stealth-hover: transparent;
  --neutral-fill-stealth-rest: transparent;
  --neutral-fill-stealth-active: transparent;
}

/* Fluent Checkbox styling change */
fluent-checkbox.header-checkbox::part(control) {
  border: #EBEBEB;
  --neutral-fill-input-alt-rest: white;
  --neutral-fill-input-alt-hover: white;
  --neutral-fill-input-alt-active: white;
  --accent-fill-rest: #272624;
  --accent-fill-hover: #272624;
  --accent-fill-active: #272624;
  --accent-fill-focus: #272624;
}

fluent-checkbox.header-checkbox-with-border::part(control) {
  --neutral-fill-input-alt-rest: white;
  --neutral-fill-input-alt-hover: white;
  --neutral-fill-input-alt-active: white;
  --accent-fill-rest: #272624;
  --accent-fill-hover: #272624;
  --accent-fill-active: #272624;
  --accent-fill-focus: #272624;
}

fluent-radio::part(control) {
  --accent-fill-rest: #272624;
  --accent-fill-hover: #272624;
  --accent-fill-active: #272624;
  --accent-fill-focus: #272624;
}

fluent-text-field.header-filter {
  --input-placeholder-rest: #272624;
  --input-placeholder-hover: #272624;
  --input-filled-placeholder-rest: #272624;
  --input-filled-placeholder-hover: #272624;
}

/* Fluent search styling */
fluent-search{
    --neutral-stroke-input-rest: var(--neutral-stroke-rest);
    --neutral-stroke-input-hover: var(--neutral-stroke-hover);
}
fluent-search:focus,
fluent-text-field:focus {
    --neutral-stroke-input-rest: var(--accent-base-color);
}
fluent-search::part(root) {
  height: 2.75rem;
}

.search-box {
  width: 35%;
}

fluent-option::before {
  background-color: transparent !important;
}

fluent-button::part(control) {
  --neutral-fill-stealth-hover: transparent;
  --neutral-fill-stealth-rest: transparent;
  --neutral-fill-stealth-active: transparent;
}

.transparent-border {
  border: transparent !important;
}

.transparent-border-bottom {
  border-bottom: transparent !important;
}

/* Fluent Checkbox styling change */
fluent-checkbox.header-checkbox::part(control) {
  border: #EBEBEB;
  --neutral-fill-input-alt-rest: white;
  --neutral-fill-input-alt-hover: white;
  --neutral-fill-input-alt-active: white;
}


/* Fluent search styling */
fluent-search{
    --neutral-stroke-input-rest: var(--neutral-stroke-rest);
    --neutral-stroke-input-hover: var(--neutral-stroke-hover);
}
fluent-search:focus,
fluent-text-field:focus {
    --neutral-stroke-input-rest: var(--accent-base-color);
}
fluent-search::part(root) {
  height: 2.75rem;
}

.search-box {
  width: 35%;
}

fluent-option::before {
  background-color: transparent !important;
}

fluent-button::part(control) {
  --neutral-fill-stealth-hover: transparent;
  --neutral-fill-stealth-rest: transparent;
  --neutral-fill-stealth-active: transparent;
}

/* Fluent Checkbox styling change */
fluent-checkbox.header-checkbox::part(control) {
  border: #EBEBEB;
  --neutral-fill-input-alt-rest: white;
  --neutral-fill-input-alt-hover: white;
  --neutral-fill-input-alt-active: white;
}


.transparent-border {
  border: transparent !important;
}

.transparent-border-bottom {
  border-bottom: transparent !important;
}

fluent-button.delivery-address-dropdown::part(control) {
  justify-content: flex-start;
  height: fit-content;
  width: 100%;
  white-space: break-spaces;
}

::deep fluent-radio.checked::part(control) {
  background: black;
  slot[name='checked-indicator'] {
      fill: red;
  }
}

::deep fluent-radio {
  margin-right: 2rem;
}

::slot[name='checked-indicator'] {
  fill: red;
}

fluent-radio::part(checked-indicator) {
  background-color: black !important; /* Changes the dot inside the radio button */
}

.loading-container{
  height: calc(
    100svh - var(--t-header-height) - var(--t-footer-height)
  ) !important;
}

.loading-center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  min-height: calc(100vh - var(--t-header-height) - var(--t-footer-height));
  flex: 1;
}

fluent-menu {
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
}

/* Fluent Dialog Button */
fluent-button.accent::part(control) {
  background: var(--accent-base-color);
  color: white;
}

fluent-radio {
    display: flex;
    width: 100%;
}

fluent-radio::part(label) {
    display: flex;
    width: 100%;
}

fluent-radio::part(control) {
    margin-right: 1rem;
    flex-shrink: 0;
}

fluent-radio-group::part(positioning-region) {
    width: 100%;
}

.text-container p
{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  display: block;
}

fluent-dialog
{
  z-index: 9999 !important;
}

.container-wrapper
{
  background-color: white;
  border: 1px solid #E0E0DD;
  border-radius: 1rem;
  box-shadow: 0 1em 2em rgba(0, 0, 0, 0.05);
  padding: 1rem;
}

.container-shadow
{
  box-shadow: 0 1em 2em rgba(0, 0, 0, 0.05);
}

/* For ShowCustomErrorAsync() */
.fluent-dialog-main::part(positioning-region) {
  background: rgba(0, 0, 0, 0.3);
}