/* ===========================
   Logo resize
   =========================== */
.navbar-brand img,
.powerapps-portal-header .logo img {
  transform: scale(1.25);
  transform-origin: left center;
}

/* ===========================
   Modern List (Fluent) link colours
   =========================== */
:root,
.powerappsportals-dataverse-grid {
  --colorBrandForegroundLink: #056e8f;
  --colorBrandForegroundLinkHover: #048cb5;
  --colorBrandForegroundLinkPressed: #048cb5;
  --colorNeutralForeground2Link: #056e8f;
  --colorNeutralForeground2LinkHover: #048cb5;
  --colorNeutralForeground2LinkVisited: #056e8f;
  --fontWeightSemibold: 700;
}

/* =========================================
   Page wrapper: remove faint page chrome
   ========================================= */
.wrapper-body .page-copy,
.wrapper-body .page-copy > *,
.wrapper-body .page-copy::before,
.wrapper-body .page-copy::after {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* If a 9/3 layout leaves an empty sidebar, hide it and expand content */
#mainContent .row > [class*="col-3"]:empty { display: none !important; }
#mainContent .row > .col-md-9:last-child,
#mainContent .row > .col-lg-9:last-child,
#mainContent .row > .col-9:last-child {
  flex: 0 0 100% !important;
  max-width: 100% !important;
}

/* =========================================
   Basic form — compact, no chrome
   ========================================= */
.xrm-entityform, .entity-form, .basic-form {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans";
  font-size: 14px;
  line-height: 1.35;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Strip borders/backgrounds on form wrappers */
.basic-form > div, .entity-form > div, .xrm-entityform > div,
.entity-form .form-horizontal, .entity-form .panel, .basic-form .panel,
.entity-form .card, .basic-form .card,
.entity-form fieldset, .xrm-entityform fieldset,
.entity-form .tab, .entity-form .section {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.entity-form .panel-heading, .entity-form .card-header { display: none !important; }
.entity-form .panel-body, .entity-form .card-body { padding: 0 !important; }
.entity-form hr, .xrm-entityform hr { display: none !important; }

/* =========================================
   HIDE ONLY THE TAB TITLE + TAB BORDER
   (keep Section labels visible)
   ========================================= */
.entity-form form > fieldset:first-of-type,
.xrm-entityform form > fieldset:first-of-type {
  border: 0 !important;
  margin: 0 !important;
  padding-top: 0 !important;
}
.entity-form form > fieldset:first-of-type > legend,
.xrm-entityform form > fieldset:first-of-type > legend {
  display: none !important;
}
.entity-form .tab > h1,
.entity-form .tab > h2,
.entity-form .tab > h3,
.entity-form .tab .tab-title,
.entity-form .tab .tabHeader,
.xrm-entityform .tab > h1,
.xrm-entityform .tab > h2,
.xrm-entityform .tab > h3,
.xrm-entityform .tab .tab-title,
.xrm-entityform .tab .tabHeader {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* Ensure SECTION titles stay ON */
.xrm-entityform .section > h1,
.xrm-entityform .section > h2,
.xrm-entityform .section > h3,
.xrm-entityform .section .section-title,
.entity-form .section > h1,
.entity-form .section > h2,
.entity-form .section > h3,
.entity-form .section .section-title {
  display: block !important;
  font-weight: 700;
  margin: 10px 0 6px !important;
}

/* =========================================
   Spacing tighten (less white space)
   ========================================= */
.entity-form .row { margin-left: -8px !important; margin-right: -8px !important; }
.entity-form [class*="col-"] { padding-left: 8px !important; padding-right: 8px !important; }
.xrm-entityform .form-group,
.entity-form .form-group { margin-bottom: 6px !important; }
.xrm-entityform .tab,
.entity-form .tab { margin: 0 !important; padding: 0 !important; }
.xrm-entityform .section,
.entity-form .section { padding: 0 !important; margin-bottom: 8px !important; }
.xrm-entityform .form-actions,
.entity-form .form-actions { margin-top: 8px !important; }

/* =========================================
   Read-only = plain text (no input chrome)
   ========================================= */
.xrm-entityform input[readonly],
.xrm-entityform input[disabled],
.xrm-entityform textarea[readonly],
.xrm-entityform textarea[disabled],
.xrm-entityform select[disabled],
.entity-form input[readonly],
.entity-form input[disabled],
.entity-form textarea[readonly],
.entity-form textarea[disabled],
.entity-form select[disabled],
.entity-form .form-control[readonly],
.entity-form .form-control:disabled {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  height: auto !important;
  -webkit-text-fill-color: inherit;
  color: inherit;
  pointer-events: none;
}
/* hide required asterisk when read-only */
.entity-form .required .text-danger { display: none !important; }
/* Multiline read-only spacing */
.xrm-entityform textarea,
.entity-form textarea { min-height: 70px; height: auto; line-height: 1.35; }

/* =========================================
   Editable controls (when you *do* allow edit)
   ========================================= */
.xrm-entityform input[type="text"],
.xrm-entityform input[type="email"],
.xrm-entityform input[type="number"],
.xrm-entityform input[type="tel"],
.xrm-entityform input[type="date"],
.xrm-entityform input[type="datetime-local"],
.xrm-entityform select,
.xrm-entityform textarea,
.entity-form input[type="text"],
.entity-form input[type="email"],
.entity-form input[type="number"],
.entity-form input[type="tel"],
.entity-form input[type="date"],
.entity-form input[type="datetime-local"],
.entity-form select,
.entity-form textarea {
  font-size: 14px;
  padding: 4px 8px;
  height: 32px;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  box-shadow: none !important;
  background: #fff;
}

/* Lookups (Select2) */
.select2-container .select2-selection--single {
  height: 32px !important;
  border: 1px solid #d0d7de !important;
  border-radius: 4px !important;
  font-size: 14px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 30px !important;
  padding-left: 8px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 30px !important;
}

/* Focus ring (only on editable controls) */
.xrm-entityform input:not([readonly]):focus,
.entity-form input:not([readonly]):focus,
.xrm-entityform select:not([disabled]):focus,
.entity-form select:not([disabled]):focus,
.xrm-entityform textarea:not([readonly]):focus,
.entity-form textarea:not([readonly]):focus {
  border-color: #056e8f !important;
  box-shadow: 0 0 0 2px rgba(5,110,143,.15) !important;
  outline: none !important;
}

/* Buttons */
.entity-form .btn,
.xrm-entityform .btn { border-radius: 4px; font-size: 14px; padding: 6px 10px; }
.entity-form .btn-primary,
.xrm-entityform .btn-primary { background-color: #056e8f; border-color: #056e8f; }

/* =========================================
   HIDE COPILOT / AGENT CHAT ICONS (GLOBAL)
   ========================================= */
div[data-id="agent-chat-button"],
.ms-agent-chat-button,
button[title="Chat with an agent"],
button[data-id="agentChatButton"] {
  display: none !important;
}

/* =========================================
   FOOTER (two-column desktop → stacked mobile)
   ========================================= */
.sh-footer {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 65px 16px 24px;  /* increased space above the footer content */
  color: #6B6B6B; /* default text colour */
}
.sh-footer-inner {
  max-width: 1280px;        /* match header/main container width */
  margin: 0 auto;
  display: flex;
  gap: 24px;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;
}
.sh-footer-left,
.sh-footer-right {
  flex: 1 1 320px;
}

/* Left column */
.sh-footer-title {
  font-family: "Oswald", Arial, sans-serif;
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 16px; /* space between the title and the links */
  text-transform: uppercase;
  color: #6B6B6B;
}
.sh-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: "Public Sans", "Open Sans", sans-serif;
  font-size: 16px;
  color: #6B6B6B;
}
.sh-footer-links li { margin: 8px 0; } /* space between each link */
.sh-footer-links a {
  text-decoration: none;
  color: #6B6B6B;
}
.sh-footer-links a:hover {
  text-decoration: underline;
  color: #6B6B6B;
}

/* Right column */
.sh-footer-right {
  font-family: "Public Sans", "Open Sans", sans-serif;
  font-size: 14px;
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #6B6B6B;
}
.sh-footer-address {
  margin: 0 0 6px;
  line-height: 1.5;
  font-size: 14px !important;
  color: #6B6B6B !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .sh-footer { padding-top: 44px; }  /* proportionally increased on mobile */
  .sh-footer-inner { justify-content: center; }
  .sh-footer-left, .sh-footer-right { text-align: center; }
}

/* =========================================
   Footer links: force normal weight & colour in all states
   ========================================= */
.sh-footer-links,
.sh-footer-links li,
.sh-footer-links a {
  font-family: "Public Sans", "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 400 !important; /* un-bold */
}
.sh-footer-links a:link,
.sh-footer-links a:visited,
.sh-footer-links a:hover,
.sh-footer-links a:active,
.sh-footer-links a:focus {
  font-weight: 400 !important;
  color: #6B6B6B;
}
.sh-footer-links strong,
.sh-footer-links b { font-weight: 400 !important; }

/* Keep email/phone from breaking awkwardly */
.sh-footer-address { white-space: normal; }
.sh-footer-address a { white-space: nowrap; }

/* =========================================
   EXTRA: stronger kill-switch for Copilot/Agent chat launchers
   (covers more variants across environments)
   ========================================= */
[data-id="agent-chat-button"],
[data-id="agentChatButton"],
#agent-chat-button,
#ms-agent-chat-button,
.ms-agent-chat-button,
.ms-agent-chat,
button[title="Chat with an agent"],
button[aria-label="Chat with an agent"],
button[aria-label="Chat"],
a[aria-label="Chat with an agent"],
div[id*="agentChat"],
div[class*="agent-chat"],
div[id*="Copilot"],
div[class*="copilot"],
#copilot-fab,
#msCopilotButton,
#assistantLauncher,
#aiBuilderChat,
#va-crisp-launcher,
iframe[src*="powervirtualagents"],
iframe[src*="virtual-agent"],
iframe[src*="botframework"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

