@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500&display=swap');

$blue: #449eea;
$gray : #919ca0;
$green : #d9efe4;
$red : #ff7878;

body,
html {
    scroll-behavior: smooth;
}

.tools_page_url-rewrite-analyzer {
    font-family: 'Ubuntu', sans-serif;

    &.dark {
        background-color: #021041;

        .modal-change-ui {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            visibility: hidden;
            transition: all .3s ease;
            background: rgba($color: #000000, $alpha: .5);
            display: flex;
            align-items: center;
            justify-content: center;

            &.open {
                opacity: 1;
                visibility: visible;
            }

            form {
                background: white;
                padding: 30px;
                border-radius: 5px;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 15px;

                .input-wrapper {
                    display: flex;
                    align-items: center;

                    .ui-select {
                        background-color: aliceblue;
                        color: black;
                        padding: 40px;
                        border-radius: 5px;
                        font-size: 20px;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        border-style: dashed;
                        border-width: 2px;
                        border-color: transparent;
                        transition: all .2s ease;

                        &.selected {
                            border-color: black;
                        }
                    }

                    justify-content: center;

                    input[type=radio] {
                        display: none;
                    }
                }
            }
        }

        .head-wrapper {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 0;
            position: sticky;
            top: 32px;
            background: #021141;

            &.open {
                background: none;
            }

            h2 {
                font-family: 'Ubuntu', sans-serif;
                color: white;
                padding-bottom: 0;
                margin: 0;
                font-size: 20px;
                margin-right: auto;
            }

            #flush-rewrite-rules,
            #update-ui {
                position: sticky;
                top: 50px;
                background: transparent;
                padding: 15px;
                border: 2px solid white;
                border-radius: 5px;
                font-size: 14px;
                color: white;
                cursor: pointer;
                display: flex;
                align-items: center;
                transition: all .3s ease;

                &:hover {
                    background-color: white;
                    color: black;
                }

                span {
                    margin-right: 10px;
                }

                @keyframes rotate {
                    100% {
                        transform: rotate(360deg);
                    }
                }

                &.rotate {
                    svg {
                        animation: rotate 2s linear infinite;
                    }
                }
            }

            #update-ui {
                margin-right: 20px;
            }
        }

        #_regex-search-bar {
            display: flex;
            padding-bottom: 20px;

            .prefix-url {
                display: flex;
                align-items: center;
                background: aliceblue;
                font-family: 'Ubuntu', sans-serif;
                font-size: 16px;
                font-weight: 300;
                padding: 20px;
                padding-right: 0;
                border-radius: 5px 0 0 5px;
            }

            #regex-tester {
                margin: 0;
                width: 100%;
                padding: 20px;
                padding-left: 0;
                border: none;
                background: aliceblue;
                color: black;
                font-family: 'Ubuntu', sans-serif;
                font-size: 16px;
                font-weight: 400;
                font-style: italic;
                border-radius: 0;

                &:focus {
                    outline: none;
                    box-shadow: none;
                }
            }

            .clear {
                border: none;
                background: aliceblue;
                padding: 20px;
                border-left: 1px solid lightgrey;
                border-radius: 0 5px 5px 0;
                cursor: pointer;
                color: #3c434a;
            }
        }

        table {
            border-radius: 5px;
            border: none;

            thead {
                tr {
                    th {
                        font-size: 15px;
                        border-color: #dedede;
                        background: aliceblue;
                        padding: 20px;

                        &:nth-child(1) {
                            border-radius: 5px 0 0 0;
                        }

                        &:nth-child(2) {
                            border-radius: 0 5px 0 0;
                        }
                    }
                }
            }

            tbody {
                tr {
                    transition: all .3s ease;
                    cursor: pointer;

                    td {
                        border-bottom: 1px solid #dedede;
                        padding: 20px;
                        line-height: 1;
                        vertical-align: middle;
                        font-weight: 300;

                        span {
                            font-size: 15px;
                        }

                        &:last-child {
                            display: flex;
                            flex-direction: column;

                            .queryvar-public {
                                padding-bottom: 10px;

                                &:last-child {
                                    padding-bottom: 0;
                                }
                            }
                        }
                    }

                    &:hover {
                        background-color: aliceblue;
                    }
                }
            }
        }

        #footer-thankyou,
        #footer-upgrade {
            color: white;
        }

        .urap-btt-wrapper {
            position: fixed;
            right: 0;
            bottom: 20px;
            transition: all .3s ease;
            transform: translateX(100%);

            button {
                background: #021141;
                border: none;
                color: white;
                border-radius: 100%;
                width: 40px;
                height: 40px;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
            }

            &.open {
                transform: translateX(-30px);
            }
        }

    }

    &.light {
        background: #f9f9f9;

        .modal-change-ui {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            visibility: hidden;
            transition: all .3s ease;
            background: rgba($color: #000000, $alpha: .5);
            display: flex;
            align-items: center;
            justify-content: center;

            &.open {
                opacity: 1;
                visibility: visible;
            }

            form {
                background: white;
                padding: 30px;
                border-radius: 5px;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 15px;

                .input-wrapper {
                    display: flex;
                    align-items: center;

                    .ui-select {
                        background-color: aliceblue;
                        color: black;
                        padding: 40px;
                        border-radius: 5px;
                        font-size: 20px;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        border-style: dashed;
                        border-width: 2px;
                        border-color: transparent;
                        transition: all .2s ease;

                        &.selected {
                            border-color: black;
                        }
                    }

                    justify-content: center;

                    input[type=radio] {
                        display: none;
                    }
                }
            }
        }

        .head-wrapper {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 0;
            position: sticky;
            top: 32px;
            background-color: #f9f9f9;

            &.open {
                background: none;
            }

            h2 {
                font-family: 'Ubuntu', sans-serif;
                color: #021041;
                padding-bottom: 0;
                margin: 0;
                font-size: 20px;
                margin-right: auto;
            }

            #flush-rewrite-rules,
            #update-ui {
                position: sticky;
                top: 50px;
                background: transparent;
                padding: 15px;
                border: 2px solid #021041;
                border-radius: 5px;
                font-size: 14px;
                color: #021041;
                cursor: pointer;
                display: flex;
                align-items: center;
                transition: all .3s ease;

                &:hover {
                    background-color: #021041;
                    color: white;
                }

                span {
                    margin-right: 10px;
                }

                @keyframes rotate {
                    100% {
                        transform: rotate(360deg);
                    }
                }

                &.rotate {
                    svg {
                        animation: rotate 2s linear infinite;
                    }
                }
            }

            #update-ui {
                margin-right: 20px;
            }
        }

        #_regex-search-bar {
            display: flex;
            padding-bottom: 20px;

            .prefix-url {
                display: flex;
                align-items: center;
                background: white;
                font-family: 'Ubuntu', sans-serif;
                font-size: 16px;
                font-weight: 300;
                padding: 20px;
                padding-right: 0;
                border-radius: 5px 0 0 5px;
            }

            #regex-tester {
                margin: 0;
                width: 100%;
                padding: 20px;
                padding-left: 0;
                border: none;
                background: white;
                color: black;
                font-family: 'Ubuntu', sans-serif;
                font-size: 16px;
                font-weight: 400;
                font-style: italic;
                border-radius: 0;

                &:focus {
                    outline: none;
                    box-shadow: none;
                }
            }

            .clear {
                border: none;
                background: white;
                padding: 20px;
                border-left: 1px solid lightgrey;
                border-radius: 0 5px 5px 0;
                cursor: pointer;
                color: #3c434a;
            }
        }

        table {
            border-radius: 5px;
            border: none;

            thead {
                tr {
                    th {
                        font-size: 15px;
                        border-color: #dedede;
                        background: aliceblue;
                        padding: 20px;

                        &:nth-child(1) {
                            border-radius: 5px 0 0 0;
                        }

                        &:nth-child(2) {
                            border-radius: 0 5px 0 0;
                        }
                    }
                }
            }

            tbody {
                tr {
                    transition: all .3s ease;
                    cursor: pointer;

                    td {
                        border-bottom: 1px solid #dedede;
                        padding: 20px;
                        line-height: 1;
                        vertical-align: middle;
                        font-weight: 300;

                        span {
                            font-size: 15px;
                        }

                        &:last-child {
                            display: flex;
                            flex-direction: column;

                            .queryvar-public {
                                padding-bottom: 10px;

                                &:last-child {
                                    padding-bottom: 0;
                                }
                            }
                        }
                    }

                    &:hover {
                        background-color: aliceblue;
                    }
                }
            }
        }

        .urap-btt-wrapper {
            position: fixed;
            right: 0;
            bottom: 20px;
            transition: all .3s ease;
            transform: translateX(100%);

            button {
                background: white;
                border: none;
                color: #021041;
                border-radius: 100%;
                width: 40px;
                height: 40px;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
            }

            &.open {
                transform: translateX(-30px);
            }
        }

    }

    &.old {
        .modal-change-ui {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            visibility: hidden;
            transition: all .3s ease;
            background: rgba($color: #000000, $alpha: .5);
            display: flex;
            align-items: center;
            justify-content: center;

            &.open {
                opacity: 1;
                visibility: visible;
            }

            form {
                background: white;
                padding: 30px;
                border-radius: 5px;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 15px;

                .input-wrapper {
                    display: flex;
                    align-items: center;

                    .ui-select {
                        background-color: aliceblue;
                        color: black;
                        padding: 40px;
                        border-radius: 5px;
                        font-size: 20px;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        border-style: dashed;
                        border-width: 2px;
                        border-color: transparent;
                        transition: all .2s ease;

                        &.selected {
                            border-color: black;
                        }
                    }

                    justify-content: center;

                    input[type=radio] {
                        display: none;
                    }
                }
            }
        }

        .head-wrapper {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 0;
            position: sticky;
            top: 32px;
            background-color: #f0f0f1;

            &.open {
                background: none;
            }

            h2 {
                padding-bottom: 0;
                margin: 0;
                margin-right: auto;
            }

            #flush-rewrite-rules,
            #update-ui {
                position: sticky;
                top: 50px;
                background: white;
                padding: 15px;
                border: 2px solid white;
                border-radius: 5px;
                font-size: 14px;
                cursor: pointer;
                display: flex;
                align-items: center;
                transition: all .3s ease;

                &:hover {
                    background-color: white;
                    color: black;
                }

                span {
                    margin-right: 10px;
                }

                @keyframes rotate {
                    100% {
                        transform: rotate(360deg);
                    }
                }

                &.rotate {
                    svg {
                        animation: rotate 2s linear infinite;
                    }
                }
            }

            #update-ui {
                margin-right: 20px;
            }
        }

        .regexgroup,
        .regexgroup-target {
            color: #21759B;
        }

        .regexgroup,
        .queryvalue {
            font-weight: bold;
        }

        .queryvar-unread {
            color: red;
            text-decoration: line-through;
        }

        .regex-repeater-target.highlight {
            text-decoration: underline;
        }

        #regex-help-wrap dd {
            margin-left: 1em;
        }

        .rewrite-rule-line {
            td {
                pre {
                    display: flex;
                    flex-direction: column;

                    .queryvar-public {
                        white-space: normal;
                    }
                }
            }
        }

        .rewrite-rule-matched.rewrite-rule-matched-first {
            background-color: #e6db55;
        }

        .rewrite-rule-matched .regexgroup-target-value {
            display: inline;
        }

        .regexgroup-target-value {
            display: none;
        }

        .rewrite-rule-matched .regexgroup-target {
            display: none;
        }

        .rewrite-rule-unmatched {
            display: none;
        }

    }
}

.regexgroup,
.regexgroup-target {
    color: #3c434a;
    font-style: italic;
}

.regexgroup,
.queryvalue {
    font-weight: bold;
}

.queryvar-unread {
    color: $red;
    font-style: italic;
    text-decoration: line-through;
}

.regex-repeater-target {
    &.highlight {
        text-decoration: underline;
    }
}

#regex-help-wrap dd {
    margin-left: 1em;
}

.regexgroup-target-value {
    display: none;
}

.rewrite-rule-unmatched {
    display: none;
}

.rewrite-rule-matched {
    &.rewrite-rule-matched-first {
        background-color: $green;
    }

    .regexgroup-target-value {
        display: inline;
    }

    .regexgroup-target {
        display: none;
    }

    &:hover {
        td {
            color: black;
        }
    }
}