/* custom.css */
:root {
    /* colours of the CARNET visual identity with the names from its SCSS ($carnet-*), only the ones in use */
    --carnet-off-black-100: #0E0E0E;
    --carnet-off-black-75: #4A4A4A;

    /* the text and the muted and helper text (the rules under "text colours") */
    --bs-body-color: var(--carnet-off-black-100);
    --text-muted-color: var(--carnet-off-black-75);

    /* the primary blue: the theme #3f80ea has 3.8:1 on white, this one 4.5:1 also on the gray page background; the
       utilities (bg-primary, text-primary) read it, the links and the parts of the theme below take it */
    --bs-primary: #236de7;
    --bs-primary-rgb: 35, 109, 231;
    --bs-link-color: var(--bs-primary);

    /* the font Inter (@font-face below); the theme reads both variables */
    --bs-font-sans-serif: 'Inter', Arial, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);

    /* other colours */
    --pink: rgba(173, 81, 158, 0.9); /* #AD519E */
    --light-gray: #e9edf2;
    --process-step-bg: #e6f1fb;    /* numbers of the process steps (.process-steps) */
    --process-step-color: #185fa5;
}

/* the font of the app and the end-user pages: Inter, as on the WordPress site, from our server in one variable file
   (all weights); the theme reads it from the two font variables in :root */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/InterVariable.woff2') format('woff2');
}

/* helper text (small, .small and the form-text under the fields): the theme gives 80 % of the text (10.6 px), too small
   for the colleagues; 87.5 % as in Bootstrap (11.6 px) */
.small,
small,
.form-text {
    font-size: 87.5%;
}

/* text colours from the CARNET visual identity (the variables in :root): the text off-black-100 (19.3:1 on white), the
   muted and helper text off-black-75 (8.9:1); the theme gives the headings, card titles, bold text and fields a fixed
   #495057, so they get the colour of the text here */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.card-title,
b,
strong,
.form-control,
.form-control:focus,
.form-select,
.input-group-text {
    color: var(--bs-body-color);
}

.text-muted {
    color: var(--text-muted-color) !important;
}

.form-text,
caption {
    color: var(--text-muted-color);
}

/* read-only values in the colour of the text like the fields of a form; the theme gives them a fixed #6c757d */
.form-control-plaintext {
    color: var(--bs-body-color);
}

/* the dark text of the theme (.text-dark, #293042, 13.2:1) would be lighter than the text: page titles, emphasized
   values and names in the summaries, light badges and the logo on the login page get the black of the CARNET visual
   identity */
.text-dark {
    color: var(--carnet-off-black-100) !important;
}

/* the logo of the WordPress site (the same file as the end-user header and footer) in the colour of the text,
   white on the dark sidebar, dark on the login page */
.sidebar-brand-logo,
.login-logo {
    display: block;
    width: 172px;
    height: 22px;
    margin: 0 auto 6px;
    background: currentColor;
    -webkit-mask: url('../img/wordpress/domene-hr.svg') center / contain no-repeat;
    mask: url('../img/wordpress/domene-hr.svg') center / contain no-repeat;
}

/* the app version under the logo in the sidebar (app/sidebar.tpl), in rem so that it grows with the base size */
#header_ver {
    font-size: .55rem;
}

/* items of the side menu that wrap get lines of a similar length: with a larger font the browser would otherwise
   break after a hyphen and leave one letter in the second line ("Dohvati podatke iz OIB-" / "a") */
.sidebar-link {
    text-wrap: balance;
}

/* side menu items that are not selected: the theme gives them half-transparent white, 4.0:1 on the dark menu;
   with 70% they have 6.6:1 (text needs at least 4.5:1); the hover of the theme (75%) would hardly differ, so it
   is light like the hover of the sub-items */
a.sidebar-link,
a.sidebar-link i {
    color: rgba(var(--bs-light-rgb), .7);
}

a.sidebar-link:hover,
a.sidebar-link:hover i {
    color: var(--bs-light);
}

/* the selected sub-item: the blue of the theme (#568fed) has 4.1:1 on the dark menu, the primary blue mixed with
   35% white 5.0:1 */
.sidebar-dropdown .sidebar-item.active .sidebar-link {
    color: color-mix(in srgb, var(--bs-primary), white 35%);
}

/* login page (app/login.tpl) and page not found (app/error_404.tpl): a larger logo above a narrow form or message,
   two fields and a short message do not need more width */
.login-logo {
    width: 220px;
    height: 28px;
    margin: 0 auto;
}

.login-box {
    width: 100%;
    max-width: 25rem;
}

/* dashboard (app/dashboard.tpl): the cards of the work waiting are links; a card with nothing to do is
   greyed out and a card with a problem is red (the theme colours the icon with !important) */
.dashboard-queue.is-empty h3 {
    color: var(--text-muted-color);
}

.dashboard-queue.is-empty .stat {
    opacity: .45;
}

.dashboard-queue.is-danger h3 {
    color: var(--bs-danger);
}

.dashboard-queue.is-danger .stat {
    background: rgba(var(--bs-danger-rgb), .12);
}

.dashboard-queue.is-danger .stat svg {
    color: var(--bs-danger) !important;
}

/* dashboard (app/dashboard.tpl): the card of the signed-in users is as tall as its list, a long list
   scrolls inside the card */
.dashboard-users-list {
    max-height: 20rem;
    overflow-y: auto;
}

/* outcome icon in a circle next to the text: end-user results, errors and notices, the login page message */
.transfer-result-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f5;
    color: #495057;
}

.transfer-result-icon.is-danger {
    background: #fbe9eb;
    color: #c0392b;
}

.transfer-result-icon.is-success {
    background: #e3f4e9;
    color: #2f8a4f;
}

/* the circle of the theme warning colour as on the error page, the icon darker to be readable at this size */
.transfer-result-icon.is-warning {
    background: rgba(var(--bs-warning-rgb), .15);
    color: #b7791f;
}

.custom-height {    /* input field height */
    height: calc(3.2rem + 2px) !important;
}

.form-floating>.form-select {
    padding-bottom: 0;
}

.form-control:focus {   /* Overriding input field focus WIDTH */
    box-shadow: 0 0 0 .1rem rgba(13,110,253,.25)
}

.custom-bg-pink {
    background-color: var(--pink);
    border-color: var(--pink);
}

.custom-txt-pink{
    color: var(--pink);
}

/* large checkbox */
.custom-checkbox-large .form-check-input {
    transform: scale(1.5);
    cursor: pointer;
}

/* the info icon with a popover after the label of a switch, in the middle of the switch and the label instead of
   a pixel lower (align-middle on the icon is a utility with !important, hence !important here) */
.form-check-label + [data-bs-toggle="popover"] > svg.lucide {
    vertical-align: -3px !important;
}



/******************************
** CUSTOM SEARCH INPUT FIELD **
*******************************/
.custom-btn-search {
    background-color: #FFF;
    border-top-color: var(--bs-gray-400);
    border-right-color: var(--bs-gray-400);
    border-bottom-color: var(--bs-gray-400);
}

.custom-btn-search:hover {
    background-color: #FFF;
    border-top-color: var(--bs-gray-400);
    border-right-color: var(--bs-gray-400);
    border-bottom-color: var(--bs-gray-400);
}

.custom-btn-search:active {
    background-color: #FFF !important;
    border-top-color: var(--bs-gray-400) !important;
    border-right-color: var(--bs-gray-400) !important;
    border-bottom-color: var(--bs-gray-400) !important;
    border-left-color: #FFF !important;
}

.custom-input-search {
    border-right-color: #FFF;
}

.custom-input-search:focus {
    background-color: #FFF;
    border-top-color: var(--bs-gray-400);
    border-right-color: #FFF;
    border-bottom-color: var(--bs-gray-400);
    border-left-color: var(--bs-gray-400);
    box-shadow: none;
}

/* the search field on the list and history pages (with the switch or the filters under it, or a choice next to it),
   the registrar choice on the bills and the fields of the balance change form: the same width on every screen, at
   most 37.5rem from md; as half or a third of the card it was only 380 px on a laptop (1536 px) and cut the options
   of the filters */
.search-column {
    width: 100%;
}

@media (min-width: 768px) {
    .search-column {
        max-width: 37.5rem;
    }
}

/* the filters of a search page (transactions, domain search options): two in a row from md; filter-grid-thirds three when
   every field has room for a date period and the longest registrar name (about 330 px, from 62rem), for the eleven
   options of the domain search; on a wide card at most 76rem (two search columns) in the middle instead of spread over
   the card, on a narrower one the gutters of the row stay */
.filter-grid {
    container-type: inline-size;
    margin-inline: max(calc(-.5 * var(--bs-gutter-x)), calc((100% - 76rem - var(--bs-gutter-x)) / 2));
}

@container (min-width: 62rem) {
    .filter-grid-thirds > .col-md-6 {
        width: 33.333333%;
    }
}

/* filter-grid-stack (the three filters of the transactions): one under another, as wide as the search field above them and
   in the middle, until all three fit in one row; never two and one */
.filter-grid-stack > .col-md-6 {
    width: 100%;
    max-width: calc(37.5rem + var(--bs-gutter-x));
    margin-inline: auto;
}

@container (min-width: 62rem) {
    .filter-grid-stack > .col-md-6 {
        width: 33.333333%;
        max-width: none;
        margin-inline: 0;
    }
}

/* the long lists of the transaction filters (type, registrar), which the browser draws itself, get the letters of the body
   text: lower rows, so they open under the field more often */
#transaction_search_form .form-select.fs-4 option {
    font-size: var(--bs-body-font-size);
}

/* the description of a transaction in one line from md, so Responsive hides the columns that do not fit instead of
   breaking the rows into two or three lines; on a phone it breaks next to the amount */
@media (min-width: 768px) {
    .transaction-description {
        white-space: nowrap;
    }
}




input:-webkit-autofill {
    box-shadow: 0 0 0 1000px white inset !important;
}

.card-header .fa-chevron-down {
    transition: 0.2s transform ease-in-out;
    transform: rotate(-180deg); /* Default position: down */
}

.card-header a.collapsed .fa-chevron-down {
    transform: rotate(0deg); /* When collapsed: up */
}

.card-success-subtle {
    background-color: #dbf2e3;
    color: #0f5132;
    border: none;
    border-radius: 0.375rem;
}

.card-warning-subtle {
    background-color: #faeddb;
    color: #664d03;
    border: none;
    border-radius: 0.375rem;
}

.card-danger-subtle {
    background-color: #f7dddc;
    color: #842029;
    border: none;
    border-radius: 0.375rem;
}

.card-secondary-subtle {
    background-color: var(--light-gray);
    color: #222;
    border: none;
    border-radius: 0.375rem;
}

.card-info-subtle {
    background-color: #cff4fc;
    color: #055160;
    border: none;
    border-radius: 0.375rem;
}


/* gray, red, yellow and blue outline buttons (cancel, back, copy, cancel transfer, assign authorization, the A/AAAA button
   in the NS record, edit domain and registry certificate on the domain choice): white fill so they are visible on a gray
   background (page outside a card, bg-light box, code example), variable instead of bg-white so the outline button
   hover still works */
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-primary {
    --bs-btn-bg: #fff;
}


/* primary buttons in the colour of the links: the white text has 4.8:1 (3.8:1 on the theme #3f80ea); the filled button
   is in the hover colour of the links on hover and press */
.btn-primary {
    --bs-btn-bg: var(--bs-link-color);
    --bs-btn-border-color: var(--bs-link-color);
    --bs-btn-hover-bg: var(--bs-link-hover-color);
    --bs-btn-hover-border-color: var(--bs-link-hover-color);
    --bs-btn-active-bg: var(--bs-link-hover-color);
    --bs-btn-active-border-color: var(--bs-link-hover-color);
    --bs-btn-disabled-bg: var(--bs-link-color);
    --bs-btn-disabled-border-color: var(--bs-link-color);
}

.btn-outline-primary {
    --bs-btn-color: var(--bs-link-color);
    --bs-btn-border-color: var(--bs-link-color);
    --bs-btn-hover-bg: var(--bs-link-color);
    --bs-btn-hover-border-color: var(--bs-link-color);
    --bs-btn-active-bg: var(--bs-link-color);
    --bs-btn-active-border-color: var(--bs-link-color);
    --bs-btn-disabled-color: var(--bs-link-color);
    --bs-btn-disabled-border-color: var(--bs-link-color);
}

/* the parts of the theme with the primary blue written out (#3f80ea): the active page of the lists, the active item of
   a list group, checked switches and checkboxes, progress bars and the icons of the dashboard cards */
.pagination {
    --bs-pagination-active-bg: var(--bs-primary);
    --bs-pagination-active-border-color: var(--bs-primary);
}

.list-group {
    --bs-list-group-active-bg: var(--bs-primary);
    --bs-list-group-active-border-color: var(--bs-primary);
}

.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.progress {
    --bs-progress-bar-bg: var(--bs-primary);
}

.stat svg {
    color: var(--bs-primary) !important;
}



/***************************************************************************************
** SOLUTION FOR BOOTSTRAP 5 BUG WHEN FLOATING LABEL OVERLAPS WITH CONTENT IN TEXTAREA **
****************************************************************************************/
.custom-form-floating {
    position: relative;
}

.custom-form-floating:before {
    content: '';
    position: absolute;
    top: 1px; /* border-width (default by BS) */
    left: 1px; /* border-width (default by BS) */
    width: calc(100% - 20px); /* to show scrollbar */
    height: 24px;
    background-color: #ffffff;
}

/* Change background if the textarea is disabled */
.custom-form-floating:has(textarea:disabled):before {
    background-color: #e2e8ee; /* Bootstrap's disabled input background color */
}

/* preformatted text that wraps long lines inside its box instead of running out of it (raw OIB register data, read_only_oib.tpl) */
.pre-wrap {
    white-space: pre-wrap;
    word-break: break-word;
}

/* the same for a textarea marked by bValidator (the required comment of a registration request on hold) */
.custom-form-floating:has(textarea.bvalidator_bootstraprt_invalid):before {
    background-color: #fcf8e3; /* bValidator's invalid input background color (bvalidator.theme.bootstrap.rt.css) */
}

/* a bValidator message wraps on a narrow screen instead of running off it; 100vw includes the scrollbar */
.bvalidator_bootstraprt_errmsg {
    white-space: normal;
    width: max-content;
    max-width: calc(100vw - 40px);
}

.form-floating.custom-form-floating > textarea.form-control {
    padding-top: 32px;
    height: auto;
    min-height: calc(3.5rem + 2px);
}

.display_none {
    display: none;
}

/* bold part of a notification (App_View::notify(), e.g. the domain name): the theme gives b and strong a dark gray
   that is not seen on the colored notification, the text color instead */
.notyf__message b,
.notyf__message strong {
    color: inherit;
    font-weight: 500;
}

/* notification: wider than the Notyf default (300px), a message with the domain name stays in one or two lines;
   below 480px Notyf makes it full width. The color is a circle growing from the right (400px), larger so it
   covers the wider notification */
.notyf__toast {
    max-width: 480px;
}

.notyf__ripple {
    width: 1000px;
    height: 1000px;
}



/***************
** DATATABLES **
****************/
th.sorting:hover {
    outline: 2px solid rgba(0,0,0,.05);
    outline-offset: -2px
}

/* loading indicator of DataTables (processing): the theme gives the dots "background: 13 110 253", an invalid value,
   so they were not shown at all; the color of the theme instead */
div.dataTables_processing > div:last-child > div {
    background: var(--bs-primary);
}

/* the page numbers of the lists (DataTables and the transaction list) wrap into another row on a phone instead of
   sticking out of the card */
.pagination {
    flex-wrap: wrap;
    row-gap: .25rem;
}

/* hidden columns of a responsive table (row opened with "+"): titles and values are two columns, the titles as wide
   as the longest one (at most half), so all values start at the same line and a value with more lines (date and hour,
   name and ID) doesn't continue under its title */
table.dataTable > tbody > tr.child ul.dtr-details {
    display: grid;
    grid-template-columns: fit-content(50%) minmax(0, 1fr);
    column-gap: .5rem;
}

table.dataTable > tbody > tr.child ul.dtr-details > li {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
}

/* the "+" and "-" that open a row of a responsive table: two white bars in the middle of the circle instead of the
   Courier New characters of the theme, which sit off the middle; the circle is 18 px, as the theme moves it up by 9 px,
   and in the primary blue, the open row keeps the red of the theme */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    content: "";
    width: 14px;
    height: 14px;
    border-width: 2px;
    background-color: var(--bs-primary);
    background-image: linear-gradient(var(--bs-white), var(--bs-white)), linear-gradient(var(--bs-white), var(--bs-white));
    background-size: 8px 2px, 2px 8px;
    background-position: center;
    background-repeat: no-repeat;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control::before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control::before {
    content: "";
    background-size: 8px 2px, 0 0;
}

/* the first column of a table wider than its card (current price list on a phone) stays in place while the table
   scrolls sideways in .table-responsive; the background of the card covers the cells that slide under it, and the
   hover shadow of the row still shows. In the header only the first cell of the first row: in a header of two rows
   the first cell of the second row is not in the first column */
.table-sticky-first-column > thead > tr:first-child > :first-child,
.table-sticky-first-column > tbody > tr > :first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background-color: var(--bs-card-bg);
}

/* while the table is scrolled sideways (is-scrolled from functions.js), a line on the right of the first column
   separates it from the cells that slide under it. The line is a pseudo-element: a border of the cell would scroll
   away with the collapsed borders of the table, and the theme draws the row hover with box-shadow */
.table-responsive.is-scrolled > .table-sticky-first-column > thead > tr:first-child > :first-child::after,
.table-responsive.is-scrolled > .table-sticky-first-column > tbody > tr > :first-child::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    border-right: var(--bs-border-width) solid var(--bs-table-border-color);
}

/* the chevron of a dropdown (theme: a rotated border) points up while the menu is open; turned over it would sit 2.83 px
   higher (the 2 px padding of the theme times the square root of 2), so it is moved down by as much; both states have
   the same transform functions, so the turn stays smooth */
.dropdown-toggle::after {
    transform: translateY(0) rotate(45deg);
    transition: transform .2s ease-in-out;
}

.dropdown-toggle.show::after {
    transform: translateY(2.83px) rotate(-135deg);
}

/* user menu in the navbar: the chevron is not glued to the name */
.navbar .nav-link.dropdown-toggle::after {
    margin-left: .75rem;
}

/* below md the theme makes the navbar and the content as wide as the window (100vw, so the open menu pushes them aside
   without squeezing) and lets .main scroll sideways; on a computer 100vw includes the scrollbar, so .main scrolled
   15 px, and with the menu open the content could be scrolled sideways */
@media (max-width: 767.98px) {
    .main {
        overflow-x: hidden;
    }
}

/* from md to lg the menu is closed at first and the theme squeezed the content when it was opened, so tables with
   columns from md came out of their cards (Cijene domena, Bankovne garancije, Računi); while the menu is open, the
   content keeps the width of the window and is pushed aside, as below md (.collapsed is the open menu below lg) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .sidebar.collapsed ~ .main {
        overflow-x: hidden;
    }

    .sidebar.collapsed ~ .main .navbar,
    .sidebar.collapsed ~ .main .content {
        width: 100vw;
        max-width: 100vw;
    }
}



/*************
** CHART.JS **
**************/
.chart-limited-height {
    max-height: 400px;
    width: 100%;
}



/************
** BUTTONS **
*************/

/* label of an empty floating field as light as the small label of a filled one (Bootstrap sets .65 only then),
   so an empty field does not look filled */
.form-floating > label {
    opacity: .65;
}

/* make room for the button inside the field (OIB "get from registry"), also in form-floating, which sets its own padding */
.pr-btn-space,
.form-floating > .form-control.pr-btn-space {
    padding-right: 11rem;
}

/* no room while the OIB button is hidden (registrar.show_hide_oib_btn()), on a phone the number was cut off */
.form-floating:has(> #show_hide_btn_oib.d-none) > .form-control.pr-btn-space {
    padding-right: .75rem;
}

/* the same for a short button (expire date "today") */
.pr-btn-space-sm,
.form-floating > .form-control.pr-btn-space-sm {
    padding-right: 5rem;
}



/* preview mail menu */
@media (min-width: 768px) {
    .sticky-sidebar {
        position: sticky;
        top: 1rem;
        z-index: 100;
    }
}

#epp_xml {
    height: auto;
    min-height: calc(1.5em * 15); /* Adjust for line height */
    line-height: 1.625;
}


.custom-alert-info {
    color: #00449d;
    border: 1px solid #00449d;
    background-color: #d2ebf559;
}


.custom-alert-info ul{
   margin-bottom: 0;
}


/**********************************
** CONTACT VERIFICATION BANNER **
***********************************/
.verify-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: 12px;
    padding: 14px 16px;
}

.verify-banner-danger {
    background-color: #fdf1f2;
    border: 1px solid #f1aeb5;
}

.verify-banner-success {
    background-color: #eef7f1;
    border: 1px solid #a3cfbb;
}

.verify-banner-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.verify-banner-danger .verify-banner-icon {
    background-color: #f8d7da;
    color: #a12832;
}

.verify-banner-success .verify-banner-icon {
    background-color: #d6ecdf;
    color: #2f7d51;
}

.verify-banner-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2;
}

.verify-banner-danger .verify-banner-title {
    color: #842029;
}

.verify-banner-success .verify-banner-title {
    color: #0f5132;
}

.verify-banner-text {
    font-size: 13px;
    margin-top: 2px;
}

.verify-banner-danger .verify-banner-text {
    color: #9c5560;
}

.verify-banner-success .verify-banner-text {
    color: #3f7d5c;
}



/*************
** DEV LOG **
**************/
.devlog-table tr.severity-danger > td:first-child {
    border-left: 4px solid #dc3545;
}

.devlog-table tr.severity-info > td:first-child {
    border-left: 4px solid #0dcaf0;
}

/* stack trace box */
.devlog-trace {
    background: var(--bs-dark);
    color: #e2e8f0;
    border-radius: 0.375rem;
    padding: 1rem;
    overflow: auto;
    font-size: 0.85rem;
    line-height: 1.35;
}

.devlog-table code {
    background: rgba(13,110,253,0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 0.4rem;
}

.devlog-table .fa-chevron-down {
    transition: 0.2s transform ease-in-out;
    transform: rotate(-180deg); /* Default position: down */
}

.devlog-table button.collapsed .fa-chevron-down {
    transform: rotate(0deg); /* When collapsed: up */
}

.custom-param-card code {
    font-size: .825rem;
}

/* history changes: on narrow screen every changed field gets its own shaded box */
@media (max-width: 767.98px) {
    .history-change {
        background-color: var(--bs-light);
        border-radius: 0.375rem;
        padding: 0.25rem 0.5rem;
    }
}

/* domain contact fields (registration step 2, domain edit, contact edit): two columns while the card has room
   (the contact edit card is half of the page), contact-field-full over both;
   fields hidden by JS (first/last name of an organization) leave no empty cell */
.contact-fields-box {
    container-type: inline-size;
}

@container (min-width: 36rem) {
    .contact-fields {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 1rem;
    }

    .contact-fields > .contact-field-full {
        grid-column: 1 / -1;
    }
}

/* steps of a process (holder change): numbered circles joined by a thin line, a title and a short text;
   colors of the numbers in :root */
.process-steps {
    list-style: none;
    margin-bottom: 0;
    padding-left: 0;
}

.process-steps > li {
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr);
    column-gap: .75rem;
    position: relative;
    padding-bottom: 1rem;
}

.process-steps > li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: calc(.875rem - .5px);
    top: 2rem;
    bottom: .25rem;
    width: 1px;
    background-color: var(--bs-border-color);
}

.process-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background-color: var(--process-step-bg);
    color: var(--process-step-color);
    font-size: .875rem;
}

/* state of a step after the request is started (owner_change_started.tpl) */
.process-step-number.process-step-done,
.process-result-icon {
    background-color: #d1e7dd; /* Bootstrap alert-success */
    color: #0f5132;
}

.process-step-number.process-step-waiting {
    background-color: transparent;
    border: 1px solid var(--bs-border-color);
    color: var(--text-muted-color);
}

.process-result-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
}

.process-step-title {
    line-height: 1.75rem;
}

/* ID of an existing contact: a short number does not need the whole card width; on a phone over the whole width
   (w-100 in the templates), the return button under it with Bootstrap flex utilities */
@media (min-width: 576px) {
    .contact-id-group {
        max-width: 20rem;
    }
}

/* amount of a partial bill (bills.tpl): an amount does not need the rest of the row */
.bill-amount-group {
    max-width: 10rem;
}

/* note of a registrar with test bills under the issuing button (bills.tpl): two short lines, so the column of the
   button does not take the width of the amounts */
.bill-test-note {
    max-width: 20rem;
}

/* footer with Spremi of the bill list (bills.tpl): while the paid state of a bill is changed and not saved it stays at
   the bottom of the screen, with a shadow only while it covers the list (registrar.init.bill_form) */
.bill-save-bar-sticky {
    position: sticky;
    bottom: 0;
    z-index: 1020;
}

.bill-save-bar-sticky.bill-save-bar-stuck {
    box-shadow: 0 -.25rem .5rem rgba(var(--bs-black-rgb), .06);
}

/* change owner and enter contact ID buttons: one under the other on the left before they would wrap
   to the opposite sides (both are about 20rem wide), like the documents and links of the domain edit */
@container (max-width: 24rem) {
    .contact-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-buttons > .ms-auto {
        margin-left: 0 !important;
    }
}

/* holder type and OIB in one row only while the OIB cell has room for 15 digits next to the button */
.contact-fields {
    container-type: inline-size;
}

@container (max-width: 46rem) {
    .contact-fields > .contact-field-oib {
        grid-column: 1 / -1;
    }
}

/* without OIB (holder outside Croatia, hidden by JS) the holder type takes the whole row, no empty cell next to it */
.contact-fields:has(> [id$="_mb_container"][style*="display: none"]) > .contact-field-oib {
    grid-column: 1 / -1;
}

/* link that opens a collapsed part (registration step 1 rules): the chevron points up while it is open */
.collapse-toggle .lucide-chevron-down {
    transition: transform .2s;
}

.collapse-toggle[aria-expanded="true"] .lucide-chevron-down {
    transform: rotate(180deg);
}

/* notices page: the whole row of a topic is its link, aligned with the padding of the card; the text of a topic
   (HTML from the lang files) is in the text colour, is not stretched over the card and its long links wrap */
.notice-topic-link,
.notice-text {
    padding-inline: var(--bs-card-spacer-x);
}

.notice-topic-link:hover {
    background-color: var(--bs-light);
}

.notice-text {
    max-width: 50rem;
    color: var(--bs-body-color);
}

.notice-text > :last-child {
    margin-bottom: 0;
}

.notice-text li + li {
    margin-top: .25rem;
}

.notice-text a {
    overflow-wrap: anywhere;
}

/* the chips of the set options are hidden while the options themselves are open */
.card:has(#search_options.show, #search_options.collapsing) .search-chips {
    display: none !important;
}

/* domain search options (search_filter.tpl): condition in front of a field (before / after, contact role) does not take
   the field's place, a dropdown with checkboxes (registrar, domain type) scrolls when the list is long */
.search-condition {
    max-width: 110px;
    flex-shrink: 0;
}

.checkbox-filter-menu {
    max-height: 20rem;
    overflow-y: auto;
}

/* on a phone a condition in front of a field (date, contact ID, e-mail) goes above the field while the field is too narrow
   for a date period next to it (19.5rem, a phone up to about 400 px), joined with the field; on a wider screen it stays in
   front also in a narrower field (about 300 px from 992 px, next to the side menu), which is no phone layout. The corners
   and the overlap of the field need !important against the very specific input-group selectors of Bootstrap */
.input-group:has(> .search-condition) {
    container-type: inline-size;
}

@media (max-width: 575.98px) {
    @container (max-width: 19.5rem) {
        .input-group > .search-condition {
            max-width: none;
            width: 100%;
            border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0 !important;
        }

        .input-group > .search-condition + .form-floating {
            margin-left: 0 !important;
            margin-top: calc(var(--bs-border-width) * -1);
        }

        .input-group > .search-condition + .form-floating > .form-control {
            border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
        }
    }
}

/* button with an icon before the text (registration step 2 add buttons): the icon centered with the text;
   no d-inline-flex, its !important would override the inline display:none of the buttons JS hides */
.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

/* full width button with an icon before the text: the text in the middle and the icon hangs left of it,
   the negative margin is the icon width and its spacing (22px + me-1, 16px + the gap of btn-with-icon) */
.btn.w-100 > svg.lucide:first-child {
    margin-left: -1.625rem;
}

.btn.w-100.btn-with-icon > svg.lucide:first-child {
    margin-left: -1.25rem;
}

/* domain edit, transfer request, request confirmation: in a narrow holder card the verification badge
   and its button go under the title */
.contact-switch-card {
    container-type: inline-size;
}

@container (max-width: 40rem) {
    .contact-switch-card > .card-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
}

/* the administrative and the technical person in one card (edit_domain_contacts_all.tpl, register_domain/edit_domain_contacts_all.tpl,
   end_user/admin_tech_contacts.tpl): the "same as" switches in one column right of the titles, the contact fields across the card;
   in a narrow card one column, the switches under the title */
.contacts-card {
    container-type: inline-size;
}

.contacts-card-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: .5rem;
    align-items: start;
}

.contacts-card-full {
    grid-column: 1 / -1;
}

/* the space above the contact fields without !important (unlike pt-3), so the slide animates it with the height */
.contacts-card-contact {
    padding-top: 1rem;
}

/* the contact ID right of the role title; under the title for both roles from the card width
   at which the longer title (administrative person) has no room for it */
.contacts-card-id {
    margin-left: .5rem;
}

@container (max-width: 34rem) {
    .contacts-card-id {
        display: block;
        margin-left: 0;
    }
}

@container (max-width: 32rem) {
    .contacts-card-grid {
        grid-template-columns: 1fr;
    }

    .contacts-card-switch {
        margin-top: .5rem;
    }
}

/* registration step 2: hint under the empty DNS records, hidden while there is a record
   (:has, deleting a record leaves a text node, so :empty does not work) */
#record_container:has(> *) + .dns-records-empty {
    display: none;
}

/* domain edit: on a narrower screen the summary, the form and at the end the documents with links;
   from xxl the form and under it the documents with links on the left, the sticky summary on the right
   (2:1 like col-xl-8 / col-xl-4 of registration step 2; from xl the summary next to the sidebar was so narrow
   that its rows wrapped and it got its own scrollbar on a usual window height) */
.domain-edit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "summary" "main" "links";
}

.domain-edit-summary { grid-area: summary; }
.domain-edit-main { grid-area: main; }
.domain-edit-links { grid-area: links; }

@media (min-width: 1400px) {
    .domain-edit-layout {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        grid-template-areas: "main summary" "links summary";
        column-gap: 1.5rem;
        align-items: start;
    }

    /* the summary over the whole height of the right column stays in sight while the form scrolls,
       like on registration step 2 (sticky-sidebar) */
    .domain-edit-summary {
        position: sticky;
        top: 1rem;
        /* on a low window (the delete options opened) it scrolls by itself instead of being cut off at the bottom */
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

/* domains of a contact (contact edit): an administrative contact of a registrar can be on a thousand domains,
   the list scrolls inside the card instead of making the page that long */
.contact-domains {
    max-height: 30rem;
    overflow-y: auto;
}

/* domain edit documents and links: in all rows the buttons under the label on the left, from 30rem on the right
   of the label; 30rem fits the longest label (enduser_access_link_label, about 14rem) next to the longest group
   of buttons (changed_name and deleted_user, about 15rem), so no row wraps on its own */
.domain-links {
    container-type: inline-size;
}

.domain-links-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
}

.domain-links-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

@container (min-width: 30rem) {
    .domain-links-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* domain edit summary: data and actions in two columns while the summary is over the whole width above the form */
@media (min-width: 768px) and (max-width: 1399.98px) {
    .domain-summary:has(> .domain-summary-actions) {   /* without the actions (edit_domain_info.tpl) the data over the whole width */
        display: grid;
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
        column-gap: 1.5rem;
    }

    .domain-summary-actions {
        border-left: 1px solid var(--bs-border-color);
        padding-left: 1.5rem;
    }
}

/* content of overview pages (registrar/show, user/show) is not stretched over wide screens, centered with empty sides */
.page-content-limited {
    max-width: 1600px;
    margin-inline: auto;
}

/* tool and settings pages (bulk NS change, application settings): full width on a laptop, but not stretched on a
   large screen, aligned with the page title */
.page-content-tool {
    max-width: 1200px;
}

/* user profile fields: one column with a line between fields, from xl two columns of three fields
   (profile-fields-2, when the card is full width) */
.profile-fields {
    display: grid;
    column-gap: 2rem;
}

.profile-fields > div {
    border-bottom: var(--bs-border-width) solid var(--bs-border-color);
}

.profile-fields > div:last-child {
    border-bottom: 0;
}

@media (min-width: 1200px) {
    .profile-fields-2 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(3, auto);
        grid-auto-flow: column;
    }

    .profile-fields-2 > div:nth-child(3) {
        border-bottom: 0;
    }
}

/* record type badge in the DNS records history changes, a bit darker border than the default one */
.history-record-type {
    --bs-border-color: var(--bs-gray-400);
}

/* domain edit, other DNS records: type badges of the same width, the long content (SOA, TXT) wraps
   instead of widening the row */
.dns-record-type {
    min-width: 3rem;
}

.dns-record-other-data {
    min-width: 0;
}

/* type badge of an editable record (NS, DS) level with the middle of its first floating field (the delete button has mt-3) */
.dns-record-type-field {
    margin-top: 1.1rem;
}

/* on a phone the type badge of NS and DS records above the fields, so the fields get the whole width;
   the right margin of 100% puts the badge on its own line of the wrapping row */
@media (max-width: 575.98px) {
    .dns-record-row {
        flex-wrap: wrap;
        row-gap: .5rem !important;
    }

    .dns-record-row > .dns-record-type {
        margin-top: 0;
        margin-right: 100%;
    }
}

/* error page: icon in a light circle of the same color (no bg-*-subtle in Bootstrap 5.2) */
.error-page-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
}

.error-page-icon-warning {
    background-color: rgba(var(--bs-warning-rgb), 0.15);
}

.error-page-icon-danger {
    background-color: rgba(var(--bs-danger-rgb), 0.12);
}

/* domain limits (owner_type_domain_limit.tpl): -1 (no limit) lighter than text-muted, which is almost the color of
   the other numbers in the fields; the fields of the same width */
.limit-unlimited {
    color: #adb5bd;
}

.limit-input {
    width: 4.5rem;
}

.btn-sm,
.btn-group-sm > .btn {
    --bs-btn-border-radius: var(--bs-border-radius);
}
