/* --- Header --- */
.page-header-simple .text-content>.container
{
    display:grid;
    grid-template:'bc bc' auto 'ti fb' auto 'ex fb' 1fr/1fr minmax(20em,53em);
    gap:var(--flex-gap);
}

.page-header-simple .text-content>.container>.breadcrumbs
{
    grid-area:bc;
}

.page-header-simple .text-content>.container>.title
{
    grid-area:ti;
    width:auto;
}

.page-header-simple .text-content>.container>.excerpt
{
    grid-area:ex;
    width:auto;
}

/* Header form */
.page-header-simple .text-content>.container dialog
{
    grid-area:fb;
    padding:3em 2.5em;
    font-size:1.2rem;
    font-weight:700;
    border-radius:2em;
    background:none #FFFFFF;
    box-shadow:var(--block-shadow);
}

.page-header-simple .text-content>.container dialog:not(:modal)>.titlebar>.title
{
    margin-left:0;
    font-size:2.08em;
    line-height:1;
    color:var(--blue);
}

.page-header-simple .text-content>.container form .sub_title  /*TODO: Fix it in JS.*/
{
    font-size:1.166em;
    font-weight:700;
    color:var(--blue);
}

.page-header-simple .text-content>.container dialog:not(:modal) form label
{
    flex:1 1 10em;
    gap:0.5rem;
}

.page-header-simple .text-content>.container dialog:not(:modal) form label>.caption
{
   font-size:1rem;
   text-transform:uppercase;
   color:#888;
}

.page-header-simple .text-content>.container dialog:not(:modal) form label>:is(select,textarea,input:not([type="button"]):not([type="submit"]))
{
   font-size:1.2em;
   padding:1em 1.1em;
   border-radius:0.5em;
   border:1px solid #DDE4F0;
   background:none #F5F7FC;
   outline:none;
   transition:border-color 0.2s;
}
.page-header-simple .text-content>.container dialog:not(:modal) form label>:is(select,textarea,input:not([type="button"]):not([type="submit"])):focus
{
   border-color:var(--blue);
}

/* checkboxes */
.page-header-simple .text-content>.container dialog:not(:modal) form label:is(.checkbox,.radio)
{
   display:flex;
   flex-flow:row nowrap;
   align-items:center;
   vertical-align:baseline/*bottom*/;
   margin:0.1em 0.25em;
}
.page-header-simple .text-content>.container dialog:not(:modal) form label:is(.checkbox,.radio):before
{
   content:'';
   vertical-align:middle/*baseline*/;
   height:calc(2.5rem + 2px); /* equals to tool button sizes */
   width:calc(2.5rem + 2px);
   flex:0 0 calc(2.5rem + 2px); /*For flex layout.*/
   margin-right:0.8rem;
   background:none 0 0/200% 200% no-repeat transparent;

}
.page-header-simple .text-content>.container dialog:not(:modal) form label:is(.checkbox,.radio).checked:before
{
   background-position-y:100%;
}
.page-header-simple .text-content>.container dialog:not(:modal) form label:is(.checkbox,.radio).focused:before
{
   background-position-x:100%;
}
.page-header-simple .text-content>.container dialog:not(:modal) form label.checkbox:before {background-image:url('/app/themes/fmlogistics/dist/images/delivery_calc/checkbox.svg');}
.page-header-simple .text-content>.container dialog:not(:modal) form label.radio:before    {background-image:url('/app/themes/fmlogistics/dist/images/delivery_calc/radio.svg');}

.page-header-simple .text-content>.container dialog:not(:modal) form label.checkbox>:is(input[type='checkbox'],input[type='radio'])
{
   display:inline/*inline-block*/;
   height:1em/*calc(2em + 2px)*/; /* equals to tool button sizes */
   width:calc(2em + 2px);
   margin:0;
   margin-left:calc(-2em - 2px);
   padding:0;
   opacity:0;
}

.page-header-simple .text-content>.container dialog:not(:modal) form label.checkbox.agreement
{
    flex-basis:100%;
    margin-bottom:1.5em;
}

.page-header-simple .text-content>.container dialog:not(:modal) form label.checkbox.agreement>.caption
{
    text-transform:none;
}

.page-header-simple .text-content>.container dialog:not(:modal) form .captcha
{
   flex:1 1 100%;
   margin-bottom:1rem;
}

.page-header-simple .text-content>.container dialog:not(:modal) form button[type='submit'].cta
{
   flex:1 1 100%;
   border-radius:0.6rem;
   background-color:#0f2d75;
}
.page-header-simple .text-content>.container dialog:not(:modal) form button[type='submit'].cta:hover
{
   color:#FFFFFF;
}

@media (max-width:800px)
{
    .page-header-simple .text-content>.container
    {
        grid-template:'bc' 'ti' 'ex' 'fb'/1fr;
    }

    .page-header-simple .text-content>.container>.breadcrumbs,
    .page-header-simple .text-content>.container>.title,
    .page-header-simple .text-content>.container>.excerpt
    {
        margin-left:0;
    }
}

/* --- Common --- */
section.common h2
{
   font-size:2.2rem;
}

/* --- Key Numbers --- */
.block-key-numbers.railroads .key-number
{
   padding:3rem;
}

.block-key-numbers.railroads .key-number>.number
{
   margin-bottom:0.3em;
   text-align:center;
   font-size:2.8rem;
   font-weight:900;
   line-height:1;
}

.block-key-numbers.railroads .key-number>.text
{
   text-align:center;
   font-size:1.1rem;
   font-weight:600;
   text-transform:uppercase;
   letter-spacing:0.08em;
   color:var(--light-black);
}

/* --- Advantages --- */
section.common.advantages .wp-block-acf-image-title-text
{
   grid-template-columns:repeat(auto-fit,minmax(45em,1fr));
}

section.common.advantages .wp-block-acf-image-title-text>.item
{
   grid-template:"h" auto "t" 1fr/1fr;
   gap:1.2rem;
   padding:var(--block-padding-nested);
   border-radius:var(--block-radius-nested);
   border:1px solid #E0E8F5;
   transition:box-shadow 0.2s;
}
section.common.advantages .wp-block-acf-image-title-text>.item:hover
{
   box-shadow:0 4px 20px rgba(23,65,148,0.1);
}

section.common.advantages .wp-block-acf-image-title-text>.item>.img
{
   display:none;
}

section.common.advantages .wp-block-acf-image-title-text>.item>.header
{
   margin-bottom:0;
   font-size:1.6rem;
   font-weight:700;
   color:var(--blue);
}

section.common.advantages .wp-block-acf-image-title-text>.item>.text
{
   font-size:1.5rem;
   line-height:1.6;
   color:var(--light-black);
}

section.common.advantages .block-core--group.note
{
   padding:var(--block-padding-nested);
   border-radius:var(--block-radius-nested);
   border-left:4px solid var(--green);
   background:none #F5F7FC;
}

section.common.advantages .block-core--group.note .block-core--paragraph>p
{
   font-size:1.6rem;
   line-height:1.7;
   color:var(--light-black);
}
section.common.advantages .block-core--group.note .block-core--paragraph:last-child>p
{
   margin-bottom:0;
}

/* --- Wares --- */
section.common .wares
{
    overflow:visible;
}

section.common .wares
{
    grid-template-columns:repeat(auto-fit,minmax(24em,1fr));
}

section.common .wares>.item
{
    position:relative;
    display:flex;
    flex-flow:row nowrap;
    align-items:center;
    overflow:visible;
    padding:1.5rem 1.8rem;
    gap:var(--flex-gap-s);
    border-radius:3rem;
    background-color:#FFFFFF;
    box-shadow:0px 4px 4px 0px #00000040;
}
section.common .wares>.item:only-child
{
    max-width:max-content;
}
section.common .wares>.item.active
{
    box-shadow:0px 4px 4px 0px var(--green);
    cursor:pointer;
}
section.common .wares.alt>.item
{
    box-shadow:0px 0px 5px 0px #00000040;
}
section.common .wares.alt>.item.active
{
    box-shadow:0px 0px 5px 0px var(--green);
}

section.common .wares>.item>.img
{
    flex:0 0 4.5rem;
    height:4.5rem;
    background:none center/contain no-repeat transparent;
}

section.common .wares>.item>h3
{
    margin-bottom:0;
    font-size:1.7rem;
    font-weight:700;
    color:var(--blue);
}
section.common .wares.alt>.item>h3
{
    color:#000000;
}

section.common .wares>.item>.text
{
    position:absolute;
    top:-0.5em;
    right:-0.5em;
    overflow:visible;
}
section.common .wares>.item>.text:empty
{
    display:none;
}

section.common .wares>.item>.text::before
{
    content:'i';
    display:inline-block;
    position:absolute;
    top:0;
    right:0;
    width:1.6em;
    height:1.6em;
    margin-bottom:1em;
    padding:0.3em 0 0 0.7em;
    vertical-align:bottom;
    font-size:2rem;
    line-height:1;
    font-weight:700;
    text-transform:lowercase;
    color:#FFFFFF;
    border-radius:50%;
    background:none var(--blue);
    box-shadow:2px 2px 8px #00000080;
}

section.common .wares>.item>.text>p
{
    position:sticky;
    bottom:0;
    left:0;
    left:0;
    right:0;
    min-width:20em;
    max-width:90vw;
    padding:1.6em 2em;
    font-size:1.4rem;
    line-height:1.2;
    font-weight:normal;
    text-transform:none;
    white-space:normal;
    color:var(--light-black);
    border-radius:1em;
    background:none #FFFFFF;
    box-shadow:5px 5px 15px rgba(0, 0, 0, 0.15);
    z-index:5;
}
section.common .wares>.item>.text:not(:hover)>p
{
    display:none;
}
section.common .wares>.item>.text>p a
{
    color:var(--blue);
    text-decoration:underline;
    text-decoration-color:var(--blue-underline);
}

@media (max-width:500px)
{
    section.common .wares
    {
        grid-template-columns:1fr;
    }
}

/* --- Why --- */
section.common.why ul>li
{
   font-size:1.5rem;
   background-size:0.7em auto;
   background-position-y:0.4em;
}

/* --- Services --- */
section.common.services .wp-block-acf-image-title-text
{
   grid-template-columns:repeat(auto-fit,minmax(23em,1fr));
}

section.common.services .wp-block-acf-image-title-text>.item
{
   grid-template:"i" auto "h" auto "t" 1fr/1fr;
   gap:1.2rem;
   padding:var(--block-padding-nested);
   border-radius:var(--block-radius-nested);
   border:1px solid rgba(255,255,255,0.15);
   background:none rgba(255,255,255,0.08);
}

section.common.services .wp-block-acf-image-title-text>.item>.img
{
   width:4.6rem;
   height:4.6rem;
   border-radius:1rem;
   background:none center/50% auto no-repeat var(--green);
}

section.common.services .wp-block-acf-image-title-text>.item>.header
{
   margin-bottom:0;
   font-size:1.3rem;
   font-weight:700;
}

section.common.services .wp-block-acf-image-title-text>.item>.text
{
   font-size:1.2rem;
   line-height:1.6;
   color:rgba(255,255,255,0.72);
}

/* --- FAQ --- */
.block-faq.blanc .faq_wrapper ul li::before
{
   top:4.4rem;
   width:1em;
   height:1em;
}

.block-faq.blanc .faq_wrapper ul li .uk-accordion-title
{
   padding:3rem;
   font-size:1.4rem;
}
.block-faq.blanc .faq_wrapper ul li .uk-accordion-title::before,
.block-faq.blanc .faq_wrapper ul li .uk-accordion-title::after
{
   top:4.4rem;
   width:1em;
}

.block-faq.blanc .faq_wrapper ul li .uk-accordion-content
{
   padding:2.5rem 3rem;
   font-size:1.3rem;
}

.block-faq.blanc .faq_wrapper a.cta
{
   padding-top:1em;
   padding-bottom:1em;
}