
#wp-unit-converter {
    width: 750px;
    height: 235px;
    max-width: calc(100vw - 30px);
    margin: 0 auto;
    background: #f7f7f7;
    border: 1px solid #aaa;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .25);
    position: relative;
    overflow: hidden;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 13px;
    color: #111;
    box-sizing: border-box;
}

#wp-unit-converter *,
#wp-unit-converter *::before,
#wp-unit-converter *::after {
    box-sizing: border-box;
}

#wp-unit-converter .titlebar {
    width: 100%;
    height: 28px;
    background: linear-gradient(#eeeeee, #dddddd);
    border-bottom: 1px solid #bdbdbd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 7px;
    font-size: 13px;
    overflow: hidden;
}

#wp-unit-converter .titlebar span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#wp-unit-converter .tabs {
    width: 100%;
    height: 65px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 32px);
    padding: 0 7px;
    background: #f4f4f4;
    overflow: hidden;
}

#wp-unit-converter .tab {
    width: 100%;
    height: 32px;
    margin: 0;
    padding: 0 5px;
    border: 0;
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
    background: #eeeeee;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 13px;
    color: #111;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#wp-unit-converter .tab:nth-child(-n + 3) {
    border-top: 1px solid #d0d0d0;
}

#wp-unit-converter .tab:nth-child(3n + 1) {
    border-left: 1px solid #d0d0d0;
}

#wp-unit-converter .tab:hover {
    background: #f8f8f8;
}

#wp-unit-converter .tab.active {
    background: #fff;
    border: 1px solid #999;
    position: relative;
    z-index: 2;
}

#wp-unit-converter .content {
    position: relative;
    width: 100%;
    height: 140px;
    background: #fff;
    border-top: 1px solid #c7c7c7;
    overflow: hidden;
}

#wp-unit-converter .value-input {
    position: absolute;
    left: 15px;
    top: 25px;
    width: 125px;
    height: 46px;
    border: 1px solid #bfbfbf;
    background: #fff;
    padding: 3px 7px;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 16px;
    color: #111;
    outline: none;
}

#wp-unit-converter .value-input:focus {
    border-color: #777;
}

#wp-unit-converter .conversion {
    position: absolute;
    left: 155px;
    right: 15px;
    top: 25px;
    height: 46px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

#wp-unit-converter .unit-select {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    max-width: none;
    height: 46px;
    border: 1px solid #bcbcbc;
    border-radius: 0;
    background: #fff;
    padding: 3px 7px;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 13px;
    color: #111;
    outline: none;
    cursor: pointer;
}

#wp-unit-converter .unit-select:focus {
    border-color: #777;
}

#wp-unit-converter .arrow {
    flex: 0 0 24px;
    width: 24px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, Tahoma, sans-serif;
    font-size: 14px;
    color: #111;
    white-space: nowrap;
}

#wp-unit-converter .result {
    position: absolute;
    left: 15px;
    top: 82px;
    max-width: calc(100% - 30px);
    font-family: Arial, Tahoma, sans-serif;
    font-size: 34px;
    font-weight: 400;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 770px) {
    #wp-unit-converter {
        width: 100%;
        max-width: calc(100vw - 30px);
    }

    #wp-unit-converter .value-input {
        left: 8px;
        width: 90px;
    }

    #wp-unit-converter .conversion {
        left: 110px;
        right: 8px;
        gap: 3px;
    }

    #wp-unit-converter .unit-select {
        padding: 2px 3px;
        font-size: 11px;
    }

    #wp-unit-converter .arrow {
        flex: 0 0 18px;
        width: 18px;
        font-size: 12px;
    }

    #wp-unit-converter .result {
        left: 8px;
        max-width: calc(100% - 16px);
        font-size: 30px;
    }
}
