/* Shared floorplans for screens on MainMaster.
   inox-home: My Home. inox-list: list report. inox-object: one document.
   inox-report: a register or GSTR page. inox-worklist: a queue of tasks.
   Put the class on the outer content div. The master form then stays a canvas. */

form:has(.inox-home),
form:has(.inox-list),
form:has(.inox-object),
form:has(.inox-report),
form:has(.inox-worklist) {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.inox-home,
.inox-list,
.inox-object,
.inox-report,
.inox-worklist {
    color: var(--sapTextColor);
    font-family: var(--sapFontFamily);
}

.inox-dyn-head {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 0 1rem;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid var(--sapGroup_ContentBorderColor);
    background: var(--sapBackgroundColor, #f5f6f7);
}
.inox-dyn-head .fd-title { margin: 0; }
.inox-dyn-sub {
    margin: 0.25rem 0 0;
    color: var(--sapContent_LabelColor);
    font-size: var(--sapFontSize);
    font-weight: 400;
}

.inox-section { margin: 0 0 1.25rem; }
.inox-section > .fd-title { margin: 0 0 0.625rem; }

.inox-tile-grid,
.inox-card-grid {
    display: grid;
    gap: 0.75rem;
}
.inox-tile-grid { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.inox-card-grid { grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); align-items: start; }

/* The library tile is a fixed 11rem square with the subtitle and title on one line.
   My Home tiles follow the text: label, then name or number. */
.inox-tile-grid > .fd-tile,
.inox-tile-grid > .fd-tile:link,
.inox-tile-grid > .fd-tile:visited {
    height: auto;
    min-height: 0;
    max-height: none;
    width: auto;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    color: var(--sapTitleColor);
    text-decoration: none;
    text-align: left;
    appearance: none;
}
.inox-tile-grid .fd-tile__content {
    display: block;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
}
.inox-tile-grid .fd-tile__subtitle {
    display: block;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    margin: 0 0 0.25rem;
    color: var(--sapContent_LabelColor);
    font-size: 0.75rem;
    line-height: 1.2;
}
.inox-tile-grid .fd-tile__title {
    display: block;
    overflow: visible;
    white-space: normal;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    color: var(--sapTitleColor);
    font-weight: 700;
    line-height: 1.25;
}
.inox-tile-grid .fd-numeric-content,
.inox-tile-grid .fd-numeric-content--small-tile {
    display: block;
    height: auto;
    width: auto;
}
.inox-tile-grid .fd-numeric-content__kpi {
    color: var(--sapTextColor);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.15;
}

.inox-list .inox-section,
.inox-object .inox-section,
.inox-report .inox-section {
    background: var(--sapGroup_ContentBackground, var(--sapBaseColor));
    border: 1px solid var(--sapGroup_ContentBorderColor);
    border-radius: var(--sapElement_BorderCornerRadius);
    padding: 0.75rem 1rem 1rem;
}

.inox-list table[border],
.inox-object table[border],
.inox-report table[border] {
    border: 0 !important;
    width: 100%;
}

.inox-list [id$="SiteMapPath1"],
.inox-object [id$="SiteMapPath1"],
.inox-report [id$="SiteMapPath1"] {
    display: block;
    margin: 0 0 0.75rem;
    font-family: var(--sapFontFamily) !important;
    font-size: var(--sapFontSize) !important;
    color: var(--sapContent_LabelColor) !important;
}
.inox-list [id$="SiteMapPath1"] a,
.inox-object [id$="SiteMapPath1"] a,
.inox-report [id$="SiteMapPath1"] a {
    color: var(--sapLinkColor) !important;
    font-family: var(--sapFontFamily) !important;
    font-weight: 400 !important;
    text-decoration: none;
}

.inox-report .fd-title,
.inox-list .fd-title,
.inox-object .fd-title {
    font-family: var(--sapFontFamily);
    color: var(--sapTitleColor);
}

.inox-list .inox-section table,
.inox-object .inox-section table,
.inox-report .inox-section table {
    font-family: var(--sapFontFamily);
    font-size: var(--sapFontSize);
    color: var(--sapTextColor);
}
.inox-report .inox-section th,
.inox-list .inox-section th,
.inox-object .inox-section th {
    background: var(--sapList_HeaderBackground, var(--sapBaseColor));
    color: var(--sapList_HeaderTextColor, var(--sapContent_LabelColor));
    font-weight: 700;
    text-align: left;
}

.inox-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--sapPageFooter_BorderColor);
    background: var(--sapPageFooter_Background);
}

.inox-object .inox-footer .btn-primary,
.inox-list .inox-footer .btn-primary { margin-left: auto; }

/* Party and item lookups from the Ajax autocomplete list. */
.inox-valuehelp {
    background: var(--sapList_Background, #fff) !important;
    border: 1px solid var(--sapList_BorderColor, #556b82) !important;
    border-radius: var(--sapField_BorderCornerRadius);
    box-shadow: var(--sapContent_Shadow1);
    color: var(--sapList_TextColor, var(--sapTextColor));
    font-family: var(--sapFontFamily);
    font-size: var(--sapFontSize);
    z-index: 10000;
    overflow: auto;
    max-height: 16rem;
}
.inox-valuehelp div {
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    background: transparent;
    color: var(--sapList_TextColor, var(--sapTextColor));
}
.inox-valuehelp div:hover {
    background: var(--sapList_Hover_Background, #eaecee);
}

@media (prefers-reduced-motion: reduce) {
    .fd-tile, .fd-card { transition: none !important; }
}
