/* ==========================================================================
   13_SNIPPETS AND HELPER CLASSES
   --------------------------------------------------------------------------
   * README

   * MODIFICATOR SUFFIX: --BOXED
   * MODIFICATOR SUFFIX: --HR-TOP
   * MODIFICATOR SUFFIX: --HR-BOTTOM
   * MODIFICATOR SUFFIX: --NARROW
   * MODIFICATOR SUFFIX: --NARROWER

   * HELPER CLASSES: CLEARING
   * HELPER CLASSES: MARGINS AND PADDINGS
   * HELPER CLASSES: VISIBILITY

   * TEXT: LINK LIKE
   * TEXT: ELLIPSIS
   * TEXT: PARAGRAPH

   * SNIPPET: COUNT
   * SNIPPET: PAGE BUSY
   * SNIPPET: PRELOADER
   * SNIPPET: POP-UP ON HOVER
   * SNIPPET: RATING STARS
   * SNIPPET: TOOLTIP
   * SNIPPET: VERTICAL CENTERING
   * SNIPPET: VIDEO EMBEDDING
   ========================================================================== */

/* README
   ========================================================================== */

/*!
 * X
 */

/* MODIFICATOR SUFFIX: --BOXED
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   --boxed modificator suffix > to add a solid box appareance to any element,
   usually a first level element (.section or .article) It does not include a
   padding, as it tends to not always be the same, so it's better to define it
   in every case.
   --------------------------------------------------------------------------

    <div class="X X--boxed"></div>

   -------------------------------------------------------------------------- */

/* Appearance
   -------------------------------------------------------------------------- */
[class*="--boxed"] {
    border-radius: 4px;
    border-width: 1px;
    border-style: solid;
    border-color: #CACACA; /* var(--color--borders) in an IE free world - use this comment as a handler for smart find & replace! */
    background-color: #FFFFFF;
}

/* MODIFICATOR SUFFIX: --HR-TOP
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   to add even space and a divisory line from the previous/next element
   --------------------------------------------------------------------------

    <div class="X X--hr-top"></div>

   -------------------------------------------------------------------------- */

/* Structure
   -------------------------------------------------------------------------- */
[class*="--hr-top"] {
    margin-top: 40px;
    padding-top: 40px;
}

/* Appearance
   -------------------------------------------------------------------------- */
[class*="--hr-top"] {
    border-top-width: 1px;
    border-top-style: solid;
    border-top-color: #CACACA; /* var(--color--borders) in an IE free world - use this comment as a handler for smart find & replace! */
}

/* MODIFICATOR SUFFIX: --HR-BOTTOM
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   to add even space and a divisory line from the previous/next element
   --------------------------------------------------------------------------

    <div class="X X--hr-bottom"></div>

   -------------------------------------------------------------------------- */

/* Structure
   -------------------------------------------------------------------------- */
[class*="--hr-bottom"] {
    margin-bottom: 40px;
    padding-bottom: 40px;
}

/* Appearance
   -------------------------------------------------------------------------- */
[class*="--hr-bottom"] {
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: #CACACA; /* var(--color--borders) in an IE free world - use this comment as a handler for smart find & replace! */
}

/* MODIFICATOR SUFFIX: --NARROW
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   to limit the width of any block element and center it in the available space.
   --------------------------------------------------------------------------

    <div class="X X--narrow"></div>

   -------------------------------------------------------------------------- */

/* Structure
   -------------------------------------------------------------------------- */
[class*="--narrow"] {
    margin-left: auto;
    margin-right: auto;
    max-width: 768px;
}

/* MODIFICATOR SUFFIX: --NARROWER
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   to limit the width of any block element and center it in the available space.
   --------------------------------------------------------------------------

    <div class="X X--narrower"></div>

   -------------------------------------------------------------------------- */

@media (min-width:769px) {

    /* Structure
       -------------------------------------------------------------------------- */
    [class*="--narrower"] {
        margin-left: auto;
        margin-right: auto;
        max-width: 340px;
    }
}

/* HELPER CLASSES: CLEARING
   ========================================================================== */

/* Behaviour
   -------------------------------------------------------------------------- */
.clear {
    clear: both;
}

/*
 * 1. The space content is one way to avoid an Opera bug when the
 * `contenteditable` attribute is included anywhere else in the document.
 * Otherwise it causes space to appear at the top and bottom of elements
 * that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 * `:before` to contain the top-margins of child elements.
 */
.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/* HELPER CLASSES: MARGINS AND PADDINGS
   ========================================================================== */

/* Structure
   -------------------------------------------------------------------------- */
.margin-t--10 {
    margin-top: 10px;
}

.padding-t--10 {
    padding-top: 10px;
}
.mLeft1 {
  margin-left: 1em !important;
}
.mLeft0 {
  margin-left: 0px !important;
}
.mRight0 {
  margin-right: 0px !important;
}
/* HELPER CLASSES: VISIBILITY
   ========================================================================== */

/* Behaviour
   -------------------------------------------------------------------------- */

/*
 * Hide/show visually and from screen readers
 */
.visibility--hidden {
    display: none !important;
}

.visibility--visible {
    display: block !important;
}

@media all and (min-width:769px) {
    .visibility--only-mobile {
        display: none !important;
    }

}

@media all and (max-width:768px) {
    .visibility--only-desktop {
        display: none !important;
    }

}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 * causes content to wrap 1 word per line:
 * https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */
.visibility--visually-hidden {
    border: 0;
    clip: rect(0 0 0 0);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap; /* 1 */
}

/*
 * Extends the .visuallyhidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */
.visibility--visually-hidden.focusable:active,
.visibility--visually-hidden.focusable:focus {
    clip: auto;
    -webkit-clip-path: none;
    clip-path: none;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
    white-space: inherit;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */
.visibility--invisible {
    visibility: hidden;
}

/* TEXT: LINK LIKE
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   Brief explanation.
   --------------------------------------------------------------------------

    <a class="link" href="X"></a>

   -------------------------------------------------------------------------- */

/* Behaviour
   -------------------------------------------------------------------------- */
.link {
    -webkit-transition: all 0.3s;
    -ms-transition: all 0.3s;
    transition: all 0.3s;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: transparent;
    text-decoration: none;
    color: #128474
}

.link:hover {
    border-bottom-color: inherit;
    color: #004750;
}

.footer .link:hover,
.footer .link:active,
.footer .link:visited,
.footer .link:focus {
    text-decoration: underline;
    border-bottom: none;
    color: inherit;
}

.link--secondary {
    -webkit-transition: all 0.3s;
    -ms-transition: all 0.3s;
    transition: all 0.3s;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: transparent;
    text-decoration: none;
    color: #717171;
    cursor: pointer;
}

.link--secondary:hover {
    border-bottom-color: inherit;
}

/* TEXT: ELLIPSIS
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   Brief explanation. Mention the width setting.
   --------------------------------------------------------------------------

    <span class="ellipsis"></span>

   -------------------------------------------------------------------------- */

/* Behaviour
   -------------------------------------------------------------------------- */
.ellipsis {
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* TEXT: PARAGRAPH
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   Brief explanation. Mention the reset.
   --------------------------------------------------------------------------

    <p class="paragraph"></p>

   -------------------------------------------------------------------------- */

/* Structure
   -------------------------------------------------------------------------- */
.paragraph {
    margin-bottom: 10px
}

.paragraph:last-child {
    margin-bottom: 0;
}

/* SNIPPET: COUNT
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   Brief explanation.
   --------------------------------------------------------------------------

    {% if X %}
        <span class="count">{{ X }}</span>
    {% endif %}

   -------------------------------------------------------------------------- */

/* Structure
   -------------------------------------------------------------------------- */
.count {
    padding: 3px 9px;
}

/* Behaviour
   -------------------------------------------------------------------------- */
.count {
    display: inline-block;
    vertical-align: top;
}

/* Appearance
   -------------------------------------------------------------------------- */
.count {
    border-radius: 12px;
    background-color: #26C59A; /* var(--color--site) in an IE free world - use this comment as a handler for smart find & replace! */
    font-size: 15px;
    font-weight: bold;
    color: #FFFFFF;
}

/* SNIPPET: PAGE BUSY
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   Brief explanation. Mention JS.
   --------------------------------------------------------------------------

    <body class="X tpt_pageBusy">
        [...]
    </body>

   -------------------------------------------------------------------------- */

/* Appearance
   -------------------------------------------------------------------------- */
.tpt_pageBusy,
.tpt_pageBusy input,
.tpt_pageBusy button,
.tpt_pageBusy a {
    cursor: wait;
}

/* SNIPPET: PRELOADER
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   Brief explanation. Clean JS.
   --------------------------------------------------------------------------

    <div class="will-load-content awaiting-content"></div>

    <script>
        tpt.queue.add(
            function () {
                "use strict";
                (function ($) {
                    $.get(
                        "{{ url|raw }}",
                        function (data) {
                            $('{{ selector }}').append(data).removeClass('awaiting-content');
                            tpt.queue.next();
                        }
                    );
                }($ || avajQuery));
            }
        );
    </script>

   -------------------------------------------------------------------------- */

/* Behaviour
   -------------------------------------------------------------------------- */
.will-load-content {
    background-position: center center;
    -webkit-transition: all 0.3s;
    -ms-transition: all 0.3s;
    transition: all 0.3s;
}

/* Appearance
   -------------------------------------------------------------------------- */
.will-load-content.awaiting-content {
    background-image: url(../images/spinner.gif);
}

/* SNIPPET: POP-UP ON HOVER
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   Brief explanation.
   --------------------------------------------------------------------------

    <div class="popup-on-hover">
        <a class="popup-on-hover__link">X</a>

        <div class="popup-on-hover__popup">
            [...]
        </div>
    </div>

   -------------------------------------------------------------------------- */

/* Structure
   -------------------------------------------------------------------------- */
.popup-on-hover__popup {
    width: 330px;
    padding-top: 22px;
}

/* Behaviour
   -------------------------------------------------------------------------- */
.popup-on-hover {
    display: inline-block;
    position: relative;
}

.popup-on-hover__popup {
    display: none;
    position: absolute;
    top: 10px;
    left: calc(50% - 165px);
}

.popup-on-hover:hover .popup-on-hover__popup {
    display: block;
}

/* Appearance
   -------------------------------------------------------------------------- */
.popup-on-hover .popup-on-hover__link {
    color: #26C59A; /* var(--color--site) in an IE free world - use this comment as a handler for smart find & replace! */
}

.popup-on-hover:hover .popup-on-hover__link:hover {
    color: #26C59A; /* var(--color--site) in an IE free world - use this comment as a handler for smart find & replace! */
}

/* SNIPPET: RATING STARS
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   Brief explanation.
   --------------------------------------------------------------------------

    <span class="rating">★★★★☆</span>

   -------------------------------------------------------------------------- */

/* Appearance
   -------------------------------------------------------------------------- */
.rating {
    font-size: 130%;
    line-height: inherit;
    color: #EFCE4A;
}

/* SNIPPET: TOOLTIP
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   Brief explanation. Mention the plugin. Mention the Hack.
   --------------------------------------------------------------------------

    <span class="tooltip"></span>

   -------------------------------------------------------------------------- */

/* Appearance
   -------------------------------------------------------------------------- */
.tooltip {
    color: #007BC8;
}

/* SNIPPET: VERTICAL CENTERING
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   Brief explanation.
   --------------------------------------------------------------------------

    <div class="valign__out">
        <div class="valign__int"></div>
    </div>

   -------------------------------------------------------------------------- */

/* Structure
   -------------------------------------------------------------------------- */
.valign__out {
    margin: auto;
    width: 100%;
    height: 100%;
}

/* Behaviour
   -------------------------------------------------------------------------- */
.valign__out {
    display: table;
}

.valign__int {
    display: table-cell;
    vertical-align: middle;
}

/* SNIPPET: VIDEO EMBEDDING
   ========================================================================== */

/* HTML Snippet
   --------------------------------------------------------------------------
   Brief explanation. Link to generator.
   --------------------------------------------------------------------------

    <div class="embed-container">
        <iframe src='X' frameborder='0' allowfullscreen></iframe>
    </div>

   -------------------------------------------------------------------------- */

/* Structure
   -------------------------------------------------------------------------- */
.embed-container {
    max-width: 100%;
    height: 0;
    padding-bottom: 56.25%;
}

.embed-container iframe,
.embed-container object,
.embed-container embed {
    width: 100%;
    height: 100%;
}

/* Behaviour
   -------------------------------------------------------------------------- */
.embed-container {
    position: relative;
    overflow: hidden;
}

.embed-container iframe,
.embed-container object,
.embed-container embed {
    position: absolute;
    top: 0;
    left: 0;
}

.border--left-grey {
    border-left: 1px solid #cfcfcf;
    padding-right: 6px;
    padding-left: 6px;
}

.left-text {
    text-align: left;
}
