@use './pages/quick-start/quick-start-style.scss';
@use './pages/lite-vs-pro/lite-vs-pro.scss';
@use './pages/about-us/about-us.scss';
@use './pages/settings/setting-styles.scss';
@use './pages/saved-templates/saved-templates.scss';
@use './setup-wizard/setup-wizard.scss';
@use './responsive-css.scss';

.spl-weather-pro-block-admin-page {
    margin-left: -20px;
    a {
        text-decoration: none;
    }

    // icon 
    .spl-weather-blocks-settings-card-icon {
        width: 48px;
        padding: 6px;
        border: 2px solid #FFE0B3;
        border-radius: 4px;
    }

    // title.
    .spl-weather-blocks-setting-title {
        margin: 0 0 24px 0;
        font-size: 22px;
        font-weight: 600;
        line-height: 28px;
    }

    // toggle buttons wrapper css.
    .spl-weather-blocks-settings-card-wrapper {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;

        .spl-weather-blocks-settings-card {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background-color: #ffffff;
            padding: 20px 24px;
            border-radius: 6px;
            box-shadow: 0 1px 2px 0 hsla(0, 0%, 7%, .2);
            position: relative;

            &-icon,
            &-docs ul,
            &-info {
                display: flex;
                align-items: center;
            }

            &-docs {
                margin-left: 10px;

                li,
                h4,
                ul {
                    margin: 0;
                    padding: 0;
                }

                h4 {
                    font-size: 16px;
                    color: #1E1E1E;
                    font-weight: 600;
                    line-height: 20px;
                    margin-bottom: 4px;
                }

                ul {
                    display: flex;
                    gap: 10px;

                }

                ul li a {
                    color: #757575;
                    font-size: 13px;
                    font-weight: 400;
                    display: flex;
                    gap: 5px;
                    line-height: 20px;
                    align-items: center;

                    &:hover {
                        color: #f26c0d;

                        [stroke="#757575"] {
                            stroke: #f26c0d;
                        }
                    }
                }

                ul li a:focus {
                    box-shadow: none;
                }
            }

            &:hover {

                /* Show text on hover */
                .splw-pro-blocks-badge {
                    width: 43px;
                }
            }
        }
    }

    .splw-section-title {
        font-size: 22px;
        font-weight: 600;
        line-height: 28px;
        color: #1d2327;
    }

    .spl-weather-blocks-settings-toggle-btn {
        .react-toggle {
            touch-action: pan-x;
            display: inline-block;
            position: relative;
            cursor: pointer;
            background-color: transparent;
            border: 0;
            padding: 0;

            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;

            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            -webkit-tap-highlight-color: transparent;
        }

        .react-toggle-screenreader-only {
            border: 0;
            clip: rect(0 0 0 0);
            height: 1px;
            margin: -1px;
            overflow: hidden;
            padding: 0;
            position: absolute;
            width: 1px;
        }

        .react-toggle--disabled {
            cursor: not-allowed;
            opacity: 0.5;
            -webkit-transition: opacity 0.25s;
            transition: opacity 0.25s;
        }

        .react-toggle-track {
            width: 36px;
            height: 18px;
            padding: 0;
            border-radius: 30px;
            background-color: #BBBBBB;
            -webkit-transition: all 0.2s ease;
            -moz-transition: all 0.2s ease;
            transition: all 0.2s ease;
        }

        .react-toggle:hover:not(.react-toggle--disabled) .react-toggle-track {
            background-color: #BBBBBB;
        }

        .react-toggle--checked .react-toggle-track {
            background-color: #4AB866;
        }

        .react-toggle--checked:hover:not(.react-toggle--disabled) .react-toggle-track {
            background-color: #4AB866;
        }

        .react-toggle-track-check {
            position: absolute;
            width: 14px;
            height: 10px;
            top: 0px;
            bottom: 0px;
            margin-top: auto;
            margin-bottom: auto;
            line-height: 0;
            left: 8px;
            opacity: 0;
            -webkit-transition: opacity 0.25s ease;
            -moz-transition: opacity 0.25s ease;
            transition: opacity 0.25s ease;
        }

        .react-toggle--checked .react-toggle-track-check {
            opacity: 1;
            -webkit-transition: opacity 0.25s ease;
            -moz-transition: opacity 0.25s ease;
            transition: opacity 0.25s ease;
        }

        .react-toggle-track-x {
            position: absolute;
            width: 10px;
            height: 10px;
            top: 0px;
            bottom: 0px;
            margin-top: auto;
            margin-bottom: auto;
            line-height: 0;
            right: 10px;
            opacity: 1;
            -webkit-transition: opacity 0.25s ease;
            -moz-transition: opacity 0.25s ease;
            transition: opacity 0.25s ease;
        }

        .react-toggle--checked .react-toggle-track-x {
            opacity: 0;
        }

        .react-toggle-thumb {
            transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0ms;
            position: absolute;
            top: 2px;
            left: 2px;
            width: 14px;
            height: 14px;
            border: 1px solid #BBBBBB;
            border-radius: 50%;
            background-color: #FAFAFA;

            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;

            -webkit-transition: all 0.25s ease;
            -moz-transition: all 0.25s ease;
            transition: all 0.25s ease;
        }

        .react-toggle--checked .react-toggle-thumb {
            left: 20px;
            border-color: #4ab866;
        }

        .react-toggle:active:not(.react-toggle--disabled) .react-toggle-thumb {
            -webkit-box-shadow: 0px 0px 5px 5px #0099E0;
            -moz-box-shadow: 0px 0px 5px 5px #0099E0;
            box-shadow: 0px 0px 5px 5px #0099E0;
        }
    }
}

.spl-weather-admin-page-header {
    background: linear-gradient(90deg, #FF512F 26%, #F09819 100%);

    .spl-weather-admin-page-header-left {
        display: flex;
        align-items: center;
        gap: 10px;

        span {
            padding: 2px 10px;
            border: 1px solid #fff;
            border-radius: 40px;
        }

        .spl-weather-header-changelog-btn {
            border: none;
            background: none;
            outline: none;
            cursor: pointer;
        }
    }

    .spl-weather-admin-page-header-right {
        display: flex;
        gap: 5px;
        font-size: 15px;
        font-weight: 600;
        color: #fff;
        background: none;
        border: none;
        cursor: pointer;
        padding: 12px 0;
        position: relative;

        &:hover {
            .splw-help-drop-down {
                display: flex;
            }
        }
    }

    .splw-help-drop-down {
        display: none;
        position: absolute;
        background: #fff;
        flex-direction: column;
        top: 40px;
        right: 0px;
        padding: 10px;
        text-align: left;
        border-radius: 4px;
        box-shadow: 0 2px 15px 0 rgba(17, 17, 17, 0.15);
        z-index: 10;
        width: 244px;

        a {
            font-size: 16px;
            font-weight: 400;
            color: #565A5F;
            padding: 10px;
            display: flex;
            align-items: center;
            gap: 10px;
            border-radius: 5px;
            width: 100%;
            transition: all 0.2s;

            .drop-down-arrow {
                width: 16px;
                height: 18px;
                scale: 0.8;
                fill: #565A5F;
                margin-left: auto;
                position: relative;
                overflow: hidden;

                svg {
                    position: absolute;
                    top: 80%;
                    left: -16px;
                    transition: all 0.5s;
                }
            }

            &:hover {
                background: rgb(255, 240, 217);

                .drop-down-arrow {
                    svg {
                        top: 50%;
                        left: 50%;
                        transform: translate(-50%, -50%);
                    }
                }
            }
        }
    }
}

// Pro badge.
.splw-pro-blocks-badge {
    background: #F2930D;
    padding: 0 2px;
    display: flex;
    gap: 2px;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    position: absolute;
    right: 5px;
    top: 5px;
    border-radius: 4px;
    align-items: center;
    transition: width 0.3s ease;
    width: 18px;
    overflow: hidden;

    * {
        flex-shrink: 0;
    }

    span {
        white-space: nowrap;
    }

}

.spl-weather-admin-changelog-wrapper {
    margin-top: 32px;
    width: 350px;

    .spl-weather-changelog-heading {
        display: flex;
        justify-content: space-between;
        background: #fff;
        box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .1);
        display: flex;
        justify-content: space-between;
        left: 0;
        padding: 15px;
        position: sticky;
        top: 0;
        z-index: 9;

        .spl-weather-changelog-heading-title {
            font-weight: 600;
            font-size: 20px;
            line-height: 16px;
            margin: 0;
        }

        .spl-weather-changelog-close-btn {
            border: none;
            background: none;
            outline: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            margin: 0;
            padding: 0;

            svg {
                width: 12px;
                height: 12px;
            }
        }
    }

    .spl-weather-changelog-details {
        padding: 0 15px 50px;

        h4 {
            font-size: 16px;
            margin: 20px 0;
        }

        ul {
            font-size: 13px;
            list-style: disc;

            li {
                margin-bottom: 5px;
                margin-left: 18px;
            }
        }
    }
}

// Settings info button.
.splw-settings-info {
    i {
        color: #757575;
        font-size: 16px;
        height: 16px;
        width: 16px;
    }
}