/* Font Face Declarations for Adelle */
@font-face {
  font-family: 'Adelle';
  src: url('../font/Adelle/Adelle_Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Font Face Declarations for Adelle Sans */
@font-face {
  font-family: 'Adelle Sans';
  src: url('../font/AdelleSans_Set/AdelleSans-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Adelle Sans';
  src: url('../font/AdelleSans_Set/AdelleSans-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Adelle Sans';
  src: url('../font/AdelleSans_Set/AdelleSans-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Adelle Sans';
  src: url('../font/AdelleSans_Set/AdelleSans-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Adelle Sans';
  src: url('../font/AdelleSans_Set/AdelleSans-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Adelle regular';
  src: url('../font/Adelle/Adelle_Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Adelle';
  src: url('../font/Adelle/Adelle_Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Adelle';
  src: url('../font/Adelle/Adelle_Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Adelle';
  src: url('../font/Adelle/Adelle_Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Adelle';
  src: url('../font/Adelle/Adelle_Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Accent colors */
  --accent-base-color: #024999 !important;
  --accent-fill-rest: #024999 !important;
  --accent-fill-hover: #024999 !important;
  --accent-fill-active: #024999 !important;
  --accent-stroke-control-active: #024999 !important;
  --accent-foreground-rest: #ffffff !important;
  /* Neutral/Theme colors */
  --neutral-foreground-rest: #3e3e3d;
  --neutral-foreground-hover: #2b2b2a;
  --neutral-foreground-hint: #6b7280;
  --neutral-layer-floating: #ffffff;
  --neutral-layer-2: #f5f5f5;
  --neutral-layer-3: #e5e7eb;
  --neutral-layer-card-hover: #f9fafb;
  --neutral-layer-card-pressed: #eeeeee;
  --neutral-stroke-rest: #d0d0d0;
  --neutral-stroke-hover: #b0b0b0;
  /* Error states */
  --error-foreground-rest: #dc2626;
  --error-layer-1: #fef2f2;
  /* Warning states */
  --warning-foreground-rest: #f59e0b;
  --warning-layer-1: #fffbeb;
}

fluent-tabs::part(activeIndicator) {
  width: 90% !important;
}

p {
  font-family: 'Adelle Sans';
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
}

h1:focus {
  outline: none;
}

h1,
h2,
h3,
h4 {
  font-family: 'Adelle';
  font-weight: 600;
}

a,
.btn-link {
  color: #0071c1;
}

.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
  padding-top: 1.1rem;
}

/* .valid.modified:not([type=checkbox]) {
  outline: 1px solid #26b050;
} */

/* Invalid styling is now handled by validation.css using FluentUI design tokens */

#blazor-error-ui {
  color-scheme: light only;
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

  #blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
  }

.blazor-error-boundary {
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Y5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
  padding: 1rem 1rem 1rem 3.7rem;
  color: white;
}

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

.loading-progress {
  position: relative;
  display: block;
  width: 8rem;
  height: 8rem;
  margin: 20vh auto 1rem auto;
}

  .loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
  }

    .loading-progress circle:last-child {
      stroke: #1b6ec2;
      stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
      transition: stroke-dasharray 0.05s ease-in-out;
    }

.loading-progress-text {
  position: absolute;
  text-align: center;
  font-weight: bold;
  inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

  .loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
  }

code {
  color: #c02d76;
}

.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;
}

/* Global override for shadow DOM styling */
fluent-text-field::part(control) {
  font-family: 'Adelle Sans' !important;
}

fluent-text-area::part(control) {
  font-family: 'Adelle Sans' !important;
}

fluent-button::part(control) {
  font-family: 'Adelle Sans' !important;
}

fluent-button::part(control) {
  font-family: 'Adelle Sans' !important;
}

fluent-button::part(control) {
  font-family: 'Adelle Sans' !important;
}

fluent-card label {
  font-family: 'Adelle Sans' !important;
}

fluent-card {
  font-family: 'Adelle Sans' !important;
}

fluent-.fluent-input-label {
  font-family: 'Adelle Sans' !important;
}

.label label {
  font-family: 'Adelle Sans' !important;
}

label {
  font-family: 'Adelle Sans' !important;
}

div {
  font-family: 'Adelle Sans' !important;
}

td {
  font-family: 'Adelle Sans' !important;
}

/* Style the placeholder text (not all browsers support ::part for pseudo-elements) */
fluent-text-field::part(control)::placeholder {
  font-family: 'Adelle Sans';
}

fluent-text-area::part(control)::placeholder {
  font-family: 'Adelle Sans';
}

fluent-number-field::part(control) {
  text-align: right;
}

fluent-anchored-region div {
  border-radius: 8px;
}

.fluent-profile-menu {
  font-family: 'Adelle Sans' !important;
}

span {
  font-family: 'Adelle Sans';
}

slot {
  font-family: 'Adelle Sans';
}

.text-field-container div,
.text-field-container .people-listbox {
  font-family: 'Adelle Sans' !important;
}

/* #region FluentUI Component Styles */

/* Wide dropdown styling for FluentSelect components */
.wide-dropdown fluent-listbox {
  min-width: 300px !important;
}

.wide-dropdown::part(listbox) {
  min-width: 300px !important;
}

.no-margin {
  margin: 0 !important;
}

.center-text {
  text-align: center;
}

.right-text {
  text-align: right;
}

.text-box {
  min-height: 165px;
}

/* #endregion */

/* divs  */
.icon {
  height: 80px;
}

.margin-bottom {
  margin-bottom: 2rem;
}

.margin-top {
  margin-top: 2rem;
}

.margin {
  margin: 2rem 0;
}

.header-img {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  /* margin-left: 5rem; */
  width: 100%;
}

.scrollable {
  overflow-x: auto;
}

.home-header {
  width: 50%;
  margin: 2rem 0 0 0;
  height: 350px;
}

.divider {
  margin-top: 1rem;
  margin-bottom: 1rem;
  width: 100%;
  border-bottom: 1px solid #ccc;
}

.bc-white {
  max-width: 1100px;
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.12), 0 calc(4 * 0.5px) calc((4 * 1px)) rgba(0, 0, 0, 0.14);
}

.bc-pink {
  max-width: 1100px;
  background-color: #FEF5F9;
  border-radius: 8px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.12), 0 calc(4 * 0.5px) calc((4 * 1px)) rgba(0, 0, 0, 0.14);
}

.footer {
  background-color: #E6ECF4;
  /* margin-top: 3rem; */
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

  .footer div {
    width: 100%;
    max-width: 1600px;
  }


.center-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.st-container {
  display: flex;
  justify-content: start;
  align-items: stretch;
  flex-direction: column;
}

.flex-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
  margin-bottom: 2rem;
}

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

.flex-row-start {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.flex-row-st {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 1rem;
}

.img-container img {
  height: 85px;
}

.img-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-margin {
  margin-left: 3rem;
  margin-right: 3rem;
}

.invoice-page {
  max-width: 1100px;
}

.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.lightBlue {
  background-color: #E6ECF4;
  max-width: none !important;
  width: 100vw;
  display: flex;
  justify-content: center;
}

.width-wrapper {
  width: 100vw;
  max-width: 1600px;
}

.page-height {
  min-height: 65vh;
}

.footer-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.active-mandate {
  border: 1px solid #26b050;
  padding: 5px 10px;
  border-radius: 4px;
  height: fit-content;
  color: #FFFFFF;
  background-color: #26b050;
  box-shadow: 0 2px 8px rgba(38, 176, 80, 0.5);
}

.disabled-subscription {
  border: 1px solid #024999;
  padding: 5px 10px;
  border-radius: 4px;
  height: fit-content;
  color: #FFFFFF;
  background-color: #024999;
  box-shadow: 0 2px 8px rgba(38, 132, 176, 0.5);
}

/* text fields */

.home-title {
  font-size: 75px;
  color: #fff;
  margin-bottom: 1rem;
  margin-top: 0;
  line-height: 1;
}

.home-description {
  font-size: 22px;
  color: #fff;
  margin-top: 0;
  margin-bottom: 2rem;
}

.flex-c {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

.user-info-text {
  font-size: 18px;
  padding: 5px 0;
  margin-top: 0;
}

.subscription-info-text {
  font-size: 22px;
  padding: 5px 0;
  margin-bottom: 0;
}

.mandate-info-text {
  font-size: 18px;
  padding: 5px 0;
}

.text {
  min-height: 170px;
}

/* colors */

.selectedBreadcrumb {
  color: #024999;
  font-weight: bold;
}

.click {
  cursor: pointer;
}

/* User section styles */
.user-section {
  gap: 10px;
  margin-left: 20px;
}

.user-info {
  color: white;
  font-size: 14px;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 4px;
  max-width: 300px;
  word-wrap: break-word;
}

.user-lookup {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.ssn-input {
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  width: 120px;
}

.lookup-btn {
  padding: 5px 10px;
  background-color: #024999;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.3s;
}

  .lookup-btn:hover {
    background-color: #155074;
  }

.img-Home {
  height: 350px;
}

@media (max-width: 768px) {
  .user-section {
    margin-left: 10px;
  }

  .ssn-input {
    width: 100px;
  }

  .img-Home {
    display: none;
  }

  .width-img {
    display: none;
  }

  .home-header {
    width: 100%;
    margin: 1rem 0;
    height: 240px;
  }

  .home-title {
    font-size: 40px;
  }

  .home-description {
    font-size: 22px;
  }

  .page-margin {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .hide-on-small-screen {
    display: none !important;
  }
}

@media (max-width: 959px) {

  .text-box {
    min-height: 0px;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .mob-center {
    text-align: center;
    width: 100%;
  }

  .img-container img {
    height: 100px;
  }
}

.hide-on-small-screen {
  display: revert;
}

.hide-on-medium-screen {
  display: revert;
}

@media (max-width: 768px) {
  .hide-on-small-screen {
    display: none !important;
  }

  .hide-on-medium-screen {
    display: none !important;
  }
}

@media (max-width: 990px) {
  .hide-on-medium-screen {
    display: none !important;
  }
}

/* Delete button column - fixed width, sized for icon button */
.column-delete-btn {
  flex: 1 1 40px;
  max-width: 40px;
  min-width: 40px;
  width: 100%;
  align-items: center;  
}

/* Product number column - flexible */
.column-vorunumer {  
  flex: 1 1 auto;
  min-width: 80px;
  max-width: 150px;
  width: 100%;
}

/* Description column - flexible, larger */
.column-heiti {
  flex: 2 1 auto;
  min-width: 140px;
  max-width: 300px;
  width: 100%;
}

/* Quantity column - fixed width */
.column-magn {
  flex: 0 0 80px;
  max-width: 80px;
  min-width: 50px;
  width: 100%;  
  text-align: right;  
}

/* Unit of measure column - fixed width */
.column-eining {
  flex: 1 1 auto;
  min-width: 90px;
  max-width: 140px;
  width: 100%;
}


/* Unit price column - flexible */
.column-einingverd {
  flex: 1 1 auto;
  min-width: 80px;
  width: 100%;
  text-align: right;
}

/* Discount column - flexible */
.column-afslattur {
  flex: 1 1 100px;
  min-width: 80px;
  max-width: 120px;
  width: 100%;
  text-align: right;
}

/* Tax code column - fixed width, wider */
.column-vsk {
  flex: 1 1 auto;
  min-width: 110px;
  max-width: 180px;
  width: 100%;
}

/* Amount column - fixed width */
.column-upphaed {
  flex: 1 1 120px;
  max-width: 180px;
  min-width: 110px;
  width: 100%;
  text-align: right;  
}
.line-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-fill-rest);
  color: white;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

/* Right-align text in number fields */
.text-right-align::part(control) {
  text-align: right !important;
}

/* Ensure the input element inside FluentTextField is right-aligned */
fluent-text-field.text-right-align::part(control) {
  text-align: right !important;
}

/* Additional specificity for read-only fields */
fluent-text-field[readonly].text-right-align::part(control) {
  text-align: right !important;
}
