/* Workhour ÄTA UI v1.0.0 – gemensam styling, utan inline CSS. */
[data-view="ata"] .page-heading .js-open-ata,
    [data-view="ata"] .ata-detail-actions .js-ata-detail-edit,
    #ataDialog .dialog-actions > button,
    #ataApprovalRecipientDialog .dialog-actions > button {
      border-radius: 999px !important;
      min-height: 40px;
      padding: 8px 15px;
      font-family: inherit;
      font-size: 14px;
      font-weight: 450;
      line-height: 1.25;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    }
    [data-view="ata"] .page-heading .js-open-ata:hover,
    [data-view="ata"] .ata-detail-actions .js-ata-detail-edit:hover,
    #ataDialog .dialog-actions > button:hover,
    #ataApprovalRecipientDialog .dialog-actions > button:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(31,41,55,.10);
    }
    [data-view="ata"] .page-heading .js-open-ata:focus-visible,
    [data-view="ata"] .ata-detail-actions .js-ata-detail-edit:focus-visible,
    #ataDialog .dialog-actions > button:focus-visible,
    #ataApprovalRecipientDialog .dialog-actions > button:focus-visible {
      outline: 3px solid rgba(190,91,74,.35);
      outline-offset: 2px;
    }
    @media (prefers-reduced-motion: reduce) {
      [data-view="ata"] .page-heading .js-open-ata,
      [data-view="ata"] .ata-detail-actions .js-ata-detail-edit,
      #ataDialog .dialog-actions > button,
      #ataApprovalRecipientDialog .dialog-actions > button { transition: none; }
      [data-view="ata"] .page-heading .js-open-ata:hover,
      [data-view="ata"] .ata-detail-actions .js-ata-detail-edit:hover,
      #ataDialog .dialog-actions > button:hover,
      #ataApprovalRecipientDialog .dialog-actions > button:hover { transform: none; }
    }

/* Prisval: samma mått och typografi som övriga fält.
   Använd webbläsarens tillgängliga select-funktion med egen pil. */
#ataDialog .js-ata-price-model.wh-ata-select {
  display: block;
  width: 100%;
  min-width: 0;
  height: 46px;
  min-height: 46px;
  padding: 0 40px 0 14px;
  border: 1px solid var(--line, #d9e0e6);
  border-radius: 14px;
  background-color: var(--card, #fff);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  color: var(--foreground, #202936);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
#ataDialog .js-ata-price-model.wh-ata-select:focus-visible {
  outline: 2px solid var(--primary, #bf5b4a);
  outline-offset: 2px;
}


/* Workhour gemensam informationsikon, samma tunna kontur som i Admin.
   Klass används av både Admin och ÄTA och kan flyttas till workhour.css. */
.field-info {
  width: 17px; height: 17px; min-width: 17px; min-height: 17px;
  display: inline-grid; place-items: center; margin-left: 4px; padding: 0;
  border: 1px solid #8bb8e7; border-radius: 50%; background: #fff;
  color: #216fbd; font-family: inherit; font-size: 10px;
  font-weight: 500; line-height: 1; vertical-align: 1px; cursor: pointer;
  opacity: .72; transition: opacity .16s ease, background-color .16s ease;
}
.field-info:hover, .field-info:focus-visible { opacity: 1; background: #eef6ff; }

/* v1.2.0 – ÄTA-prismodell: fyll fältets kolumn och håll samma mått som övriga kontroller. */
#ataDialog .form-grid > .field-group:has(.js-ata-price-model) { min-width: 0; width: 100%; }
#ataDialog .js-ata-price-model.wh-ata-select { box-sizing: border-box; width: 100% !important; max-width: 100%; min-width: 0; border-radius: 14px !important; box-shadow: none; }
#ataDialog .js-ata-price-model.wh-ata-select:focus { outline: 2px solid rgba(190,91,74,.25); outline-offset: 0; }
/* Godkännandestatus visas som information och kan inte klickas. */
#ataDialog .js-ata-approved:disabled { opacity: .75; cursor: default; pointer-events: none; }
#ataDialog .js-ata-approved:disabled > span { opacity: .65; }
