/* Shared Smart Workforce theme rules. Keep this file identical across applications. */
.t-Region > .t-Region-header {
    background-color: var(--ut-header-background-color, #2c302e) !important;
    color: var(--ut-header-text-color, #ffffff) !important;
}

.t-Region > .t-Region-header .t-Region-title,
.t-Region > .t-Region-header .t-Button,
.t-Region > .t-Region-header .a-Button {
    color: inherit !important;
}

/* Compact global navigation shared by the desktop applications. */
.sw-nav-icon-only .t-Button-label,
.t-NavigationBar-item.sw-nav-icon-only .t-Button-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sw-nav-icon-only .t-Button,
.t-NavigationBar-item.sw-nav-icon-only .t-Button {
    min-width: 2.75rem;
    justify-content: center;
}

.sw-notification-badge .t-Button-badge:not(:empty) {
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 1rem;
    background: #c62828;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.25rem;
    box-shadow: 0 0 0 2px var(--ut-header-background-color, #fff);
}

.sw-environment-chip .t-Button {
    min-width: 3.5rem;
    padding-inline: 0.75rem;
    border-radius: 0.25rem;
    font-weight: 700;
    letter-spacing: 0;
}

.sw-env-DEV .t-Button { color: #fff; background: #1b6ca8; }
.sw-env-UAT .t-Button { color: #1f1f1f; background: #f5c542; }
.sw-env-PROD .t-Button { color: #fff; background: #2e7d32; }

/* Search is intentionally prominent while retaining native APEX behavior. */
.sw-global-search .t-Form-fieldContainer {
    width: 100%;
    max-width: 68rem;
    margin-inline: auto;
}

.sw-global-search .t-Form-inputContainer,
.sw-global-search .t-Form-itemWrapper {
    width: 100%;
    max-width: none;
}

.sw-global-search-input input {
    width: 100%;
    min-height: 3.5rem;
    padding-inline: 1.25rem;
    border-radius: 1.75rem;
    font-size: 1.125rem;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.12);
}

.sw-global-search .t-ButtonRegion-col--right,
.sw-global-search .t-ButtonRegion-col--left {
    align-items: center;
}

/* The current user's photograph remains the primary profile signal. */
.sw-profile-hero .a-CardView {
    min-height: 0;
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    grid-template-areas:
        "photo header"
        "photo body";
    align-items: center;
    padding: 1rem;
}

.sw-profile-hero .a-CardView-media {
    grid-area: photo;
    width: 5.5rem;
    height: 5.5rem;
    margin: 0;
    border-radius: 50%;
    overflow: hidden;
}

.sw-profile-hero .a-CardView-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sw-profile-hero .a-CardView-body {
    grid-area: body;
    padding: 0 0.75rem 0.25rem;
}

.sw-profile-hero .a-CardView-header {
    grid-area: header;
    padding: 0.25rem 0.75rem;
}

@media (max-width: 640px) {
    .sw-profile-hero .a-CardView {
        grid-template-columns: 4.5rem minmax(0, 1fr);
        padding: 0.75rem;
    }

    .sw-profile-hero .a-CardView-media {
        width: 3.75rem;
        height: 3.75rem;
    }
}

/* Smart ERP: required markers belong beside controls, not inside labels. */
.t-Form-fieldContainer.is-required .t-Form-label::before {
    content: none;
}

.t-Form-fieldContainer.is-required > .t-Form-inputContainer > .t-Form-itemWrapper {
    position: relative;
}

.t-Form-fieldContainer.is-required > .t-Form-inputContainer > .t-Form-itemWrapper::before {
    content: "*";
    position: absolute;
    inset-inline-start: -0.5rem;
    top: 0.5rem;
    width: 0.5rem;
    color: var(--ut-palette-danger, #b42318);
    font-family: Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: start;
    pointer-events: none;
}
