@import "./theme";

.mfunsPlayer {
    .mfunsPlayer-slider {
        position: relative; // 滑动条形态样式
        .slider-track {
            width: 2px;
            height: 2px;
            border-radius: 1px;
            background: #e5e9ef;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            align-items: center;
            cursor: pointer;
            z-index: 2;
            .slider-bar {
                background: $theme-color;
                border-radius: 2px;
                cursor: pointer;
            }
            .slider-thumb-track {
                position: relative;
                width: calc(100% - 12px);
                height: calc(100% - 12px);

                .slider-thumb {
                    width: 12px;
                    height: 12px;
                    border-radius: 100%;
                    background: $theme-color;
                    z-index: 2;
                }
                .mfunsPlayer-divider {
                    position: absolute;
                    top: -3px;
                    width: calc(100% + 12px);
                    display: flex;
                    margin-left: -6px;
                    justify-content: space-between;
                    .mfunsPlayer-divider-dot {
                        list-style: none;
                        width: 1px;
                        height: 6px;
                        background: #e6e6e6;
                    }
                }
            }
        }

        .slider-tip {
            width: 140%;
            height: 12px;
            display: flex;
            list-style: none;
            position: absolute;
            top: 50%;
            margin-left: -57%;
            margin-top: 6px;
            left: 50%;
            .slider-tip-item {
                list-style: none;
                flex: 1;
                font-size: 12px;
                transform: scale(0.8);
                color: #999;
            }
        }
    }
    .mfunsPlayer-picker {
        padding-left: 5px;
        .picker-item {
            display: inline-block;
            padding: 0 5px;
            height: 20px;
            line-height: 20px;
            border-radius: 2px;
            border: transparent solid 1px;
            transition: color 0.2s;
            cursor: pointer;
            &.picked {
                border: transparent solid 1px;
                border-color: $theme-color;
                color: $theme-color;
            }
            &:hover {
                color: $theme-color-light;
            }
            &:active {
                color: $theme-color;
            }
        }
    }
    .mfunsPlayer-switch {
        padding: 0 5px;
        height: 22px;
        cursor: pointer;
        .mfunsPlayer-switch-checkbox {
            position: relative;
            display: inline-block;
            vertical-align: middle;
            margin: 4px 0;
            width: 13px;
            height: 13px;
            border-radius: $theme-border-radius;
            border: solid;
            border-width: 1px;
            border-color: $translucent-light-white;
            box-sizing: border-box;
            transition: all 0.2s;
        }
        .mfunsPlayer-switch-label {
            position: relative;
            display: inline-block;
            vertical-align: middle;
            line-height: 22px;
            margin: 0 2px;
            transition: all 0.2s;
        }
        &:hover {
            .mfunsPlayer-switch-checkbox {
                border-color: $theme-color-light;
            }
            .mfunsPlayer-switch-label {
                color: $theme-color-light;
            }
        }
        &:active {
            .mfunsPlayer-switch-checkbox {
                border-color: $theme-color;
            }
            .mfunsPlayer-switch-label {
                color: $theme-color;
            }
        }
        &.switch-on {
            .mfunsPlayer-switch-checkbox {
                background-color: $theme-color;
                border-color: $theme-color;
                background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MCA1MCI+DQogICAgPHBvbHlnb24gcG9pbnRzPSI0MCA3LjkyOSAyMCAyNy45MjkgMTAgMTcuOTI5IDIuOTI5IDI1IDIwIDQyLjA3MSA0Ny4wNzEgMTUgNDAgNy45MjkiIGZpbGw9IiNGRkYiLz4NCjwvc3ZnPg==");
                background-repeat: no-repeat;
                background-size: contain;
            }
        }
    }

    .mfunsPlayer-input {
        height: 20px;
        line-height: 20px;
        padding: 0 4px;
        border: 1px solid $light-grey;
        background-color: transparent;
        font-size: 12px;
        color: $text-black;
        border-radius: $theme-border-radius;
        outline: none;
    }

    .mfunsPlayer-controller-panel,
    .mfunsPlayer-controller {
        .mfunsPlayer-input {
            border-color: $translucent-light-white;
            color: $translucent-white;
        }
    }
    input, textarea {
        font-family: inherit;
    }
}
