/*
 * DFDS branding for the Filament panels. Plain CSS (no build step), loaded by a render hook after Filament's own styles.
 * Navy #002B45 for headings, grey-blue #4D5E6B for secondary text, light grey #E3EAED for borders.
 */

/* Brand logo with the panel label next to it */
.dfds-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 100%;
}

.dfds-brand-logo {
    display: block;
    height: 100%;
    width: auto;
}

.dfds-brand-label {
    border-inline-start: 1px solid #E3EAED;
    padding-inline-start: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
    letter-spacing: 0;
    white-space: nowrap;
    color: #002B45;
}

.dark .dfds-brand-label {
    border-inline-start-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.fi-simple-header .fi-logo {
    justify-content: center;
}

/* Navy headings in light mode; dark mode keeps Filament's white */
html:not(.dark) .fi-header-heading,
html:not(.dark) .fi-simple-header-heading,
html:not(.dark) .fi-section-header-heading,
html:not(.dark) .fi-modal-heading,
html:not(.dark) .fi-wi-stats-overview-stat-value {
    color: #002B45;
}

html:not(.dark) .fi-header-subheading,
html:not(.dark) .fi-simple-header-subheading,
html:not(.dark) .fi-section-header-description {
    color: #4D5E6B;
}

/*
 * Buttons in the dfds.com style: square corners, 40px high, 8px 16px padding, 16px medium text, no border.
 * Primary buttons are DFDS blue (#1A63F5, Filament primary-600) with white text and a darker blue (primary-700) on hover.
 * Small (xs/sm) buttons, used in tables and filters, only get the square corners so dense layouts keep their size.
 * Table row actions are links (.fi-link) and icon buttons (.fi-icon-btn) are separate components, so neither is affected.
 */
.fi-btn,
.fi-btn-group {
    border-radius: 0;
}

.fi-btn.fi-size-md,
.fi-btn.fi-size-lg,
.fi-btn.fi-size-xl {
    min-height: 40px;
    padding: 8px 16px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
}

.fi-btn.fi-color-primary:not(.fi-outlined) {
    border: 0;
}

html:not(.dark) .fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-disabled):not([disabled]):hover {
    background-color: var(--primary-700);
    color: #ffffff;
}

/* A visible keyboard focus ring on every button, in addition to Filament's own ring */
.fi-btn:focus-visible {
    outline: 2px solid #1A63F5;
    outline-offset: 2px;
}

.dark .fi-btn:focus-visible {
    outline-color: #8DB3FA;
}

/*
 * Square form inputs to match the buttons: input wrappers (text, password, select, textarea, table search, per-page
 * select), the parts inside them (prefix/suffix segments and their icon buttons such as the password reveal), select
 * triggers, one-time-code digits and checkboxes. Radio buttons and toggles stay round. Filament's focus ring is a
 * box-shadow on the wrapper, so it follows the square corners and stays visible. !important is needed because fused
 * input groups set individual corner radii with more specific selectors.
 */
.fi-input-wrp,
.fi-input-wrp .fi-icon-btn,
.fi-select-input .fi-select-input-btn,
.fi-one-time-code-input-ctn > .fi-one-time-code-input-digit,
.fi-fo-date-time-picker .fi-fo-date-time-picker-month-select,
.fi-fo-date-time-picker .fi-fo-date-time-picker-year-input,
.fi-fo-date-time-picker .fi-fo-date-time-picker-time-inputs input,
.fi-checkbox-input,
.fi-dropdown-panel,
.fi-select-input-options-ctn {
    border-radius: 0 !important;
}
