﻿/* Design tokens (--sabre-chrome-*, --gnt-*) are defined once in
   Sabre.Shared.Web/wwwroot/css/theme-tokens.css (served as
   _content/Sabre.Shared.Web/css/theme-tokens.css), linked by the host page before this file.
   Do not redefine them here; reference them. */

/* Keep Syncfusion flat buttons legible when they sit on the dark chrome. */
.header-row .e-btn.e-flat,
.portal-top-toolbar .e-btn.e-flat,
.platform-top-toolbar .e-btn.e-flat,
.tenant-top-toolbar .e-btn.e-flat,
.help-layout-header .e-btn.e-flat {
    color: var(--sabre-chrome-fg);
}

html,
body {
    height: 100%;
    margin: 0;
    font-family: Segoe UI, Arial, sans-serif;
    color: var(--gnt-text-color);
    background: var(--gnt-surface-2);
}

#app {
    height: 100%;
    min-height: 100%;
    min-width: 0;
}

.platform-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px;
    box-sizing: border-box;
}

.platform-panel {
    max-width: 760px;
    width: 100%;
}

.platform-kicker {
    margin: 0 0 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gnt-muted-color);
}

.platform-panel h1 {
    margin: 0 0 12px;
    font-size: 2rem;
}

.platform-panel p {
    font-size: 1rem;
    line-height: 1.5;
}

/* Text inputs in the Platform action dialogs (delete/decommission confirm, create, rename).
   Full width so a typed confirmation code is never cramped. */
.platform-tenant-dialog__input {
    width: 100%;
    box-sizing: border-box;
    min-height: 2.1rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--gnt-border-color);
    border-radius: 4px;
    background: var(--gnt-surface-color);
    color: var(--gnt-text-strong);
    font: inherit;
}


/* --- Platform wizards (PlatformTenantCreationWizard, PlatformTenantProvisionWizard) ---
   The step-wizard chrome both tenant wizards share, as one platform-wizard__* family. Every class
   here sits on a plain element in the wizard's own markup. Each wizard's own rules (and the field
   grid's label rule, which must stay scoped) live in its .razor.css. */
.platform-wizard {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
}

.platform-wizard__steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.platform-wizard__step {
    border: 1px solid var(--gnt-border-color);
    border-radius: 4px;
    color: var(--gnt-text-secondary);
    padding: 0.35rem 0.6rem;
}

.platform-wizard__step--active {
    background: var(--gnt-selected-bg);
    border-color: var(--gnt-selected-border);
    color: var(--gnt-primary-text);
}

.platform-wizard__step--complete {
    background: var(--gnt-success-tint);
    border-color: var(--gnt-success-border);
    color: var(--gnt-success-text);
}

.platform-wizard__result {
    flex: 1 1 auto;
    min-height: 0;
}

.platform-wizard__fields {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.platform-wizard__fields .platform-wizard__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.platform-wizard__wide-field {
    grid-column: 1 / -1;
}

.platform-wizard__review dl {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.platform-wizard__review div {
    border: 1px solid var(--gnt-border-soft);
    border-radius: 4px;
    padding: 0.7rem;
}

.platform-wizard__review dt {
    color: var(--gnt-muted-color);
    font-size: 0.8rem;
}

.platform-wizard__review dd {
    margin: 0.15rem 0 0;
}

.platform-wizard__errors {
    background: var(--gnt-danger-tint);
    border: 1px solid var(--gnt-danger-border);
    border-radius: 4px;
    color: var(--gnt-danger-text);
    display: grid;
    gap: 0.35rem;
    padding: 0.65rem;
}

.platform-wizard__operation-list {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.platform-wizard__operation {
    border: 1px solid var(--gnt-border-soft);
    border-radius: 4px;
    padding: 0.7rem;
    display: grid;
    gap: 0.25rem;
}

.platform-wizard__operation span {
    color: var(--gnt-text-secondary);
    font-size: 0.82rem;
}

.platform-wizard__operation p {
    margin: 0;
}

.platform-wizard__footer {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
}

.platform-wizard__footer-spacer {
    flex: 1 1 auto;
}

@media (max-width: 720px) {
    .platform-wizard__fields {
        grid-template-columns: 1fr;
    }
}

.platform-wizard__choice {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Bring your own - the placeholder panel's frame; each wizard sets its own margin and list. */
.platform-wizard__byo {
    border: 1px dashed var(--gnt-border-color);
    border-radius: 0.375rem;
    padding: 0.75rem 0.875rem;
    background: var(--gnt-surface-2);
}

.platform-wizard__byo-head {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.platform-wizard__badge {
    background: var(--gnt-warning-tint);
    border: 1px solid var(--gnt-warning-color);
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.0625rem 0.5rem;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ==== Per-user density (html[data-gnt-density], set by gnt-display-tray.js applyDisplay) ====
   Compact mirrors the grid's compressed row mode; Comfortable adds breathing room. Normal is the
   Syncfusion default and needs no rule. Form padding follows the --gnt-formitem-* / --gnt-row-padding
   variables the applier scales at the same time. */
html[data-gnt-density="Compact"] .gnt-grid-selector-grid-host .e-row,
html[data-gnt-density="Compact"] .gnt-grid-selector-grid-host .e-rowcell {
    height: 22px !important;
}

html[data-gnt-density="Compact"] .gnt-grid-selector-grid-host .e-rowcell {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.1;
}

html[data-gnt-density="Compact"] .gnt-grid-selector-grid-host .e-rowcell > div,
html[data-gnt-density="Compact"] .gnt-grid-selector-grid-host .grid-col-combo-display,
html[data-gnt-density="Compact"] .gnt-grid-selector-grid-host .gnt-favourite-cell {
    min-height: 0;
    height: 100%;
    line-height: 1.1;
}

/* Normal is stated explicitly (Syncfusion's stock 22px line + 6px padding) so it still differs from
   Compact when the grid's own row-height mode is Compressed. */
html[data-gnt-density="Normal"] .gnt-grid-selector-grid-host .e-row,
html[data-gnt-density="Normal"] .gnt-grid-selector-grid-host .e-rowcell {
    height: 35px !important;
}

html[data-gnt-density="Normal"] .gnt-grid-selector-grid-host .e-rowcell {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    line-height: 22px;
}

html[data-gnt-density="Comfortable"] .gnt-grid-selector-grid-host .e-row,
html[data-gnt-density="Comfortable"] .gnt-grid-selector-grid-host .e-rowcell {
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
}
