<!DOCTYPE html>
<html lang="ru">

<head>
    <meta charset="UTF-8">
    <title>Конструктор визиток</title>
    <link rel="stylesheet" type="text/css" href="main.css">
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900&display=swap" rel="stylesheet">
    <style>
        body {
            margin: 0;
            background-image: url(images/bg.png);
            font-family: Roboto, sans-serif;
        }

        .wrapper {
            height: 100%;
            width: 100%;
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
        }

        .construct {
            padding-left: 30px;
            padding-bottom: 60px;
            height: 100;
            width: 600px;
            background-color: #ffffff;
            box-shadow: 0px 0px 6px #00000029;
        }

        .card {
            padding-top: 22px;
            margin-left: 65px;
            height: 250px;
            width: 445px;
            background-color: #ffffff;
            box-shadow: 0px 6px 12px #00000029;
            border-radius: 6px;
            border: #707070A8 solid 1px;
        }

        .card-wrap {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: center;
        }

        .org {
            flex-basis: 250px;
            text-align: center;
            font-size: 10px;
            color: #202020;
        }

        .name {
            flex-basis: 445px;
            margin-top: 32px;
            font-weight: bold;
        }

        .size14 {
            font-size: 14px;
        }

        .size16 {
            font-size: 16px;
        }

        .size18 {
            font-size: 18px;
        }

        .size24 {
            font-size: 24px;
        }

        .size26 {
            font-size: 26px;
        }

        .size28 {
            font-size: 28px;
        }

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

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

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

        .black {
            color: black;
        }

        .blue {
            color: #3F88E8;
        }

        .red {
            color: #E83F56;
        }

        .green {
            color: #097A14;
        }

        .orange {
            color: #DCA40A;
        }

        .purple {
            color: #DC0AD5;
        }

        .position {
            flex-basis: 445px;
            margin-top: 8px;
        }

        .grey1 {
            color: #474747;
        }

        .grey2 {
            color: #202020;
        }

        .grey3 {
            color: #636363;
        }

        .grey4 {
            color: #9E9E9E;
        }

        .grey5 {
            color: #BBBBBB;
        }

        .grey6 {
            color: #E3E3E3;
        }

        .null {
            flex-basis: 222px;
        }

        .info {
            margin-top: 20px;
            flex-basis: 222px;
            font-size: 12px;
            line-height: 2;
        }

        .header {
            margin-top: 30px;
            color: #707070;
            font-size: 20px;
            font-weight: bold;
        }

        .l {
            display: inline-block;
            color: #707070;
            font-size: 14px;
            text-align: left;
            margin-top: 15px;
        }

        .l2 {
            display: inline-block;
            color: #707070;
            font-size: 12px;
            text-align: left;
            margin-top: 15px;
        }

        input[type="text"],
        [type="email"],
        [type="tel"] {
            border-radius: 2px;
            border: #AAAAAABF solid 1px;
            padding: 7px 10px;
            width: 255px;
            margin: 10px 0px 0px 0px;
        }

        .button {
            margin-top: 18px;
            display: block;
            padding: 7px 25px 8px;
            color: #fff;
            font-family: roboto;
            font-weight: 400;
            font-size: 14px;
            text-decoration: none;
            background-color: #3F88E8;
            border-radius: 25px;
            border: 2px solid #3F88E8;
            cursor: pointer;
            transition: .2s all ease-in-out;
        }

        .button:hover {
            background-color: transparent;
            color: #3F88E8;
            border-color: #3F88E8;
            outline: none;
        }

        .button:focus {
            outline: none;
        }

        .button:active {
            background-color: #3F88E8;
            color: white;
            border-color: #3F88E8;
            outline: none;
        }

        .c-black:before {
            content: "•";
            color: black;
            margin-left: 6px;
            font-size: 30px;
            font-weight: bold;
            line-height: 28px;
            display: inline-block;
            margin-top: 10px;
            margin-bottom: 3px;
            border-radius: 100%;
            width: 24px;
            height: 24px;
            background-color: black;
        }

        .c-blue:before {
            content: "•";
            color: #3F88E8;
            margin-left: 6px;
            font-size: 30px;
            font-weight: bold;
            line-height: 28px;
            display: inline-block;
            margin-top: 10px;
            margin-bottom: 3px;
            border-radius: 100%;
            width: 24px;
            height: 24px;
            background-color: #3F88E8;
        }

        .c-red:before {
            content: "•";
            color: #E83F56;
            margin-left: 6px;
            font-size: 30px;
            font-weight: bold;
            line-height: 28px;
            display: inline-block;
            margin-top: 10px;
            margin-bottom: 3px;
            border-radius: 100%;
            width: 24px;
            height: 24px;
            background-color: #E83F56;
        }

        .c-green:before {
            content: "•";
            color: #097A14;
            margin-left: 6px;
            font-size: 30px;
            font-weight: bold;
            line-height: 28px;
            display: inline-block;
            margin-top: 10px;
            margin-bottom: 3px;
            border-radius: 100%;
            width: 24px;
            height: 24px;
            background-color: #097A14;
        }

        .c-orange:before {
            content: "•";
            color: #DCA40A;
            margin-left: 6px;
            font-size: 30px;
            font-weight: bold;
            line-height: 28px;
            display: inline-block;
            margin-top: 10px;
            margin-bottom: 3px;
            border-radius: 100%;
            width: 24px;
            height: 24px;
            background-color: #DCA40A;
        }

        .c-purple:before {
            content: "•";
            color: #DC0AD5;
            margin-left: 6px;
            font-size: 30px;
            font-weight: bold;
            line-height: 28px;
            display: inline-block;
            margin-top: 10px;
            margin-bottom: 3px;
            border-radius: 100%;
            width: 24px;
            height: 24px;
            background-color: #DC0AD5;
        }

        .c-grey1:before {
            content: "•";
            display: inline-block;
            margin-bottom: 3px;
            border-radius: 100%;
            width: 24px;
            height: 24px;
            background-color: #474747;
            color: #474747;
            margin-left: 6px;
            font-size: 30px;
            font-weight: bold;
            line-height: 28px;
        }

        .c-grey2:before {
            content: "•";
            display: inline-block;
            margin-bottom: 3px;
            border-radius: 100%;
            width: 24px;
            height: 24px;
            background-color: #202020;
            color: #202020;
            margin-left: 6px;
            font-size: 30px;
            font-weight: bold;
            line-height: 28px;
        }

        .c-grey3:before {
            content: "•";
            display: inline-block;
            margin-bottom: 3px;
            border-radius: 100%;
            width: 24px;
            height: 24px;
            background-color: #636363;
            color: #636363;
            margin-left: 6px;
            font-size: 30px;
            font-weight: bold;
            line-height: 28px;
        }

        .c-grey4:before {
            content: "•";
            display: inline-block;
            margin-bottom: 3px;
            border-radius: 100%;
            width: 24px;
            height: 24px;
            background-color: #9E9E9E;
            color: #9E9E9E;
            margin-left: 6px;
            font-size: 30px;
            font-weight: bold;
            line-height: 28px;
        }

        .c-grey5:before {
            content: "•";
            display: inline-block;
            margin-bottom: 3px;
            border-radius: 100%;
            width: 24px;
            height: 24px;
            background-color: #BBBBBB;
            color: #BBBBBB;
            margin-left: 6px;
            font-size: 30px;
            font-weight: bold;
            line-height: 28px;
        }

        .c-grey6:before {
            content: "•";
            display: inline-block;
            margin-bottom: 3px;
            border-radius: 100%;
            width: 24px;
            height: 24px;
            background-color: #E3E3E3;
            color: #E3E3E3;
            margin-left: 6px;
            font-size: 30px;
            font-weight: bold;
            line-height: 28px;
        }

        .btn-plus {
            display: inline-block;
            background-color: #707070;
            width: 17px;
            height: 17px;
            border-radius: 2px;
        }

        .plus-tel {
            margin-top: 15px;
            margin-bottom: 3px;
        }

        .text {
            display: inline-block;
            font-size: 12px;
            color: #707070;
        }

        .radio {
            margin-left: -5px;
        }

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

        .colours input[type=radio]:checked+label:before {
            margin-top: 20px;
            content: "•";
            color: white;
            font-size: 30px;
            text-align: center;
            font-weight: bold;
            line-height: 28px;
        }

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

        .l2:before {
            content: "‎✓";
            color: #707070;
            font-size: 10px;
            text-align: center;
            font-weight: bold;
            line-height: 20px;
            display: inline-block;
            width: 17px;
            height: 17px;
            margin-right: 10px;
            background-color: #707070;
            border-radius: 2px;
        }

        input[type=radio]:checked+label:before {
            text-align: center;
        }

        :before {
            cursor: pointer;
        }

        input[type=checkbox]:checked+label:before {
            content: "‎✓";
            color: white;
            font-size: 10px;
            text-align: center;
            font-weight: bold;
            line-height: 20px;
        }

        .checkbox {
            margin-left: 30px;
        }

        .radio {
            margin-bottom: 10px;
        }

        .row {
            display: flex;
            flex-direction: row;
            align-items: center;
        }

        .left:before {
            text-align: center;
            content: url(images/left.svg);
            display: inline-block;
            width: 24px;
            height: 15px;
            border-radius: 2px 0px 0px 2px;
            border: #AAAAAABF solid 1px;
            padding: 7px;
            margin-right: -5px;
        }

        .center:before {
            text-align: center;
            content: url(images/center.svg);
            display: inline-block;
            width: 24px;
            height: 15px;
            border: #AAAAAABF solid 1px;
            padding: 7px;
        }

        .right:before {
            text-align: center;
            content: url(images/right.svg);
            display: inline-block;
            width: 24px;
            height: 15px;
            border-radius: 0px 2px 2px 0px;
            border: #AAAAAABF solid 1px;
            padding: 7px;
            margin-left: -5px;
        }

        .align-radio {
            margin-left: 30px;
            margin-top: 10px;
        }

        .align-radio input[type=radio]:checked+label:before {
            background-color: #D9D9D9;
        }

        .s24:before {
            text-align: center;
            content: "24px";
            display: inline-block;
            width: 24px;
            height: 15px;
            border-radius: 2px 0px 0px 2px;
            border: #AAAAAABF solid 1px;
            padding: 7px;
            margin-right: -5px;
            font-size: 12px;
        }

        .s26:before {
            text-align: center;
            content: "26px";
            display: inline-block;
            width: 24px;
            height: 15px;
            border: #AAAAAABF solid 1px;
            padding: 7px;
            font-size: 12px;
        }

        .s28:before {
            text-align: center;
            content: "28px";
            display: inline-block;
            width: 24px;
            height: 15px;
            border-radius: 0px 2px 2px 0px;
            border: #AAAAAABF solid 1px;
            padding: 7px;
            margin-left: -5px;
            font-size: 12px;
        }

        .size-radio {
            margin-left: 30px;
            margin-top: 10px;
        }

        .size-radio input[type=radio]:checked+label:before {
            background-color: #D9D9D9;
        }

        .s14:before {
            text-align: center;
            content: "14px";
            display: inline-block;
            width: 24px;
            height: 15px;
            border-radius: 2px 0px 0px 2px;
            border: #AAAAAABF solid 1px;
            padding: 7px;
            margin-right: -5px;
            font-size: 12px;
        }

        .s16:before {
            text-align: center;
            content: "16px";
            display: inline-block;
            width: 24px;
            height: 15px;
            border: #AAAAAABF solid 1px;
            padding: 7px;
            font-size: 12px;
        }

        .s18:before {
            text-align: center;
            content: "18px";
            display: inline-block;
            width: 24px;
            height: 15px;
            border-radius: 0px 2px 2px 0px;
            border: #AAAAAABF solid 1px;
            padding: 7px;
            margin-left: -5px;
            font-size: 12px;
        }

        /* Дополнительный номер */

        #add_phone {
            margin-top: 11px;
            height: 17px;
        }

        #add_phone button {
            height: 17px;
            background: transparent;
            border: 0px solid transparent;
            outline: none;
            user-select: none;
            cursor: pointer;
            padding: 0px;
        }

        #add_phone button span {
            display: inline-block;
            font-size: 12px;
            font-family: Roboto;
            font-weight: 400;
            color: #707070;
            line-height: 17px;
            transform: translateY(-4px);
            margin-left: 4px;
        }

        #add_phone button .ico {
            display: inline-block;
            width: 17px;
            height: 17px;
            border: 0 solid transparent;
            background: 0% 0% no-repeat padding-box url('images/plus.svg');
        }

        #remove_phone {
            display: none;
            height: 17px;
            background: transparent;
            border: 0px solid transparent;
            outline: none;
            user-select: none;
            cursor: pointer;
            padding: 0px;
        }

        #remove_phone .ico {
            transform: translateY(3px);
            margin-left: 5px;
            display: inline-block;
            width: 17px;
            height: 17px;
            border: 0 solid transparent;
            background: 0% 0% no-repeat padding-box url('images/minus.svg');
        }

        #phone2 {
            width: 222px;
            display: none;
        }
    </style>
</head>

<body>
    <div class="wrapper">
        <div class="construct">
            <div class="construct-wrap">
                <!-- <form name="business-card"> -->
                <div class="header">Конструктор визиток</div><br>

                <label for="org" class="l">Наименование организации</label><br>
                <input id="org" type="text" name="org" autofocus=""><br>

                <label for="name" class="l">Фамилия, имя, отчество</label><br>
                <div class="row">
                    <input id="name" type="text" name="name"><br>
                    <div class="align-radio">
                        <input id="left" type="radio" name="a-name" value="left">
                        <label for="left" class="left"></label>
                        <input id="center" type="radio" name="a-name" value="center" checked="">
                        <label for="center" class="center "></label>
                        <input id="right" type="radio" name="a-name" value="right">
                        <label for="right" class="right "></label>
                    </div>
                    <div class="size-radio">
                        <input id="s24" type="radio" name="s-name" value="24px">
                        <label for="s24" class="s24"></label>
                        <input id="s26" type="radio" name="s-name" value="26px" checked="">
                        <label for="s26" class="s26 "></label>
                        <input id="s28" type="radio" name="s-name" value="28px">
                        <label for="s28" class="s28 "></label>
                    </div>

                </div>
                <div class="colours">
                    <div class="radio">
                        <input id="c-black" type="radio" name="c-name" value="#202020" checked>
                        <label for="c-black" class="c-black "></label>
                        <input id="c-blue" type="radio" name="c-name" value="#3F88E8">
                        <label for="c-blue" class="c-blue "></label>
                        <input id="c-red" type="radio" name="c-name" value="#E83F56">
                        <label for="c-red" class="c-red "></label>
                        <input id="c-green" type="radio" name="c-name" value="#097A14">
                        <label for="c-green" class="c-green "></label>
                        <input id="c-orange" type="radio" name="c-name" value="#DCA40A">
                        <label for="c-orange" class="c-orange "></label>
                        <input id="c-purple" type="radio" name="c-name" value="#DC0AD5">
                        <label for="c-purple" class="c-purple "></label>
                    </div>
                </div>

                <label for="position" class="l">Должность</label><br>
                <div class="row">
                    <input id="position" type="text" name="position"> <br>
                    <div class="align-radio">
                        <input id="pleft" type="radio" name="a-position" value="left">
                        <label for="pleft" class="left"></label>
                        <input id="pcenter" type="radio" name="a-position" value="center" checked="">
                        <label for="pcenter" class="center "></label>
                        <input id="pright" type="radio" name="a-position" value="right">
                        <label for="pright" class="right "></label>
                    </div>
                    <div class="size-radio">
                        <input id="s14" type="radio" name="s-position" value="14px">
                        <label for="s14" class="s14"></label>
                        <input id="s16" type="radio" name="s-position" value="16px" checked="">
                        <label for="s16" class="s16 "></label>
                        <input id="s18" type="radio" name="s-position" value="18px">
                        <label for="s18" class="s18"></label>
                    </div>
                </div>
                <div class="colours">
                    <div class="radio">
                        <input id="c-grey1" type="radio" name="c-position" value="#474747" checked="">
                        <label for="c-grey1" class="c-grey1 "></label>
                        <input id="c-grey2" type="radio" name="c-position" value="#202020">
                        <label for="c-grey2" class="c-grey2 "></label>
                        <input id="c-grey3" type="radio" name="c-position" value="#636363">
                        <label for="c-grey3" class="c-grey3 "></label>
                        <input id="c-grey4" type="radio" name="c-position" value="#9E9E9E">
                        <label for="c-grey4" class="c-grey4 "></label>
                        <input id="c-grey5" type="radio" name="c-position" value="#BBBBBB">
                        <label for="c-grey5" class="c-grey5 "></label>
                        <input id="c-grey6" type="radio" name="c-position" value="#E3E3E3">
                        <label for="c-grey6" class="c-grey6 "></label>
                    </div>
                </div>

                <div>
                    <label for="phone" class="l">Номер телефона </label><br>
                    <input id="phone" name="phone" type="tel" maxlength="50"><br>
                    <input id="phone2" name="phone2" type="tel" maxlength="50">
                    <button onclick="PhoneMinus();" title="Убрать дополнительный номер" id="remove_phone">
                        <span class="ico"></span>
                    </button>

                    <div id="add_phone">
                        <button onclick="PhonePlus();" title="Добавить дополнительный номер">
                            <span class="ico"></span><span>Добавить ещё один телефон</span>
                        </button>
                    </div>
                </div>

                <label for="email" class="l">E-mail</label><br>
                <div class="row">
                    <input id="email" type="email" name="email"><br>
                    <div class="checkbox">
                        <input id="check1" type="checkbox" name="check" value="check1">
                        <label for="check1" class="l2">Отображать</label>
                    </div>
                </div>
                <label for="address" class="l">Адрес</label><br>
                <div class="row">
                    <input id="address" type="text" name="address"><br>
                    <div class="checkbox">
                        <input id="check2" type="checkbox" name="check" value="check2">
                        <label for="check2" class="l2">Отображать</label>
                    </div>
                </div>

                <input type="button" class="button" value="Применить" onclick="Card();">
                <!-- </form> -->
            </div>
        </div>
        <div class="card">
            <div class="card-wrap">
                <div id="org-c" class="org"></div>
                <div id="name-c" class="name size26 align-center grey2"></div>
                <div id="position-c" class="position size14 align-center grey1"></div>
                <div class="null"></div>
                <div class="info">
                    <div id="phone-c" class="info-number"></div>
                    <div id="phone2-c" class="info-number"></div>
                    <div id="email-c" class="info-email"></div>
                    <div id="address-c" class="info-address"></div>
                </div>
            </div>
        </div>
    </div>
    <script>
        function PhoneMinus() {
            document.getElementById("phone2").style.display = "none";
            document.getElementById("phone2").value = "";
            document.getElementById("remove_phone").style.display = "none";
            document.getElementById("add_phone").style.display = "";
        }

        function PhonePlus() {
            document.getElementById("phone2").style.display = "inline-block";
            document.getElementById("remove_phone").style.display = "inline-block";
            document.getElementById("add_phone").style.display = "none";
        }

        function Card() {
            document.getElementById("org-c").innerHTML = document.getElementById("org").value;
            document.getElementById("name-c").innerHTML = document.getElementById("name").value;
            document.getElementById("position-c").innerHTML = document.getElementById("position").value;
            document.getElementById("phone-c").innerHTML = document.getElementById("phone").value;
            document.getElementById("phone2-c").innerHTML = document.getElementById("phone2").value;
            document.getElementById("email-c").innerHTML = document.getElementById("email").value;
            document.getElementById("address-c").innerHTML = document.getElementById("address").value;
            document.getElementById("name-c").style.color = document.querySelector('input[name="c-name"]:checked').value;
            document.getElementById("name-c").style.textAlign = document.querySelector('input[name="a-name"]:checked').value;
            document.getElementById("name-c").style.fontSize = document.querySelector('input[name="s-name"]:checked').value;
            document.getElementById("position-c").style.color = document.querySelector('input[name="c-position"]:checked').value;
            document.getElementById("position-c").style.textAlign = document.querySelector('input[name="a-position"]:checked').value;
            document.getElementById("position-c").style.fontSize = document.querySelector('input[name="s-position"]:checked').value;

            if (document.getElementById("phone2").value != "") {
                document.getElementById("phone2-c").style.display = "block";
            } else {
                document.getElementById("phone2-c").style.display = "none";
            }
            if (document.getElementById("check1").checked == true) {
                document.getElementById("email-c").style.display = "block";
            } else {
                document.getElementById("email-c").style.display = "none";
            }
            if (document.getElementById("check2").checked == true) {
                document.getElementById("address-c").style.display = "block";
            } else {
                document.getElementById("address-c").style.display = "none";
            }
        }
    </script>
</body>

</html>