/* --- Common --- */
section.common.calc
{
    --flex-gap:2rem;
    --flex-gap-s:1rem;
    --flex-gap-l:5rem;

    color:var(--light-black);
}
section.common.calc.no-padding-top
{
    padding-top:0;
}

section.common.calc .calc_cols>:is(form,.tabs)
{
    flex:3 1 52em;
}

section.common.calc .results, /*TODO: Legacy.*/
section.common.calc .display
{
    flex:1 0 24rem;
    position:sticky;
    top:var(--flex-gap);
    color:var(--light-black);
}

section.common.calc .results h2, /*TODO: Legacy.*/
section.common.calc .display h2
{
    font-size:2.5rem;
    color:var(--blue);
}

section.common.calc .results, /*TODO: Legacy.*/
section.common.calc :is(form>.group,.display)
{
    padding:4.5rem 5rem;
    border-radius:1rem;
    background:none #FFFFFF;
    box-shadow:0px 0px 40px rgba(0, 0, 0, 0.1);
}

section.common.calc form>.group>.flex.gap_s
{
   row-gap:2em;
}

section.common.calc .results>.submit,
section.common.calc :is(form>.group,.display)>.submit
{
    flex:1 1 100%;
    margin-top:4rem;
}

section.common.calc form>.group h3
{
    flex:1 1 100%;
    font-size:2rem;
    font-weight:800;
    color:var(--blue);
    margin-bottom:1em;
}

@media (max-width:540px)
{
    section.common.calc .results>.group,   /*TODO: Legacy.*/
    section.common.calc form>.group
    {
        padding:2rem 2.5rem;
    }
}

/* --- Inputs --- */
section.common.calc form :is(.group,.sub_group).flex>.full
{
    flex:4 1 100%;
}
form section.common.calc :is(.group>.flex,.sub_group.flex)>.third,
section.common.calc form :is(.group>.flex,.sub_group.flex)>.third,
section.common.calc form :is(.group,.sub_group).flex>.third
{
    flex:2 1 21rem;
}
form section.common.calc :is(.group>.flex,.sub_group.flex)>.half,
section.common.calc form :is(.group>.flex,.sub_group.flex)>.half,
section.common.calc form :is(.group,.sub_group).flex>.half
{
    flex:2 1 34rem;
}

/* --- Results --- */
section.common.calc .results, /*TODO: Legacy.*/
section.common.calc .display
{
    font-size:1.4rem;
    font-weight:500;
}

section.common.calc .display .monitors
{
    gap:var(--flex-gap-s);
    font-size:1.4rem;
    font-weight:500;
}

section.common.calc .display .monitors>.group:not(:last-child)
{
   padding-bottom:var(--flex-gap-s);
   border-bottom:1px solid var(--light-grey);
}

section.common.calc .results h2, /*TODO: Legacy.*/
section.common.calc .display h2
{
    color:var(--blue);
}

section.common.calc .results h3, /*TODO: Legacy.*/
section.common.calc .display .monitors>.group h3
{
    font-size:1.7rem;
    font-weight:700;
    color:var(--blue);
    margin-bottom:1rem;
}

section.common.calc .results ul>li /*TODO: Legacy.*/
{
    list-style:none;
    padding:0;
    background:none transparent;
    margin-bottom:0.1rem;
}
section.common.calc .display .monitors>.group ul>li.item
{
    display:grid;
    gap:calc(var(--flex-gap-s)/2) var(--flex-gap-s);
    grid-template:'c s v u'/auto minmax(1em,1fr) auto auto;
    align-items:flex-start;
    list-style:none;
    padding:0;
    background:none transparent;
    margin-bottom:0.1rem;
}

section.common.calc .display .monitors>.group ul>li.item>.caption
{
   grid-area:c;
}

section.common.calc .display .monitors>.group ul>li.item::after
{
   grid-area:s;
   content:'';
   display:inline-block;
   height:0.9em;
   border-bottom:1px solid var(--light-grey);
}

section.common.calc .display .monitors>.group ul>li.item>.value
{
   grid-area:v;
}

section.common.calc .display .monitors>.group ul>li.item>.unit
{
   grid-area:u;
}

section.common.calc .results hr
{
    display:block;
    margin:2rem 0;
    border-bottom:1px solid #DDDDDD;
}

section.common.calc .results .route .sender::before,
section.common.calc .results .route .consignee::before
{
    display:flex;
    justify-content:center;
    align-items:center;
    width:2.5rem;
    height:2.5rem;
    margin-right:0.8rem;
    color:#FFFFFF;
    border-radius:50%;
    background:none var(--blue);
}
section.common.calc .results .route .sender::before
{
    content:'А';
}
section.common.calc .results .route .consignee::before
{
    content:'Б';
}

section.common.calc .results .route .spacer
{
    height:2rem;
    margin:0.5rem 0;
    background:url('/app/themes/fmlogistics/dist/images/delivery_calc/arrow_down.svg') 0.6rem center/contain no-repeat transparent;
}

section.common.calc .results ul.order_summary>li,
section.common.calc .results ul.order_misc>li
{
    margin-bottom:1.2rem;
}
section.common.calc .results ul.order_misc>li
{
    font-size:0.9em;
}

section.common.calc .results ul.order_summary .spacer,
section.common.calc .results ul.order_misc .spacer
{
    flex:1 0 0.5rem;
    border-bottom:1px solid #DDDDDD;
    margin:0.2rem 1rem;
}

section.common.calc .results ul.order_summary .value,
section.common.calc .results ul.order_summary .total .caption
{
    font-weight:700;
}

section.common.calc .results ul.order_summary .unit,
section.common.calc .results ul.order_misc .unit
{
    font-size:0.8em;
}
section.common.calc .results ul.order_summary .unit:not(:empty),
section.common.calc .results ul.order_misc .unit:not(:empty)
{
    margin-left:0.4em;
}

section.common.calc .results .disclaimer
{
    font-size:1.2rem;
    font-weight:700;
    color:#BBBBBB;
}

section.common.calc .results .disclaimer p
{
    margin-bottom:0.5em;
}

section.common.calc .results .disclaimer ul>li
{
    padding-left:1.3em;
    background:var(--li-marker-grey) 0 0.3em/auto 0.8em no-repeat transparent;
}

/* --- Request result --- */
section.common.calc.req_res h2
{
    font-size:4.5rem;
    color:#00c036;
}
section.common.calc.req_res.warning h2
{
    color:#DF7F00;
}
section.common.calc.req_res.error h2
{
    color:#CF2C00;
}

section.common.calc.req_res p
{
    font-size:2rem;
}

/* --- Dialogs --- */
.popup .window.email_verification
{
    flex-basis:50rem;
}

.popup .window.email_verification form .flex
{
    justify-content:center;
}

.popup .window.email_verification form .flex>p
{
    font-size:1.5rem;
    font-weight:600;
    line-height:1;
}

.popup .window.email_verification form .flex>button.resend
{
    padding:0.5em 1.2em;
}

.popup .window.email_verification form .flex>.code>input
{
    font-size:5rem;
    padding:0.5em;
    text-align:center;
}

/* --- Calc Spoiler --- */
section.calc_spoiler:not(.padded)
{
    padding:0;
}

section.calc_spoiler>.container
{
    height:0;
    display:flex;
    flex-flow:row nowrap;
    align-items:center;
}
section.calc_spoiler.no_overlap>.container
{
    height:auto;
}
.block-key-numbers+section.calc_spoiler.no_overlap:is(.green,.blue,.grey)
{
    margin-top:-5em;
}
section.calc_spoiler.no_overlap:is(.green,.blue,.grey):has(+section.common.calc:is(.green,.blue,.grey))
{
    padding:4em 0;
}

section.calc_spoiler.no_overlap:is(.green,.blue,.grey) h2
{
    color:var(--blue);
}

section.calc_spoiler.no_overlap+section.calc:not(.hidden)
{
    margin-top:-7em;
}
section.calc_spoiler.no_overlap:is(.green,.blue,.grey)+section.calc:not(.hidden)
{
    margin-top:-11em;
    padding-top:calc(var(--section-vert-margin) + 2em);
}

section.calc_spoiler>.container>.inner
{
    flex:1 1 auto;
    padding:3.5rem 4rem;
    color:var(--light-black);
    border-radius:3rem;
    background:none calc(100% - 3rem) center/min(8rem,13.5%) auto no-repeat #FFFFFF;
    box-shadow:0 0 4px #00000080;
}

section.calc_spoiler>.container>.inner .wp-block-columns
{
    margin-bottom:0;
    flex:1 1 auto;
}

section.calc_spoiler>.container>.inner .wp-block-columns>.block-core--column.col_text
{
    flex:1 1 37em;
}

section.calc_spoiler>.container>.inner .wp-block-columns>.block-core--column.col_buttons
{
    flex:1 1 10em;
    margin-right:min(12rem,15%);
}

section.calc_spoiler>.container>.inner h2
{
    margin-bottom:0.5em;
    margin-bottom:0;
    font-size:3.5rem;
}
section.calc_spoiler>.container>.inner .block-core--heading:not(:only-child)>h2
{
    margin-bottom:0.5em;
}

section.calc_spoiler.opened>.container>.inner .wp-block-button.spoiler_wp_btn.spoiler_open,
section.calc_spoiler.closed>.container>.inner .wp-block-button.spoiler_wp_btn.spoiler_close
{
    display:none;
}

@media (min-width:500px)
{
    section.calc_spoiler>.container>.inner a.wp-block-button__link
    {
        white-space:nowrap;
    }
}
@media (max-width:870px)
{
    section.calc_spoiler>.container>.inner
    {
        background-position-y:calc(100% - 3rem);
    }
}
@media (max-width:600px)
{
    section.ltl.advantages   /*Adjust prev section.*/
    {
        padding-bottom:13rem;
    }

    section.calc_spoiler>.container>.inner
    {
        padding: 1.5rem 2rem;
        background-position:calc(100% - 2rem) calc(100% - 2rem);
    }
}
@media (max-width:480px)
{
    section.calc_spoiler>.container>.inner h2
    {
        font-size:2rem;
    }

    section.calc_spoiler>.container>.inner a.wp-block-button__link
    {
        font-size:1.2rem;
        padding:1.6rem 2rem;
    }
}
@media (max-width:435px)
{
    section.calc_spoiler>.container>.inner
    {
        background:none #FFFFFF!important;
    }
    section.calc_spoiler>.container>.inner .wp-block-columns>.block-core--column.col_buttons
    {
        margin-right:0;
    }

    section.calc_spoiler>.container>.inner a.wp-block-button__link
    {
        /*padding:1rem 2rem;*/
    }
}