
/* Container */

#cookielay-container {
    padding: 20px 20px 20px 0;
    font-family: $font-family-base;
    @media screen and (max-width: 782px) {
        padding: 15px 15px 15px 5px;
    }
}

/* Grid */

#cookielay-container {
    .container {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Headings */

#cookielay-container {
    h1, h2, h3, h4, h5, h6 {
        line-height: 1;
        margin-bottom: 0;
    }
    h1 {
        color: $primary;
        font-size: 42px;
        font-family: 'Bebas Neue', sans-serif;
        font-weight: $font-weight-normal;
        letter-spacing: 1px;
        @include media-breakpoint-down(md) {
            font-size: 32px;
        }
    }
    h2 {
        color: $primary;
        font-size: 22px;
        font-weight: $font-weight-bold;
        @include media-breakpoint-down(md) {
            font-size: 20px;
        }
    }
}

/* Font */

#cookielay-container {
    p {
        margin-bottom: 30px;
        margin-top: 0;
        @include media-breakpoint-down(md) {
            margin-bottom: 20px;
        }
    }
}

/* Button & Link */

#cookielay-container {
    .cl-button {
        display: inline-block;
        padding: 12px 20px;
        font-weight: $font-weight-bold;
        border-radius: $global-radius;
        outline: none !important;
        border: none;
        cursor: pointer;
        position: relative;
        .tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            white-space: nowrap;
            transform: translateX(-50%);
            margin-bottom: 10px;
            background: $primary;
            display: block;
            padding: 8px;
            color: $white;
            z-index: 20;
            border-radius: 8px;
            display: none;
            &:after {
                content: "";
                position: absolute;
                top: 100%;
                left: 50%;
                transform: translateX(-50%);
                width: 0; 
                height: 0; 
                border-left: 8px solid transparent;
                border-right: 8px solid transparent;
                border-top: 8px solid $primary;
            }
        }
        i {
            position: relative;
            left: -2px;
            top: 1px;
        }
        &:hover {
            .tooltip {
                display: block;
            }
        }
        &.white {
            background: $white;
            color: $primary;
        }
        &.primary {
            background: $gradient;
            color: $white;
            border: none;
            &.disabled {
                background: $gradient-disabled;
            }
        }
        &.error {
            background: $error-color;
            color: $white;
        }
        &.outline {
            padding: 10px 18px;
            background-color: transparent;
            color: $white;
            border: solid 1px $white;
            transition: all 0.2s ease;
            &:hover {
                background: $white;
                color: $primary;
            }
            &.primary {
                color: $primary;
                border-color: $primary;
                background: transparent;
                &:hover {
                    background: $primary;
                    color: $white;
                }
                &.disabled {
                    opacity: 0.3;
                    color: $primary;
                    background: transparent;
                }
            }
        }
        &.disabled,
        &:disabled {
            cursor: default;
        }
    }
    .cl-link {
        display: inline-block;
        font-weight: $font-weight-bold;
        &.white {
            color: $white;
            &:after {
                background: $white;
            }
        }
        &.primary {
            color: $primary;
            &:after {
                background: $primary;
            }
        }
        &:after {
            content: "";
            display: block;
            width: 100%;
            height: 1px;
            transition: all 0.3s ease;
        }
        &:hover {
            &:after {
                width: 0;
            }
        }
    }
}

/* Input Group */

#cookielay-container {
    .cl-input-group {
        display: flex;
        flex-flow: row wrap;
        @include media-breakpoint-down(xl) {
            display: block;
        }
        input {
            @include media-breakpoint-up(xl) {
                flex: 1;
                border-right: none !important;
                border-top-right-radius: 0 !important;
                border-bottom-right-radius: 0 !important;
            }
            @include media-breakpoint-down(xl) {
                margin-bottom: 5px;
            }
        }
        button {
            @include media-breakpoint-up(xl) {
                border-radius: 0 !important;
            }
            &:last-of-type {
                border-top-right-radius: $global-radius !important;
                border-bottom-right-radius: $global-radius !important;
            }
        }
    }
}

/* Switch */

#cookielay-container {
    .switch-wrapper {
        display: flex;
        flex-flow: row wrap;
        align-items: center;
        .label {
            color: $text-color;
            margin-right: 15px;
        }
        .switch {
            margin-bottom: 0;
            display: flex;
            align-items: center;
            position: relative;
            input {
                opacity: 0;
                width: 0;
                height: 0;
                position: absolute;
            }
            span {
                width: 50px;
                height: 30px;
                display: block;
                background: transparent;
                border: solid 2px $primary;
                border-radius: 50px;
                position: relative;
                cursor: pointer;
                transition: all 0.3s ease;
                &:after {
                    content: "";
                    position: absolute;
                    top: 50%;
                    left: 5px;
                    transform: translateY(-50%);
                    height: 20px;
                    width: 20px;
                    display: block;
                    border-radius: 50%;
                    background: $primary;
                    transition: all 0.3s ease;
                }
            }
            input:checked + span {
                background: $primary;
                &:after {
                    left: 23px;
                    background: $white;
                }
            }
            input:disabled + span {
                opacity: 0.3;
                cursor: pointer;
            }
        }
    }
}

/* Checkbox */

#cookielay-container {
    .checkbox {
        margin-bottom: 0;
        display: flex;
        align-items: center;
        position: relative;
        input {
            opacity: 0;
            width: 0;
            height: 0;
            position: absolute;
        }
        span {
            width: 24px;
            height: 24px;
            display: block;
            background: transparent;
            border: solid 2px $primary;
            border-radius: 6px;
            position: relative;
            cursor: pointer;
            margin-right: 8px;
            &:after {
                content: "\e64c";
                font-family: "themify";
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                display: none;
                font-size: 14px;
            }
        }
        .caption {
            color: $primary;
            font-weight: $font-weight-bold;
        }
        input:checked + span {
            background: $primary;
            &:after {
                display: block;
            }
        }
        input:disabled + span {
            opacity: 0.3;
            cursor: pointer;
        }
    }
}

/* Alerts */

#cookielay-container {
    .cl-alert {
        margin-left: 160px !important;
        position: fixed;
        bottom: 50px;
        left: 50px;
        z-index: 99999;
        padding: 15px 20px;
        font-weight: $font-weight-bold;
        box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.05);
        display: none;
        align-items: center;
        border: none !important;
        @media screen and (max-width: 960px) {
            margin-left: 36px !important;
        }
        @media screen and (max-width: 782px) {
            margin-left: 0 !important;
        }
        @include media-breakpoint-down(md) {
            bottom: 30px;
            left: 30px;
        }
        span {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: block;
            position: relative;
            margin-right: 10px;
            i {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
            }
        }
        &.success {
            color: $success-color;
            background: #dff0d8;
            border-left: solid 10px $success-color !important;
            span {
                background: $success-color;
                i {
                    color: #dff0d8;
                }
            }
        }
        &.error {
            color: $error-color;
            background: #ffe0e3;
            border-left: solid 10px $error-color !important;
            span {
                background: $error-color;
                i {
                    color: #ffe0e3;
                }
            }
        }
        &.visible {
            display: flex;
            animation-name: alert;
            animation-fill-mode: forwards;
            animation-direction: normal;
            animation-duration: 3s;
            animation-timing-function: ease-in-out;
        }
    }
}

/* CodeEditor */
#cookielay-container {
    .CodeMirror {
        border: solid 1px rgba(0, 0, 0, 0.08);
        border-radius: $global-radius;
    }
}

/* Overlay */

#cookielay-container {
    .cl-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 160px;
        right: 0;
        height: 100%;
        z-index: 2000;
        background: rgba(0, 0, 0, 0.7);
        @media screen and (max-width: 960px) {
            left: 160px;
        }
        @media screen and (max-width: 782px) {
            left: 0;
        }
        .cl-modal__box {
            display: none;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 90%;
            max-width: 500px;
            border-radius: $global-radius;
            box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
            .cl-box-text {
                padding: 40px 20px;
                background: $white;
                border-top-left-radius: $global-radius;
                border-top-right-radius: $global-radius;
                position: relative;
                text-align: center;
                span {
                    font-weight: $font-weight-bold;
                }
                .cl-box-close {
                    position: absolute;
                    top: 15px;
                    right: 15px;
                    cursor: pointer;
                    font-size: 16px;
                }
            }
            .cl-box-buttons {
                display: flex;
                flex-flow: row wrap;
                button,
                a {
                    outline: none;
                    cursor: pointer;
                    border: none;
                    box-shadow: none;
                    flex: 1;
                    padding: 20px;
                    margin: 0;
                    text-align: center;
                    font-weight: $font-weight-bold;
                    &.submit {
                        border-bottom-left-radius: $global-radius;
                        &.warning {
                            background: $error-color;
                            color: $white;
                        }
                    }
                    &.cancel {
                        background: $text-color;
                        color: $black;
                        border-bottom-right-radius: $global-radius;
                    }
                }
            }
        }
    }
}