/* 
----------------------------------------
        STYLING OF FDF PARAMETERS
---------------------------------------- 

This file contains all the styles to make fdf parameters look "good".

As a reminder, the structure of a fdf parameter is as follows:

<div class="fdfentrycontainer fdfentry-<type>">
    <div class="labelcontainer" id="fdfparam:Parameter name"></div>
    <div class="fdfparamtype">
        <p>Type</p>
    </div>
    <div class="fdfentryheader">
        <div class="fdfparamname">
            <p>Name</p>
        </div>
        <div class="fdfparamdefault">
            <p>Default</p>
        </div>
    </div>
    <div class="fdfentrycontainerbody">
        Whatever
    </div>
</div>

where in the class fdfentry-<type> <type> is replaced by the type of the parameter.

The .fdfentrycontainerbody div might contain fdf options, which have the following structure:

<div class="fdfoptionscontainer">
    <div class="optioncontainer">
        Option 1
    </div>
    <p>Description of option 1</p>
    <div class="optioncontainer">
        Option 2
    </div>
    <p>Description of option 2</p>
</div>

*/

/* External container */
.fdfentrycontainer{
    background-color: white;
    padding: 10px;
    margin: 10px 0px;
    border: solid 2px rgb(196, 196, 196);
    border-radius: 5px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0, 0.2);
    transition: 0.3s;
}

/* External container when mouse is over it */
.fdfentrycontainer:hover{
    background-color: whitesmoke;
}

/* This is the (invisible) label of the fdf parameter.
When a user clicks on a link to this fdf parameter, we want the
page to go 20px above the position of the label so that the full
fdf parameter is visible. */
.fdfentrycontainer > .labelcontainer:first-child{
    scroll-margin-top: 20px;
}

/* Container containing name and default value*/
.fdfentryheader{
    display: flex;
    border-bottom: solid 1px lightgray;
    margin-bottom: 10px
}
 
/* Text lines */
.fdfentrycontainer p{
    margin: 0
}

/* Container for the parameter type */
.fdfparamtype{
    text-transform: uppercase;
    font-weight: bold
}

/* Container for the parameter name */
.fdfparamname{
    padding-right: 20px;
    font-weight: bold;
}

/* Container for the default value */
.fdfparamdefault{
    padding-right: 20px;
}

/* Container for the body (description) of the fdf parameter */
.fdfentrycontainerbody p{
    margin-bottom: 5px;
    text-align: justify;
    text-justify: inter-word;
}

/* Code blocks inside the body of the fdf parameter */
.fdfentrycontainerbody div[class^=highlight]{
    margin: 10px 0;
    background-color: whitesmoke;
}

/* Container for a group of fdf options */
.fdfoptionscontainer{
    margin: 15px 0px 15px 5px;
    padding-left: 10px;
    border-left: solid 2px;
}

/* Container for a single fdf option */
.fdfoptionscontainer .optioncontainer{
    font-weight: bold;
    border-bottom: solid 2px;
    margin-bottom: 5px
}

.fdfoptionscontainer .optioncontainer p{
    margin-bottom: 0
}

/* ----------------------------------------
   Styles for different fdf parameter types 
-------------------------------------------  */

/* STRING */
.fdfentry-string{
    border-color: rgb(93, 139, 64);
    box-shadow: 0 4px 8px 0 rgba(93, 139, 64, 0.2);
}
 
.fdfentry-string > .fdfentryheader{
    border-bottom-color: rgb(93, 139, 64)
}
 
.fdfentry-string > .fdfparamtype{
    color: rgb(93, 139, 64);
}

/* INTEGER, REAL */
.fdfentry-integer, .fdfentry-real{
    border-color: rgb(255, 186, 24);
    box-shadow: 0 4px 8px 0 rgba(255, 186, 24, 0.2);
}
 
:is(.fdfentry-integer, .fdfentry-real) > .fdfentryheader{
    border-bottom-color: rgb(255, 186, 24)
}

:is(.fdfentry-integer, .fdfentry-real) > .fdfparamtype{
    color: rgb(255, 186, 24);
}

/* LOGICAL */
.fdfentry-logical{
    border-color: rgb(84, 161, 202);
    box-shadow: 0 4px 8px 0 rgba(84, 161, 202, 0.2);
}
 
.fdfentry-logical > .fdfentryheader{
    border-bottom-color: rgb(84, 161, 202)
}

.fdfentry-logical > .fdfparamtype{
    color: rgb(84, 161, 202);
}

/* ENERGY, FORCE, TORQUE, LENGTH, PRESSURE, ANGLE, TIME */
.fdfentry-energy, .fdfentry-force, .fdfentry-torque, .fdfentry-length, .fdfentry-pressure, .fdfentry-angle, .fdfentry-time {
    border-color: rgb(250, 128, 114);
    box-shadow: 0 4px 8px 0 rgba(250, 128, 114, 0.2);
}
 
:is(.fdfentry-energy, .fdfentry-force, .fdfentry-torque, .fdfentry-length, .fdfentry-pressure, .fdfentry-angle, .fdfentry-time) > .fdfentryheader{
    border-bottom-color: rgb(250, 128, 114)
}

:is(.fdfentry-energy, .fdfentry-force, .fdfentry-torque, .fdfentry-length, .fdfentry-pressure, .fdfentry-angle, .fdfentry-time) > .fdfparamtype{
    color: rgb(250, 128, 114);
}